Index: trunk/psLib/src/dataIO/psFits.c
===================================================================
--- trunk/psLib/src/dataIO/psFits.c	(revision 3769)
+++ trunk/psLib/src/dataIO/psFits.c	(revision 3851)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-26 19:53:30 $
+ *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-05-05 21:25:47 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1149,4 +1149,5 @@
     }
 
+    psTrace(".psFits.psFitsReadTableRow",5,"Table size is %ix%i\n",numCols, numRows);
     // the row parameter in the proper range?
     if (row < 0 || row >= numRows) {
@@ -1172,5 +1173,4 @@
                                NULL, NULL, NULL, NULL, NULL, NULL, NULL, &status);
         }
-
         // get the column type
         fits_get_coltype(fits->p_fd, col, &typecode, &repeat, &width, &status);
@@ -1184,4 +1184,6 @@
                 fits_read_col(fits->p_fd, FITSTYPE, col,row+1, \
                               1, 1, NULL, &value, &anynul, &status); \
+                psTrace(".psFits.psFitsReadTableRow",5,"Column #%i, '%s', is type %i, repeat %i, Value = %g\n", \
+                        col, name, typecode, repeat, (double)value); \
                 psMetadataAdd(data,PS_LIST_TAIL, name, \
                               PS_META_##TYPE, \
@@ -1199,8 +1201,10 @@
                 READ_TABLE_ROW_CASE(TLOGICAL, bool, BOOL);
             case TSTRING: {
-                    char* value;
+                    char* value = psAlloc(repeat+1);
                     int anynul = 0;
                     fits_read_col(fits->p_fd, TSTRING, col,row+1,
                                   1, 1, NULL, &value, &anynul, &status);
+                    psTrace(".psFits.psFitsReadTableRow",5,"Column #%i, '%s', is type %i, repeat %i, value = %s\n",
+                            col, name, typecode, repeat, value);
                     if (anynul == 0) {
                         psMetadataAdd(data,PS_LIST_TAIL, name,
@@ -1208,4 +1212,5 @@
                                       "", value);
                     }
+                    psFree(value);
                     break;
                 }
@@ -1435,7 +1440,9 @@
     }
 
+
     psArray* table = psArrayAlloc(numRows);
 
     for (int row = 0; row < numRows; row++) {
+        psTrace(".psFits.psFitsReadTable",5,"Reading row %i of %i\n",row, numRows);
         table->data[row] = psFitsReadTableRow(fits,row);
     }
