Index: trunk/SophyaExt/FitsIOServer/fitsbntbllineRW.cc
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitsbntbllineRW.cc	(revision 1354)
+++ trunk/SophyaExt/FitsIOServer/fitsbntbllineRW.cc	(revision 1359)
@@ -50,10 +50,15 @@
   vector<int> IfitsCol;
   vector<int> SfitsCol;
+  vector<int> LfitsCol;
+  vector<int> BfitsCol;
   for (k=0; k<nbcols;k++)
     {
        FitsFile::FitsDataType ss= inFits_->ColTypeFromFits(k);
+
       if (ss == FitsFile::FitsDataType_double) DfitsCol.push_back(k);
       else if (ss == FitsFile::FitsDataType_float) FfitsCol.push_back(k);
       else if (ss == FitsFile::FitsDataType_int) IfitsCol.push_back(k);
+      else if (ss == FitsFile::FitsDataType_long) LfitsCol.push_back(k);
+      else if (ss == FitsFile::FitsDataType_byte) BfitsCol.push_back(k);
       else if (ss == FitsFile::FitsDataType_char) SfitsCol.push_back(k);
       else {
@@ -76,4 +81,12 @@
       ColN[compt++] =  inFits_->ColNameFromFits(IfitsCol[k]);
     }
+  for (k=0; k<LfitsCol.size(); k++)
+    {
+      ColN[compt++] =  inFits_->ColNameFromFits(LfitsCol[k]);
+    }
+  for (k=0; k<BfitsCol.size(); k++)
+    {
+      ColN[compt++] =  inFits_->ColNameFromFits(BfitsCol[k]);
+    }
   for (k=0; k<SfitsCol.size(); k++)
     {
@@ -81,5 +94,5 @@
     }
 
-  ligne_.setFormat(DfitsCol.size(), FfitsCol.size(), IfitsCol.size(), SfitsCol.size(), ColN);
+  ligne_.setFormat(DfitsCol.size(), FfitsCol.size(), IfitsCol.size(), LfitsCol.size(), BfitsCol.size(),SfitsCol.size(),  ColN);
 }
 
@@ -99,8 +112,8 @@
 
 
-FITS_BntblLineWriter::FITS_BntblLineWriter(char inputfile[],int dc, int fc,int ic, int cc, vector<string> names,DVList* ptr_dvl,  FitsFile::WriteMode wrm)
+FITS_BntblLineWriter::FITS_BntblLineWriter(char inputfile[],int dc, int fc,int ic, int lc, int bc, int cc,  vector<string> names,DVList* ptr_dvl,  FitsFile::WriteMode wrm)
 {
   int k;
-  int nbcols = dc+fc+ic+cc;
+  int nbcols = dc+fc+ic+cc+lc+bc;
   if (nbcols !=  names.size())
     {
@@ -123,13 +136,21 @@
       types+='I';
     }
+  for (k=0; k<lc;k++)
+    {
+      types+='J';
+    }
+  for (k=0; k<bc;k++)
+    {
+      types+='B';
+    }
   for (k=0; k<cc;k++)
     {
       types+='A';
-      StringSizes[k] = names[dc+fc+ic+k].length();
+      StringSizes[k] = names[dc+fc+ic+lc+bc+k].length();
     }            
   string extname("Lines_on_Binary_tbl"); 
 
   outFits_->makeHeaderBntblOnFits(types, names, 1, nbcols, ptr_dvl, extname,StringSizes); 
-    ligne_.setFormat(dc, fc, ic, cc, names);
+    ligne_.setFormat(dc, fc, ic,lc,bc,cc, names);
 
 }
Index: trunk/SophyaExt/FitsIOServer/fitsbntbllineRW.h
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitsbntbllineRW.h	(revision 1354)
+++ trunk/SophyaExt/FitsIOServer/fitsbntbllineRW.h	(revision 1359)
@@ -61,5 +61,5 @@
 
 public:
- FITS_BntblLineWriter(char inputfile[],int dc, int fc, int ic, int cc, vector<string> names, DVList* dvl=NULL, FitsFile::WriteMode wrm = FitsFile::clear);
+ FITS_BntblLineWriter(char inputfile[],int dc, int fc, int ic, int lc, int bc,int cc, vector<string> names, DVList* dvl=NULL, FitsFile::WriteMode wrm = FitsFile::clear);
 ~FITS_BntblLineWriter();
  void WriteNextLine( BnTblLine& WorkLine);
Index: trunk/SophyaExt/FitsIOServer/fitsfile.cc
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitsfile.cc	(revision 1354)
+++ trunk/SophyaExt/FitsIOServer/fitsfile.cc	(revision 1359)
@@ -8,7 +8,7 @@
 
 
-void BnTblLine::setFormat(int dc, int fc, int ic, int cc, vector<string> names)
+void BnTblLine::setFormat(int dc, int fc, int ic,  int lc, int bc,int cc, vector<string> names)
    {
-    int nbcols = dc + fc + ic + cc;
+    int nbcols = dc + fc + ic + cc + lc + bc;
     int maxName = names.size();
     if (nbcols != maxName)
@@ -23,9 +23,11 @@
     if (ic >0) idata_ = vector<int>(fc);
     if (cc >0) cdata_ = vector<string>(fc);
+    if (lc >0) ldata_ = vector<long>(lc);
+    if (bc >0) bdata_ = vector<unsigned char>(bc);
    }
 
 bool BnTblLine::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;
+     if (btl.ddata_.size() == ddata_.size() && btl.fdata_.size() == fdata_.size() && btl.idata_.size() == idata_.size() && btl.cdata_.size() == cdata_.size() &&  btl.ldata_.size() == ldata_.size() &&  btl.bdata_.size() == bdata_.size()) return true;
      else return false;
    }
@@ -49,4 +51,10 @@
      cout << " *** variables string  " << endl;
      for (k=0; k < cdata_.size(); k++) cout << cdata_[k] << " ";
+     cout << endl;
+     cout << " *** variables long  " << endl;
+     for (k=0; k < ldata_.size(); k++) cout << ldata_[k] << " ";
+     cout << endl;
+     cout << " *** variables byte  " << endl;
+     for (k=0; k < bdata_.size(); k++) cout << (int)bdata_[k] << " ";
      cout << endl;
      cout << " ***************************** " << endl;
@@ -721,6 +729,11 @@
 	  break;
 	case FitsDataType_int :
-	  fits_read_col(fptr_,TINT,ncol+1,NoLine+1,1,1,&inull,&ligne.idata_[icount++],
-			&anull,&status);
+	  fits_read_col(fptr_,TINT,ncol+1,NoLine+1,1,1,&inull,&ligne.idata_[icount++], &anull,&status);
+	  break;
+	case FitsDataType_long :
+	  fits_read_col(fptr_,TLONG,ncol+1,NoLine+1,1,1,&inull,&ligne.ldata_[icount++], &anull,&status);
+	  break;
+	case FitsDataType_byte :
+	  fits_read_col(fptr_,TBYTE,ncol+1,NoLine+1,1,1,&inull,&ligne.bdata_[icount++], &anull,&status);
 	  break;
 	case FitsDataType_char :
@@ -1074,5 +1087,5 @@
 	      break;
 	    case TLONG :
-	      types.push_back(FitsDataType_int);
+	      types.push_back(FitsDataType_long);
 	      break;
 	    case TSHORT :
@@ -1111,5 +1124,5 @@
 	      break;
 	    case TLONG :
-	      types.push_back(FitsDataType_int);
+	      types.push_back(FitsDataType_long);
 	      break;
 	    case TINT :
@@ -1125,7 +1138,5 @@
 	      break;
 	    case TBYTE :
-	      types.push_back(FitsDataType_char);
-	      taille_des_chaines.push_back(width);
-	      rept/=width;
+	      types.push_back(FitsDataType_byte);
 	      break;
 	    default :
@@ -1694,4 +1705,14 @@
       fits_write_col(fptr_,TINT,ncol+1,NoLine+1,1,1, &ligne.idata_[k] ,&status);
       if( status ) printerror( status, "PutBinTabLine : erreur ecriture entier"  );
+    }
+  for (k=0; k<ligne.ldata_.size(); k++, ncol++)
+    {
+      fits_write_col(fptr_,TLONG,ncol+1,NoLine+1,1,1, &ligne.ldata_[k] ,&status);
+      if( status ) printerror( status, "PutBinTabLine : erreur ecriture entier long"  );
+    }
+  for (k=0; k<ligne.bdata_.size(); k++, ncol++)
+    {
+      fits_write_col(fptr_,TBYTE,ncol+1,NoLine+1,1,1, &ligne.bdata_[k] ,&status);
+      if( status ) printerror( status, "PutBinTabLine : erreur ecriture byte"  );
     }
   
Index: trunk/SophyaExt/FitsIOServer/fitsfile.h
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitsfile.h	(revision 1354)
+++ trunk/SophyaExt/FitsIOServer/fitsfile.h	(revision 1359)
@@ -93,5 +93,7 @@
      FitsDataType_int,
      FitsDataType_char,
-     FitsDataType_ASCII
+     FitsDataType_ASCII,
+     FitsDataType_long,
+     FitsDataType_byte
    };
 
@@ -324,5 +326,5 @@
  {
    BnTblLine() {}
-   void setFormat(int dc, int fc, int ic, int cc, vector<string> names);
+   void setFormat(int dc, int fc, int ic, int lc, int bc, int cc, vector<string> names);
    bool sameFormat(const BnTblLine& btl) const;
 
@@ -331,7 +333,10 @@
    vector<double> ddata_;
    vector<float>  fdata_;
-   vector<int>    idata_;
+   vector<int>    idata_; 
    vector<string>  cdata_;
    vector<string> ColName_;
+   vector<long>   ldata_;
+   vector<unsigned char>   bdata_;
+
  };
 
