Index: trunk/SophyaExt/FitsIOServer/fitsfile.h
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitsfile.h	(revision 1193)
+++ trunk/SophyaExt/FitsIOServer/fitsfile.h	(revision 1209)
@@ -18,6 +18,12 @@
    {
     int nbcols = dc + fc + ic + cc;
+    int maxName = names.size();
+    if (nbcols != maxName)
+      {
+	cout << " WARNING: BnTblLine:: length of vector of column names not equal to total number of columns" << endl;
+	maxName = nbcols < maxName ? nbcols : maxName;
+      }
     ColName_ = vector<string>(nbcols);
-     for (int k=0; k < nbcols; k++) ColName_ = names;
+     for (int k=0; k < maxName; k++) ColName_[k] = names[k];
     if (dc >0) ddata_ = vector<double>(dc);
     if (fc >0) fdata_ = vector<float>(fc);
@@ -25,11 +31,17 @@
     if (cc >0) cdata_ = vector<string>(fc);
    }
-   void Print()
+
+bool sameFormat(const BnTblLine& btl) const
+   {
+     if (btl.ddata_.size() == ddata_.size() && btl.fdata_.size() == fdata_.size() && btl.idata_.size() == idata_.size() && btl.cdata_.size() == cdata_.size()) return true;
+     else return false;
+   }
+
+void Print()
    {
      int k;
-     int compt = 0;
      cout << " ********* ligne ************* " << endl;
      cout << " *** noms de variables  " << endl;
-     for (k=0; k < compt + ColName_.size(); k++) cout << ColName_[k] << " ";
+     for (k=0; k < ColName_.size(); k++) cout << ColName_[k] << " ";
      cout << endl;
      cout << " *** variables doubles  " << endl;
@@ -162,5 +174,5 @@
   virtual ~FitsFile();
 
-  static string getErrStatus(int status);
+  static string GetErrStatus(int status);
 
 
@@ -210,5 +222,5 @@
 
   static int NbBlocks(char flnm[]);
-  static void getBlockType(char flnm[], int hdunum, string& typeOfExtension, int& naxis, vector<int>& naxisn, string& dataType, DVList& dvl  );
+  static void GetBlockType(char flnm[], int hdunum, string& typeOfExtension, int& naxis, vector<int>& naxisn, string& dataType, DVList& dvl  );
 
 
@@ -298,15 +310,15 @@
 
   /*!
-get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
+Get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
   */
   void GetBinTabLine(int NoLine, double* ddata, float* fdata, int* idata, char
 ** cdata) ;
   /*!
-get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
+Get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
   */
   void GetBinTabLine(long NoLine, BnTblLine& ligne) ;
 
   /*!
-get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
+Get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
   */
   void GetBinTabLine(int NoLine, float* fdata) ;
@@ -438,11 +450,11 @@
 
    */
-  void putImageToFits( int nbData, double* map) const;
+  void PutImageToFits( int nbData, double* map) const;
 
   /*! same as previous method with float data */
-  void putImageToFits(int nbData, float* map ) const;
+  void PutImageToFits(int nbData, float* map ) const;
 
   /*! same as previous method with int data */
-  void putImageToFits(int nbData, int* map) const;
+  void PutImageToFits(int nbData, int* map) const;
 
 
@@ -470,16 +482,16 @@
 
    */
-  void putColToFits(int nocol, int nentries, double* donnees) const;
+  void PutColToFits(int nocol, int nentries, double* donnees) const;
 
   /*! same as previous method with float data */
-  void putColToFits(int nocol, int nentries, float* donnees) const;
+  void PutColToFits(int nocol, int nentries, float* donnees) const;
 
   /*! same as previous method with int data */
-  void putColToFits(int nocol, int nentries, int* donnees) const;
+  void PutColToFits(int nocol, int nentries, int* donnees) const;
 
   /*! same as previous method with char* data */
-  void putColToFits(int nocol, int nentries, char** donnees) const;
-
-  void putBinTabLine(int NoLine, double* ddata, float* fdata, int* idata, char ** cdata) const;
+  void PutColToFits(int nocol, int nentries, char** donnees) const;
+
+  void PutBinTabLine(long NoLine,  BnTblLine& ligne) const;
 
 
@@ -489,5 +501,5 @@
 
 
-/* put keywords from a DVList into the primary header of the fits-file */
+/* Put keywords from a DVList into the primary header of the fits-file */
 void  DVListIntoPrimaryHeader(DVList& dvl) const;
 
