IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5103


Ignore:
Timestamp:
Sep 22, 2005, 4:39:06 PM (21 years ago)
Author:
drobbin
Message:

updated psMetadataConfigFormat to correctly output comments

Location:
trunk/psLib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psMetadataConfig.c

    r5057 r5103  
    1010*  @author Eric Van Alst, MHPCC
    1111*
    12 *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-09-15 21:22:22 $
     12*  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-09-23 02:39:06 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    12751275            snprintf(content, MAXSTR, "%d ", item->data.S32);
    12761276            strncat(mdString, content, MAXSTR);
    1277             if ( item->comment != NULL ) {
     1277            if ( strncmp(item->comment,"",2) ) {
    12781278                //                size = strlen(item->comment);
    12791279                snprintf(content, MAXSTR, " #%s \n", item->comment);
     
    12901290            snprintf(content, MAXSTR, "%f ", item->data.F32);
    12911291            strncat(mdString, content, MAXSTR);
    1292             if ( item->comment != NULL ) {
     1292            if ( strncmp(item->comment,"",2) ) {
     1293                //            if ( item->comment != NULL ) {
    12931294                //                size = strlen(item->comment);
    12941295                snprintf(content, MAXSTR, " #%s \n", item->comment);
     
    13051306            snprintf(content, MAXSTR, "%f ", item->data.F64);
    13061307            strncat(mdString, content, MAXSTR);
    1307             if ( item->comment != NULL ) {
     1308            if ( strncmp(item->comment,"",2) ) {
     1309                //            if ( item->comment != NULL ) {
     1310                //            if ( !strncmp((char*)item->comment, "", 2) ) {
    13081311                //                size = strlen(item->comment);
    13091312                snprintf(content, MAXSTR, " #%s \n", item->comment);
     
    13211324            snprintf(content, MAXSTR, "%s ", ((char *)(item->data.V)));
    13221325            strncat(mdString, content, MAXSTR);
    1323             if ( item->comment != NULL ) {
     1326            if ( strncmp(item->comment,"",2) ) {
     1327                //            if ( item->comment != NULL ) {
    13241328                //                size = strlen(item->comment);
    13251329                snprintf(content, MAXSTR, " #%s \n", item->comment);
     
    13421346                buffer2 = strtok(NULL, "\n");
    13431347            }
    1344             if ( item->comment != NULL ) {
     1348            if ( strncmp(item->comment,"",2) ) {
     1349                //            if ( item->comment != NULL ) {
    13451350                snprintf(content, MAXSTR, "\nEND   #%s\n\n", item->comment);
    13461351                strncat(mdString, content, MAXSTR);
     
    13771382            else
    13781383                strncat(mdString, "F ", MAXSTR);
    1379             if ( item->comment != NULL ) {
     1384            if ( strncmp(item->comment,"",2) ) {
     1385                //            if ( item->comment != NULL ) {
    13801386                snprintf(content, MAXSTR, " #%s \n", item->comment);
    13811387                strncat(mdString, content, MAXSTR);
     
    14311437                return NULL;
    14321438            }
    1433             if ( item->comment != NULL ) {
     1439            if ( strncmp(item->comment,"",2) ) {
     1440                //            if ( item->comment != NULL ) {
    14341441                //                size = strlen(item->comment);
    14351442                snprintf(content, MAXSTR, " #%s \n", item->comment);
  • trunk/psLib/test/types/tst_psMetadata_07.c

    r5007 r5103  
    1212*  @author  David Robbins, MHPCC
    1313*
    14 *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
    15 *  @date  $Date: 2005-09-12 23:05:00 $
     14*  @version $Revision: 1.8 $  $Name: not supported by cvs2svn $
     15*  @date  $Date: 2005-09-23 02:39:06 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5252    time->leapsecond = true;
    5353    psMetadataAddBool(md, PS_LIST_TAIL, "item1", 0, "I am a boolean", true);
    54     psMetadataAddS32(md, PS_LIST_TAIL, "item2", 0, "I am a integer", 55);
    55     psMetadataAddF32(md, PS_LIST_TAIL, "item3", 0, "I am a float", 3.14);
    56     psMetadataAddF64(md, PS_LIST_TAIL, "item4", 0, "I am a double", 6.28);
     54    psMetadataAddS32(md, PS_LIST_TAIL, "item2", 0, "", 55);
     55    psMetadataAddF32(md, PS_LIST_TAIL, "item3", 0, NULL, 3.14);
     56    psMetadataAddF64(md, PS_LIST_TAIL, "item4", 0, "", 6.28);
    5757    psMetadataAddStr(md, PS_LIST_TAIL, "item5", 0, "I am a string", "GNIRTS");
    5858    psMetadataAddVector(md, PS_LIST_TAIL, "vector6", 0, "I am a vector", vec);
    5959    psMetadataAddTime(md, PS_LIST_TAIL, "time01", 0, "I am time", time);
    6060
    61     psMetadataAddS32(newMD, PS_LIST_TAIL, "ITEM01", 0, "I AM INT", 666);
     61    psMetadataAddS32(newMD, PS_LIST_TAIL, "ITEM01", 0, NULL, 666);
    6262    psMetadata *newestMD = NULL;
    6363    newestMD = psMetadataAlloc();
Note: See TracChangeset for help on using the changeset viewer.