Index: /trunk/psLib/src/types/psMetadataConfig.c
===================================================================
--- /trunk/psLib/src/types/psMetadataConfig.c	(revision 9797)
+++ /trunk/psLib/src/types/psMetadataConfig.c	(revision 9798)
@@ -10,6 +10,6 @@
 *  @author Eric Van Alst, MHPCC
 *
-*  @version $Revision: 1.101 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-10-27 02:26:42 $
+*  @version $Revision: 1.102 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-10-31 00:08:19 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -152,9 +152,11 @@
             ptrB++;
         }
-    } else {
-        while (isspace(*ptrB)) {
-            ptrB++;
-        }
-    }
+    }
+    /*    else {
+            while (isspace(*ptrB)) {
+                ptrB++;
+            }
+        }
+    */
 
     // Skip over trailing whitespace, null terminators, and # characters
@@ -229,8 +231,9 @@
         // Move to end of token
         (*inString) += sLen;
-    } else if(**inString!='\0' && sLen==0) {
-        *status = 1;
-    }
-
+    }
+    /*    else if(**inString!='\0' && sLen==0) {
+            *status = 1;
+        }
+    */
     return cleanToken;
 }
@@ -247,8 +250,9 @@
     if(*end != '\0') {
         *status = 1;
-    } else if(inString==end) {
-        *status = 1;
-    }
-
+    }
+    /*    else if(inString==end) {
+            *status = 1;
+        }
+    */
     return value;
 }
@@ -265,8 +269,9 @@
     if(*end != '\0') {
         *status = 1;
-    } else if(inString==end) {
-        *status = 1;
-    }
-
+    }
+    /*    else if(inString==end) {
+            *status = 1;
+        }
+    */
     return value;
 }
@@ -283,8 +288,9 @@
     if(*end != '\0') {
         *status = 1;
-    } else if(inString==end) {
-        *status = 1;
-    }
-
+    }
+    /*    else if(inString==end) {
+            *status = 1;
+        }
+    */
     return value;
 }
@@ -295,15 +301,15 @@
 {
     // if inString is NULL return flalse, status = 0
-    if (!inString) {
-        if (status) {
-            *status = 0;
-        }
-        return false;
-    }
-
+    /*    if (!inString) {
+            if (status) {
+                *status = 0;
+            }
+            return false;
+        }
+    */
     if (!strncasecmp(inString, "T", 2) ||
             !strncmp(inString, "1", 2) ||
             !strncasecmp(inString, "true", 5)) {
-        if (status) {
+        if (status != NULL) {
             *status = 0;
         }
@@ -313,5 +319,5 @@
             !strncmp(inString, "0", 2) ||
             !strncasecmp(inString, "false", 6)) {
-        if (status) {
+        if (status != NULL) {
             *status = 0;
         }
@@ -319,5 +325,5 @@
     }
 
-    if (status) {
+    if (status != NULL) {
         *status = 1;
     }
@@ -331,9 +337,9 @@
 {
     PS_ASSERT_PTR_NON_NULL(status, NULL);
-    if (!inString) {
-        *status = 0;
-        return NULL;
-    }
-
+    /*    if (!inString) {
+            *status = 0;
+            return NULL;
+        }
+    */
     // handle "NULL" as the time value
     if (strncmp(inString, "NULL", 5) == 0) {
@@ -373,9 +379,11 @@
     while(*inString!='\0') {
         strtod(inString, &end);
-        if(inString==end) {
-            *status = 1;
-            return NULL;
-        }
-        while(*end==' ' || *end==',') { // Commas or spaces may be used as delimiters for vector values
+        /*        if(inString==end) {
+                    *status = 1;
+                    return NULL;
+                }
+        */
+        // Commas or spaces may be used as delimiters for vector values
+        while(*end==' ' || *end==',') {
             end++;
         }
@@ -392,8 +400,9 @@
         while(*inString!='\0') {
             value = strtod(inString, &end);
-            if(inString==end) {
-                *status = 1;
-                return vec;
-            }
+            /*            if(inString==end) {
+                            *status = 1;
+                            return vec;
+                        }
+                        */
             switch(elemType) {
             case PS_TYPE_U8:
@@ -425,11 +434,12 @@
                 break;
             case PS_TYPE_F64:
+            default:
                 vec->data.F64[i++] = (psF64)value;
                 break;
-            default:
-                *status = 1;
-                psError(PS_ERR_BAD_PARAMETER_VALUE,true,
-                        _("Specified type, %d, is not supported."),
-                        elemType);
+                /*                *status = 1;
+                                psError(PS_ERR_BAD_PARAMETER_VALUE,true,
+                                        _("Specified type, %d, is not supported."),
+                                        elemType);
+                                */
             }
             vec->n++;
@@ -585,19 +595,21 @@
         // Create metadata item to represent token read
         tempItem = psMetadataItemAllocStr(token,"","");
-        if(tempItem == NULL) {
-            psFree(metadataTemplate);
-            psFree(token);
-            metadataTemplate = NULL;
-            break;
-        }
-
-        // Add item to template
-        if(!psMetadataAddItem(metadataTemplate, tempItem, PS_LIST_TAIL, PS_META_DEFAULT)) {
-            psFree(metadataTemplate);
-            psFree(tempItem);
-            psFree(token);
-            metadataTemplate = NULL;
-            break;
-        }
+        psMetadataAddItem(metadataTemplate, tempItem, PS_LIST_TAIL, PS_META_DEFAULT);
+        /*        if(tempItem == NULL) {
+                    psFree(metadataTemplate);
+                    psFree(token);
+                    metadataTemplate = NULL;
+                    break;
+                }
+         
+                // Add item to template
+                if(!psMetadataAddItem(metadataTemplate, tempItem, PS_LIST_TAIL, PS_META_DEFAULT)) {
+                    psFree(metadataTemplate);
+                    psFree(tempItem);
+                    psFree(token);
+                    metadataTemplate = NULL;
+                    break;
+                }
+        */
         psFree(tempItem);
         psFree(token);
@@ -712,5 +724,6 @@
     // Check for no type
     if(strType==NULL) {
-        psError(PS_ERR_IO, true, _("Failed to read a metadata %s on line %u."), "type",lineCount);
+        psError(PS_ERR_IO, true,
+                _("Failed to read a metadata %s on line %u."), "type",lineCount);
         returnValue = false;
     } else {
@@ -743,6 +756,7 @@
                 vectorType = PS_TYPE_F64;
             } else {
-                psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."), "", keyName,
-                        strType, lineCount);
+                psError(PS_ERR_IO, true,
+                        _("Failed to parse the value '%s' of metadata item %s, type %s, "
+                          "on line %u."), "", keyName,  strType, lineCount);
                 psFree(strType);
                 return false;
@@ -758,4 +772,6 @@
         } else if(!strncmp(strType, "S32", 3)) {
             mdType = PS_DATA_S32;
+        } else if(!strncmp(strType, "S64", 3)) {
+            mdType = PS_DATA_S64;
         } else if(!strncmp(strType, "U8", 2)) {
             mdType = PS_DATA_U8;
@@ -764,4 +780,6 @@
         } else if(!strncmp(strType, "U32", 3)) {
             mdType = PS_DATA_U32;
+        } else if(!strncmp(strType, "U64", 3)) {
+            mdType = PS_DATA_U64;
         } else if(!strncmp(strType, "F32", 3)) {
             mdType = PS_DATA_F32;
@@ -785,8 +803,11 @@
                         // Add metadata item
                         md = ((p_psParseLevelInfo*)(levelArray->data[*level]))->metadata;
-                        addStatus = psMetadataAdd(md,PS_LIST_TAIL,keyName,PS_DATA_METADATA | flags,"",tempMeta);
+                        addStatus = psMetadataAdd(md,PS_LIST_TAIL,keyName,
+                                                  PS_DATA_METADATA | flags,"",tempMeta);
                         // Check for add failure
                         if (! addStatus) {
-                            psError(PS_ERR_IO, true, _("Duplicate Metadata item, %s, found on line %u.  Overwrite not allowed."),
+                            psError(PS_ERR_IO, true,
+                                    _("Duplicate Metadata item, %s, found on line %u.  "
+                                      "Overwrite not allowed."),
                                     keyName, lineCount);
                             psFree(strType);
@@ -797,5 +818,6 @@
                     } else {
                         // Metadata type read error
-                        psError(PS_ERR_IO,true,_("Failed to read a metadata %s on line %u."),
+                        psError(PS_ERR_IO,true,
+                                _("Failed to read a metadata %s on line %u."),
                                 keyName, lineCount);
                         psFree(strType);
@@ -807,5 +829,6 @@
             }
             if(!typeFound) {
-                psError(PS_ERR_IO, true, _("Metadata type '%s', found on line %u, is invalid."),
+                psError(PS_ERR_IO, true,
+                        _("Metadata type '%s', found on line %u, is invalid."),
                         strType, lineCount);
                 psFree(strType);
@@ -824,5 +847,6 @@
         strValue = getToken(&linePtr, "#", &status,true);
         if(status) {
-            psError(PS_ERR_IO, true, _("Failed to read a metadata %s on line %u."), "value", lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to read a metadata %s on line %u."), "value", lineCount);
             psFree(strType);
             psFree(strValue);
@@ -830,5 +854,6 @@
         }
         if(strValue==NULL) {
-            psError(PS_ERR_IO, true, _("Failed to read a metadata %s on line %u."), "value", lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to read a metadata %s on line %u."), "value", lineCount);
             psFree(strType);
             psFree(strValue);
@@ -839,5 +864,6 @@
         strComment = getToken(&linePtr,"~", &status,true);
         if(status) {
-            psError(PS_ERR_IO, true, _("Failed to read a metadata %s on line %u."), "comment", lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to read a metadata %s on line %u."), "comment", lineCount);
             psFree(strType);
             psFree(strValue);
@@ -863,6 +889,7 @@
                                       strComment, tempBool);
         } else {
-            psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."), strValue, keyName,
-                    strType, lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to parse the value '%s' of metadata item %s, type %s, "
+                      "on line %u."), strValue, keyName, strType, lineCount);
             returnValue = false;
         }
@@ -877,5 +904,6 @@
         } else {
             psError(PS_ERR_IO, true,
-                    _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."), strValue, keyName, strType, lineCount);
+                    _("Failed to parse the value '%s' of metadata item %s, type %s, "
+                      "on line %u."), strValue, keyName, strType, lineCount);
             returnValue = false;
         }
@@ -884,8 +912,10 @@
         tempInt = (psS8) parseSignedInt(strValue, &status);
         if(!status) {
-            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempInt);
+            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags,
+                                      strComment, tempInt);
         } else {
-            psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."), strValue, keyName,
-                    strType, lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."),
+                    strValue, keyName, strType, lineCount);
             returnValue = false;
         }
@@ -894,8 +924,10 @@
         tempInt = (psS16) parseSignedInt(strValue, &status);
         if(!status) {
-            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempInt);
+            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags,
+                                      strComment, tempInt);
         } else {
-            psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."), strValue, keyName,
-                    strType, lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."),
+                    strValue, keyName, strType, lineCount);
             returnValue = false;
         }
@@ -904,8 +936,10 @@
         tempInt = (psS32) parseSignedInt(strValue, &status);
         if(!status) {
-            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempInt);
+            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags,
+                                      strComment, tempInt);
         } else {
-            psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."), strValue, keyName,
-                    strType, lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."),
+                    strValue, keyName, strType, lineCount);
             returnValue = false;
         }
@@ -914,8 +948,10 @@
         tempUint = (psU8)parseUnsignedInt(strValue, &status);
         if(!status) {
-            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempUint);
+            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags,
+                                      strComment, tempUint);
         } else {
-            psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."), strValue, keyName,
-                    strType, lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."),
+                    strValue, keyName, strType, lineCount);
             returnValue = false;
         }
@@ -924,8 +960,10 @@
         tempUint = (psU16)parseUnsignedInt(strValue, &status);
         if(!status) {
-            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempUint);
+            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags,
+                                      strComment, tempUint);
         } else {
-            psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."), strValue, keyName,
-                    strType, lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."),
+                    strValue, keyName, strType, lineCount);
             returnValue = false;
         }
@@ -934,8 +972,10 @@
         tempUint = (psU32)parseUnsignedInt(strValue, &status);
         if(!status) {
-            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags, strComment, tempUint);
+            addStatus = psMetadataAdd(md, PS_LIST_TAIL, keyName, mdType | flags,
+                                      strComment, tempUint);
         } else {
-            psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."), strValue, keyName,
-                    strType, lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."),
+                    strValue, keyName, strType, lineCount);
             returnValue = false;
         }
@@ -958,6 +998,7 @@
                                       strComment, mTime);
         } else {
-            psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."), strValue, keyName,
-                    strType, lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."),
+                    strValue, keyName, strType, lineCount);
             returnValue = false;
         }
@@ -971,6 +1012,7 @@
                                       strComment, tempVec);
         } else {
-            psError(PS_ERR_IO, true, _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."), strValue, keyName,
-                    strType, lineCount);
+            psError(PS_ERR_IO, true,
+                    _("Failed to parse the value '%s' of metadata item %s, type %s, on line %u."),
+                    strValue, keyName, strType, lineCount);
             returnValue = false;
         }
@@ -1009,6 +1051,6 @@
         break;
     default:
-        psError(PS_ERR_IO,true,_("Metadata of unknown type found on line %u."),
-                lineCount);
+        psError(PS_ERR_IO, true,
+                _("Metadata of unknown type found on line %u."), lineCount);
         break;
     }
@@ -1056,5 +1098,6 @@
         if(repeatedChars(linePtr, '@') > 1) {
             psError(PS_ERR_IO, true,
-                    _("More than one '%c' character not allowed.  Found on line %u."), '@', lineCount);
+                    _("More than one '%c' character not allowed.  Found on line %u."),
+                    '@', lineCount);
             return false;
         }
@@ -1074,5 +1117,6 @@
             strType = getToken(&linePtr," ",&status,true);
             if(strType == NULL) {
-                psError(PS_ERR_IO,true,_("Failed to read a metadata %s on line %u."),"type",lineCount);
+                psError(PS_ERR_IO,true,
+                        _("Failed to read a metadata %s on line %u."), "type", lineCount);
                 psFree(keyName);
                 return false;
@@ -1087,5 +1131,6 @@
                     // Compare type name with the list of current types
                     if(strcmp(strType,(char*)typeArray->data[k]) == 0) {
-                        psError(PS_ERR_IO,true,_("Specified type, %s, on line %u is already defined."),
+                        psError(PS_ERR_IO,true,
+                                _("Specified type, %s, on line %u is already defined."),
                                 strType,lineCount);
                         psFree(tempTemplate);
@@ -1102,5 +1147,6 @@
                 psFree(tempTemplate);
             } else {
-                psError(PS_ERR_IO,true,_("Metadata type '%s', found on line %u, is invalid."),
+                psError(PS_ERR_IO,true,
+                        _("Metadata type '%s', found on line %u, is invalid."),
                         strType,lineCount);
                 psFree(keyName);
@@ -1450,6 +1496,10 @@
             }
             psString timeStr = psTimeToISO(time);
-            psStringAppend(&content, "%-15s", timeStr);
+            psString timeOutput;
+            timeOutput = psStringNCopy(timeStr, 19);
+            psStringAppend(&content, "%s", timeOutput);
+            psStringAppend(&content, "Z");
             psFree(timeStr);
+            psFree(timeOutput);
         } else {
             // psTime is a NULL pointer
@@ -1524,5 +1574,5 @@
             psStringAppend(&content, "F64 ");
             for (int i = 0; i < vector->n; i++) {
-                psStringAppend(&content, "%.15g", vector->data.F64[i]);
+                psStringAppend(&content, "%.15g ", vector->data.F64[i]);
             }
             break;
