Index: trunk/SophyaExt/FitsIOServer/fabtwriter.cc
===================================================================
--- trunk/SophyaExt/FitsIOServer/fabtwriter.cc	(revision 3668)
+++ trunk/SophyaExt/FitsIOServer/fabtwriter.cc	(revision 4023)
@@ -532,4 +532,5 @@
   \param col : column number [0,ncol[
   \param row : row number    [0,nrow[
+  \param nfirstel : element number    [0,repeat[
   \param val : value to be written
   \warning that routine write a SHORT value into column "col"
@@ -539,9 +540,9 @@
   WARNING: suppose that the column has be defined to be TSHORT
            and suppose that you wanted to write a double value "val"
-   - If you write dummy.Write(col,row,(short)(val))
-       the Write(int,long,short) routine is called and
+   - If you write dummy.Write(col,row,nfirstel,(short)(val))
+       the Write(int,long,long,short) routine is called and
        the cast is performed by the C++ language.
-   - If you write dummy.Write(col,row,val) where val is double
-       the Write(int,long,double) routine is called and
+   - If you write dummy.Write(col,row,nfirstel,val) where val is double
+       the Write(int,long,long,double) routine is called and
        the cast is performed by the cfistio package.
   \endverbatim
@@ -549,10 +550,10 @@
 
 /*! Write signed char (1 Byte) data to FITS file (see below) */
-void FitsABTWriter::Write(int col,LONGLONG row,int_1 val)
+void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,int_1 val)
 {
 #ifdef TSBYTE
   if(FirstTime) createtbl();
   int sta=0;
-  if(fits_write_col(FitsPtr,TSBYTE,col+1,row+1,1,1,&val,&sta))
+  if(fits_write_col(FitsPtr,TSBYTE,col+1,row+1,nfirstel+1,1,&val,&sta))
     printerrorwrite("signed char",col,row,sta);
 #else
@@ -562,32 +563,32 @@
 
 /*! Write unsigned char (1 Byte) data to FITS file (see below) */
-void FitsABTWriter::Write(int col,LONGLONG row,uint_1 val)
-{
-  if(FirstTime) createtbl();
-  int sta=0;
-  if(fits_write_col(FitsPtr,TBYTE,col+1,row+1,1,1,&val,&sta))
+void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,uint_1 val)
+{
+  if(FirstTime) createtbl();
+  int sta=0;
+  if(fits_write_col(FitsPtr,TBYTE,col+1,row+1,nfirstel+1,1,&val,&sta))
     printerrorwrite("unsigned char",col,row,sta);
 }
 
 /*! Write short (2 Bytes) data to FITS file (see below) */
-void FitsABTWriter::Write(int col,LONGLONG row,int_2 val)
-{
-  if(FirstTime) createtbl();
-  int sta=0;
-  if(fits_write_col(FitsPtr,TSHORT,col+1,row+1,1,1,&val,&sta))
+void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,int_2 val)
+{
+  if(FirstTime) createtbl();
+  int sta=0;
+  if(fits_write_col(FitsPtr,TSHORT,col+1,row+1,nfirstel+1,1,&val,&sta))
     printerrorwrite("short",col,row,sta);
 }
 
 /*! Write unsigned short (2 Bytes) data to FITS file (see below) */
-void FitsABTWriter::Write(int col,LONGLONG row,uint_2 val)
-{
-  if(FirstTime) createtbl();
-  int sta=0;
-  if(fits_write_col(FitsPtr,TUSHORT,col+1,row+1,1,1,&val,&sta))
+void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,uint_2 val)
+{
+  if(FirstTime) createtbl();
+  int sta=0;
+  if(fits_write_col(FitsPtr,TUSHORT,col+1,row+1,nfirstel+1,1,&val,&sta))
     printerrorwrite("unsigned short",col,row,sta);
 }
 
 /*! Write long (4 Bytes) data to FITS file (see below) */
-void FitsABTWriter::Write(int col,LONGLONG row,int_4 val)
+void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,int_4 val)
 {
   if(FirstTime) createtbl();
@@ -595,10 +596,10 @@
   // Bug ou inconsistence cfitsio sur machine ou long=8Bytes ?
   int T = (sizeof(long)==4) ? TLONG: TINT;
-  if(fits_write_col(FitsPtr,T,col+1,row+1,1,1,&val,&sta))
+  if(fits_write_col(FitsPtr,T,col+1,row+1,nfirstel+1,1,&val,&sta))
     printerrorwrite("long",col,row,sta);
 }
 
 /*! Write unsigned long (4 Bytes) data to FITS file (see below) */
-void FitsABTWriter::Write(int col,LONGLONG row,uint_4 val)
+void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,uint_4 val)
 {
   if(FirstTime) createtbl();
@@ -606,15 +607,15 @@
   // Bug ou inconsistence cfitsio sur machine ou long=8Bytes ?
   int T = (sizeof(unsigned long)==4) ? TULONG: TUINT;
-  if(fits_write_col(FitsPtr,T,col+1,row+1,1,1,&val,&sta))
+  if(fits_write_col(FitsPtr,T,col+1,row+1,nfirstel+1,1,&val,&sta))
     printerrorwrite("long",col,row,sta);
 }
 
 /*! Write long long (8 Bytes) data to FITS file (see below) */
-void FitsABTWriter::Write(int col,LONGLONG row,int_8 val)
+void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,int_8 val)
 {
 #ifdef TLONGLONG
   if(FirstTime) createtbl();
   int sta=0;
-  if(fits_write_col(FitsPtr,TLONGLONG,col+1,row+1,1,1,&val,&sta))
+  if(fits_write_col(FitsPtr,TLONGLONG,col+1,row+1,nfirstel+1,1,&val,&sta))
     printerrorwrite("long long",col,row,sta);
 #else
@@ -624,18 +625,18 @@
 
 /*! Write float data to FITS file (see below) */
-void FitsABTWriter::Write(int col,LONGLONG row,float val)
-{
-  if(FirstTime) createtbl();
-  int sta=0;
-  if(fits_write_col(FitsPtr,TFLOAT,col+1,row+1,1,1,&val,&sta))
+void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,float val)
+{
+  if(FirstTime) createtbl();
+  int sta=0;
+  if(fits_write_col(FitsPtr,TFLOAT,col+1,row+1,nfirstel+1,1,&val,&sta))
     printerrorwrite("float",col,row,sta);
 }
 
 /*! Write double data to FITS file (see below) */
-void FitsABTWriter::Write(int col,LONGLONG row,double val)
-{
-  if(FirstTime) createtbl();
-  int sta=0;
-  if(fits_write_col(FitsPtr,TDOUBLE,col+1,row+1,1,1,&val,&sta))
+void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,double val)
+{
+  if(FirstTime) createtbl();
+  int sta=0;
+  if(fits_write_col(FitsPtr,TDOUBLE,col+1,row+1,nfirstel+1,1,&val,&sta))
     printerrorwrite("double",col,row,sta);
 }
@@ -649,4 +650,5 @@
   \return "N" = number of the next row to be written,
       that is "N-1" is the number of the last row written.
+  \warning : be carefull if "repeat" not egal to 1
 */
 
