Changeset 5103
- Timestamp:
- Sep 22, 2005, 4:39:06 PM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 2 edited
-
src/types/psMetadataConfig.c (modified) (8 diffs)
-
test/types/tst_psMetadata_07.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psMetadataConfig.c
r5057 r5103 10 10 * @author Eric Van Alst, MHPCC 11 11 * 12 * @version $Revision: 1.4 4$ $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 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1275 1275 snprintf(content, MAXSTR, "%d ", item->data.S32); 1276 1276 strncat(mdString, content, MAXSTR); 1277 if ( item->comment != NULL) {1277 if ( strncmp(item->comment,"",2) ) { 1278 1278 // size = strlen(item->comment); 1279 1279 snprintf(content, MAXSTR, " #%s \n", item->comment); … … 1290 1290 snprintf(content, MAXSTR, "%f ", item->data.F32); 1291 1291 strncat(mdString, content, MAXSTR); 1292 if ( item->comment != NULL ) { 1292 if ( strncmp(item->comment,"",2) ) { 1293 // if ( item->comment != NULL ) { 1293 1294 // size = strlen(item->comment); 1294 1295 snprintf(content, MAXSTR, " #%s \n", item->comment); … … 1305 1306 snprintf(content, MAXSTR, "%f ", item->data.F64); 1306 1307 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) ) { 1308 1311 // size = strlen(item->comment); 1309 1312 snprintf(content, MAXSTR, " #%s \n", item->comment); … … 1321 1324 snprintf(content, MAXSTR, "%s ", ((char *)(item->data.V))); 1322 1325 strncat(mdString, content, MAXSTR); 1323 if ( item->comment != NULL ) { 1326 if ( strncmp(item->comment,"",2) ) { 1327 // if ( item->comment != NULL ) { 1324 1328 // size = strlen(item->comment); 1325 1329 snprintf(content, MAXSTR, " #%s \n", item->comment); … … 1342 1346 buffer2 = strtok(NULL, "\n"); 1343 1347 } 1344 if ( item->comment != NULL ) { 1348 if ( strncmp(item->comment,"",2) ) { 1349 // if ( item->comment != NULL ) { 1345 1350 snprintf(content, MAXSTR, "\nEND #%s\n\n", item->comment); 1346 1351 strncat(mdString, content, MAXSTR); … … 1377 1382 else 1378 1383 strncat(mdString, "F ", MAXSTR); 1379 if ( item->comment != NULL ) { 1384 if ( strncmp(item->comment,"",2) ) { 1385 // if ( item->comment != NULL ) { 1380 1386 snprintf(content, MAXSTR, " #%s \n", item->comment); 1381 1387 strncat(mdString, content, MAXSTR); … … 1431 1437 return NULL; 1432 1438 } 1433 if ( item->comment != NULL ) { 1439 if ( strncmp(item->comment,"",2) ) { 1440 // if ( item->comment != NULL ) { 1434 1441 // size = strlen(item->comment); 1435 1442 snprintf(content, MAXSTR, " #%s \n", item->comment); -
trunk/psLib/test/types/tst_psMetadata_07.c
r5007 r5103 12 12 * @author David Robbins, MHPCC 13 13 * 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 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 52 52 time->leapsecond = true; 53 53 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); 57 57 psMetadataAddStr(md, PS_LIST_TAIL, "item5", 0, "I am a string", "GNIRTS"); 58 58 psMetadataAddVector(md, PS_LIST_TAIL, "vector6", 0, "I am a vector", vec); 59 59 psMetadataAddTime(md, PS_LIST_TAIL, "time01", 0, "I am time", time); 60 60 61 psMetadataAddS32(newMD, PS_LIST_TAIL, "ITEM01", 0, "I AM INT", 666);61 psMetadataAddS32(newMD, PS_LIST_TAIL, "ITEM01", 0, NULL, 666); 62 62 psMetadata *newestMD = NULL; 63 63 newestMD = psMetadataAlloc();
Note:
See TracChangeset
for help on using the changeset viewer.
