Index: trunk/psLib/test/dataIO/tst_psFits.c
===================================================================
--- trunk/psLib/test/dataIO/tst_psFits.c	(revision 4158)
+++ trunk/psLib/test/dataIO/tst_psFits.c	(revision 4191)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-08 21:07:59 $
+*  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-09 19:40:51 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -122,7 +122,12 @@
                       extname);
 
+        psMetadataAdd(header,PS_LIST_TAIL, "MYSTR",
+                      PS_META_STR,
+                      "Extension Name",
+                      extname);
+
         // set the pixels in the image
         psBinaryOp(image,image,"=",psScalarAlloc(lcv,PS_TYPE_F32));
-        if (! psFitsWriteImage(fitsFile,header,image,1, extname) ) {
+        if (! psFitsWriteImage(fitsFile,header,image,1) ) {
             psError(PS_ERR_UNKNOWN, false,
                     "Could not write image.");
@@ -155,5 +160,5 @@
     psImage* image = psImageAlloc(16,16,PS_TYPE_F32);
 
-    if (! psFitsWriteImage(fitsFile,NULL,image,1,"primary") ) {
+    if (! psFitsWriteImage(fitsFile,NULL,image,1) ) {
         psError(PS_ERR_UNKNOWN, false,
                 "Could not write PHU image.");
@@ -192,5 +197,5 @@
     }
 
-    psFitsWriteTable(fitsFile, NULL, table, "table-1");
+    psFitsWriteTable(fitsFile, NULL, table);
 
     psFree(table);
@@ -1275,5 +1280,5 @@
         psFits* fits = psFitsAlloc(filename); \
         psRegion region = {0,0,0,0}; \
-        if (! psFitsWriteImage(fits, NULL, img, 2, "primary")) { \
+        if (! psFitsWriteImage(fits, NULL, img, 2)) { \
             psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
             return 1; \
@@ -1283,5 +1288,5 @@
             return 2; \
         } \
-        if (! psFitsWriteImage(fits,NULL, img3, 2, "extension")) { \
+        if (! psFitsWriteImage(fits,NULL, img3, 2)) { \
             psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
             return 3; \
@@ -1441,5 +1446,5 @@
     psFits* fits = psFitsAlloc("tmpImages/writeTest.fits");
 
-    if (! psFitsWriteImage(fits, NULL, img,1,NULL)) {
+    if (! psFitsWriteImage(fits, NULL, img,1)) {
         psError(PS_ERR_UNKNOWN, true,"Couldn't write writeTest.fits.");
         return 14;
@@ -1478,5 +1483,5 @@
     */
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message because input image is null.");
-    if ( psFitsWriteImage(fits,NULL,NULL, 1, NULL) ) {
+    if ( psFitsWriteImage(fits,NULL,NULL, 1) ) {
         psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false when input image is NULL.");
         return 20;
