Index: /trunk/psLib/src/math/psRegion.h
===================================================================
--- /trunk/psLib/src/math/psRegion.h	(revision 8311)
+++ /trunk/psLib/src/math/psRegion.h	(revision 8312)
@@ -11,8 +11,8 @@
 typedef struct
 {
-    float x0;                         ///< the first column of the region.
-    float x1;                         ///< the last column of the region.
-    float y0;                         ///< the first row of the region.
-    float y1;                         ///< the last row of the region.
+    float x0;                          ///< the first column of the region.
+    float x1;                          ///< the last column of the region.
+    float y0;                          ///< the first row of the region.
+    float y1;                          ///< the last row of the region.
 }
 psRegion;
@@ -22,9 +22,10 @@
  * @return psRegion* : a new psRegion.
  */
-psRegion *psRegionAlloc(float x0,       ///< the first column of the region.
-                        float x1,       ///< the last column of the region + 1.
-                        float y0,       ///< the first row of the region.
-                        float y1        ///< the last row of the region + 1.
-                       );
+psRegion *psRegionAlloc(
+    float x0,                          ///< the first column of the region.
+    float x1,                          ///< the last column of the region + 1.
+    float y0,                          ///< the first row of the region.
+    float y1                           ///< the last row of the region + 1.
+);
 
 /** Checks the type of a particular pointer.
@@ -40,5 +41,5 @@
 /** Create a psRegion with the specified attributes.
  *
- *  @return psRegion : a cooresponding psRegion.
+ *  @return psRegion :      a corresponding psRegion.
  */
 psRegion psRegionSet(
@@ -54,5 +55,5 @@
  *  shall be of the standard IRAF form '[x0:x1,y0:y1]'
  *
- *  @return psRegion:  A new psRegion struct, or NULL is not successful.
+ *  @return psRegion:       A new psRegion struct, or NULL is not successful.
  */
 psRegion psRegionFromString(
@@ -75,7 +76,7 @@
  */
 psRegion psRegionForSquare(
-    double x,                           ///< x coordinate at square-center
-    double y,                           ///< y coordinate at square-center
-    double radius                       ///< radius of square
+    double x,                          ///< x coordinate at square-center
+    double y,                          ///< y coordinate at square-center
+    double radius                      ///< radius of square
 );
 
Index: /trunk/psLib/src/types/psMetadata.c
===================================================================
--- /trunk/psLib/src/types/psMetadata.c	(revision 8311)
+++ /trunk/psLib/src/types/psMetadata.c	(revision 8312)
@@ -12,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.122 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-09 02:26:44 $
+ *  @version $Revision: 1.123 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-14 20:05:05 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -1194,53 +1194,78 @@
     psMetadataItem *item = NULL; // Item from metadata
     while ( (item = psMetadataGetAndIncrement(iter)) ) {
-        // Indent...
-        for (int i = 0; i < level; i++) {
-            fprintf(fd, "  ");
-        }
-        fprintf(fd, "%s", item->name);
-        if (item->comment && strlen(item->comment) > 0) {
-            fprintf(fd, " (%s)", item->comment);
-        }
-        fprintf(fd, ": ");
+        //So that unsupported types are not printed here, adding a switch statement
+        switch(item->type) {
+        case PS_DATA_STRING:
+        case PS_DATA_BOOL:
+        case PS_DATA_S8:
+        case PS_DATA_S16:
+        case PS_DATA_S32:
+        case PS_DATA_S64:
+        case PS_DATA_U8:
+        case PS_DATA_U16:
+        case PS_DATA_U32:
+        case PS_DATA_U64:
+        case PS_DATA_F32:
+        case PS_DATA_F64:
+        case PS_DATA_METADATA:
+        case PS_DATA_REGION:
+        case PS_DATA_LIST:
+        case PS_DATA_TIME:
+        case PS_DATA_VECTOR:
+            // Indent...
+            //                fprintf(fd, "\n");
+            for (int i = 0; i < level; i++) {
+                fprintf(fd, "  ");
+            }
+            fprintf(fd, "%s", item->name);
+            if (item->comment && strlen(item->comment) > 0) {
+                fprintf(fd, " (%s)", item->comment);
+            }
+            fprintf(fd, ": ");
+            break;
+        case PS_DATA_UNKNOWN:
+        default:
+            break;
+        }
         switch (item->type) {
         case PS_DATA_STRING:
-            fprintf(fd, "%s", (char*)(item->data.V));
+            fprintf(fd, "%s\n", (char*)(item->data.V));
             break;
         case PS_DATA_BOOL:
             if (item->data.B) {
-                fprintf(fd, "True");
+                fprintf(fd, "True\n");
             } else {
-                fprintf(fd, "False");
+                fprintf(fd, "False\n");
             }
             break;
         case PS_DATA_S8:
-            fprintf(fd, "%d", item->data.S8);
+            fprintf(fd, "%d\n", item->data.S8);
             break;
         case PS_DATA_S16:
-            fprintf(fd, "%d", item->data.S16);
+            fprintf(fd, "%d\n", item->data.S16);
             break;
         case PS_DATA_S32:
-            fprintf(fd, "%d", item->data.S32);
+            fprintf(fd, "%d\n", item->data.S32);
             break;
         case PS_DATA_S64:
-            fprintf(fd, "%jd", item->data.S64);
+            fprintf(fd, "%jd\n", item->data.S64);
             break;
         case PS_DATA_U8:
-            fprintf(fd, "%u", item->data.U8);
+            fprintf(fd, "%u\n", item->data.U8);
             break;
         case PS_DATA_U16:
-            fprintf(fd, "%u", item->data.U16);
+            fprintf(fd, "%u\n", item->data.U16);
             break;
         case PS_DATA_U32:
-            fprintf(fd, "%u", item->data.U32);
+            fprintf(fd, "%u\n", item->data.U32);
             break;
         case PS_DATA_U64:
-            fprintf(fd, "%ju", item->data.U64);
+            fprintf(fd, "%ju\n", item->data.U64);
             break;
         case PS_DATA_F32:
-            fprintf(fd, "%f", item->data.F32);
+            fprintf(fd, "%f\n", item->data.F32);
             break;
         case PS_DATA_F64:
-            fprintf(fd, "%f", item->data.F64);
+            fprintf(fd, "%f\n", item->data.F64);
             break;
         case PS_DATA_METADATA:
@@ -1254,14 +1279,14 @@
         case PS_DATA_REGION: {
                 psString region = psRegionToString(*(psRegion*)item->data.V);
-                fprintf(fd, "%s", region);
+                fprintf(fd, "%s\n", region);
                 psFree(region);
                 break;
             }
         case PS_DATA_LIST:
-            fprintf(fd, "<a list of unknown contents>");
+            fprintf(fd, "<a list of unknown contents>\n");
             break;
         case PS_DATA_TIME: {
                 psString time = psTimeToISO(item->data.V);
-                fprintf(fd, "%s", time);
+                fprintf(fd, "%s\n", time);
                 psFree(time);
                 break;
@@ -1275,4 +1300,5 @@
                         fprintf(fd, "%u ", vector->data.U8[i]);
                     }
+                    fprintf(fd, "\n");
                     break;
                 case PS_DATA_U16:
@@ -1281,4 +1307,5 @@
                         fprintf(fd, "%u ", vector->data.U16[i]);
                     }
+                    fprintf(fd, "\n");
                     break;
                 case PS_DATA_U32:
@@ -1287,4 +1314,5 @@
                         fprintf(fd, "%u ", vector->data.U32[i]);
                     }
+                    fprintf(fd, "\n");
                     break;
                 case PS_DATA_U64:
@@ -1293,4 +1321,5 @@
                         fprintf(fd, "%ju ", vector->data.U64[i]);
                     }
+                    fprintf(fd, "\n");
                     break;
                 case PS_DATA_S8:
@@ -1299,4 +1328,5 @@
                         fprintf(fd, "%d ", vector->data.S8[i]);
                     }
+                    fprintf(fd, "\n");
                     break;
                 case PS_DATA_S16:
@@ -1305,4 +1335,5 @@
                         fprintf(fd, "%d ", vector->data.S16[i]);
                     }
+                    fprintf(fd, "\n");
                     break;
                 case PS_DATA_S32:
@@ -1311,4 +1342,5 @@
                         fprintf(fd, "%d ", vector->data.S32[i]);
                     }
+                    fprintf(fd, "\n");
                     break;
                 case PS_DATA_S64:
@@ -1317,4 +1349,5 @@
                         fprintf(fd, "%jd ", vector->data.S64[i]);
                     }
+                    fprintf(fd, "\n");
                     break;
                 case PS_DATA_F32:
@@ -1323,4 +1356,5 @@
                         fprintf(fd, "%f ", vector->data.F32[i]);
                     }
+                    fprintf(fd, "\n");
                     break;
                 case PS_DATA_F64:
@@ -1329,4 +1363,5 @@
                         fprintf(fd, "%f ", vector->data.F64[i]);
                     }
+                    fprintf(fd, "\n");
                     break;
                 case PS_DATA_UNKNOWN:
@@ -1334,14 +1369,19 @@
                     psError(PS_ERR_BAD_PARAMETER_VALUE, true,
                             _("Specified psDataType, %d, is not supported."), vector->type.type);
+                    psFree(iter);
+                    fprintf(fd, "<Unsupported type>\n");
                     return false;
                 }
+                //                fprintf(fd, "\n");
                 break;
             }
         default:
-            fprintf(fd, "\n");
+            //            fprintf(fd, "\n");
             psError(PS_ERR_IO, false, "Non-printable metadata type: %x\n", item->type);
-        }
-        fprintf(fd, "\n");
-    }
+            break;
+        }
+        //        fprintf(fd, "\n");
+    }
+    //    fprintf(fd, "\n");
     psFree(iter);
 
Index: /trunk/psLib/src/types/psMetadataConfig.c
===================================================================
--- /trunk/psLib/src/types/psMetadataConfig.c	(revision 8311)
+++ /trunk/psLib/src/types/psMetadataConfig.c	(revision 8312)
@@ -10,6 +10,6 @@
 *  @author Eric Van Alst, MHPCC
 *
-*  @version $Revision: 1.71 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-08-12 02:53:36 $
+*  @version $Revision: 1.72 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-08-14 20:05:05 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -453,7 +453,7 @@
     psBool success = true;
 
-    PS_ASSERT_PTR_NON_NULL(fd, success);
-    PS_ASSERT_PTR_NON_NULL(format, success);
-    PS_ASSERT_PTR_NON_NULL(item, success);
+    PS_ASSERT_PTR_NON_NULL(fd, false);
+    PS_ASSERT_PTR_NON_NULL(format, false);
+    PS_ASSERT_PTR_NON_NULL(item, false);
 
     type = item->type;
@@ -464,6 +464,6 @@
         // well, the format contains no reference to the metadataItem's data:
         // that is truly trival to do!
-        fprintf(fd,format);
-        return success;
+        //        fprintf(fd,format);
+        return false;
     }
 
@@ -552,4 +552,5 @@
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 _("Specified print format, %%%c, is not supported."), *fType);
+        success = false;
         break;
     }
Index: /trunk/psLib/src/types/psMetadataConfig.h
===================================================================
--- /trunk/psLib/src/types/psMetadataConfig.h	(revision 8311)
+++ /trunk/psLib/src/types/psMetadataConfig.h	(revision 8312)
@@ -10,6 +10,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-05-30 22:18:39 $
+ *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-14 20:05:05 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -48,8 +48,8 @@
  *  this formatting command must also be numeric, and the type conversion
  *  performed to the value to match the format type. If the metadata type is
- *  a string, the fromatting command must also be for a string. If the
+ *  a string, the formatting command must also be for a string. If the
  *  metadata type is any other data type, printing is not allowed.
  *
- * @return psMetadataItem* : Pointer metadata item.
+ * @return psMetadataItem* :    Pointer metadata item.
  */
 bool psMetadataItemPrint(
Index: /trunk/psLib/test/types/Makefile.am
===================================================================
--- /trunk/psLib/test/types/Makefile.am	(revision 8311)
+++ /trunk/psLib/test/types/Makefile.am	(revision 8312)
@@ -31,5 +31,6 @@
 	tap_psMetadataConfigParse \
 	tap_psMetadataItemCompare \
-	tap_psMetadataItemParse
+	tap_psMetadataItemParse \
+	tap_psMetadata_printing
 
 
@@ -69,4 +70,7 @@
 tap_psMetadataItemParse_CPPFLAGS   = $(AM_CPPFLAGS) -I$(top_srcdir)/test/tap/src
 tap_psMetadataItemParse_LDFLAGS    = $(AM_LDFLAGS) $(top_builddir)/test/tap/src/libtap.la
+
+tap_psMetadata_printing_CPPFLAGS   = $(AM_CPPFLAGS) -I$(top_srcdir)/test/tap/src
+tap_psMetadata_printing_LDFLAGS    = $(AM_LDFLAGS) $(top_builddir)/test/tap/src/libtap.la
 
 check_DATA = \
Index: /trunk/psLib/test/types/tap_psMetadataItemCompare.c
===================================================================
--- /trunk/psLib/test/types/tap_psMetadataItemCompare.c	(revision 8311)
+++ /trunk/psLib/test/types/tap_psMetadataItemCompare.c	(revision 8312)
@@ -1,3 +1,3 @@
-#include <stdio.h>
+
 #include "pstap.h"
 
Index: /trunk/psLib/test/types/tap_psMetadataItemParse.c
===================================================================
--- /trunk/psLib/test/types/tap_psMetadataItemParse.c	(revision 8311)
+++ /trunk/psLib/test/types/tap_psMetadataItemParse.c	(revision 8312)
@@ -1,3 +1,3 @@
-#include <stdio.h>
+
 #include "pstap.h"
 
