Changeset 9755 for trunk/psLib
- Timestamp:
- Oct 26, 2006, 3:10:25 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/types/psMetadataConfig.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/types/psMetadataConfig.c
r9750 r9755 10 10 * @author Eric Van Alst, MHPCC 11 11 * 12 * @version $Revision: 1.9 8$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-10-2 6 04:44:09$12 * @version $Revision: 1.99 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-10-27 01:10:25 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1422 1422 psStringAppend(&content, "%-15s ", item->name); 1423 1423 psTime *time = item->data.V; 1424 if ( time->type == PS_TIME_UTC ) 1425 psStringAppend(&content, "%-8s ", "UTC"); 1426 else if ( time->type == PS_TIME_TAI ) 1427 psStringAppend(&content, "%-8s ", "TAI"); 1428 else if ( time->type == PS_TIME_UT1 ) 1429 psStringAppend(&content, "%-8s ", "UT1"); 1430 else if ( time->type == PS_TIME_TT ) 1431 psStringAppend(&content, "%-8s ", "TT"); 1432 else { 1433 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified psDataType, %d, is not supported."), time->type); 1434 psFree(content); 1435 return NULL; 1436 } 1437 1438 psString timeStr = psTimeToISO(time); 1439 psStringAppend(&content, "%-15s", timeStr); 1440 psFree(timeStr); 1424 if (time) { 1425 switch (time->type) { 1426 case PS_TIME_UTC: 1427 psStringAppend(&content, "%-8s ", "UTC"); 1428 break; 1429 case PS_TIME_TAI: 1430 psStringAppend(&content, "%-8s ", "TAI"); 1431 break; 1432 case PS_TIME_UT1: 1433 psStringAppend(&content, "%-8s ", "UT1"); 1434 break; 1435 case PS_TIME_TT: 1436 psStringAppend(&content, "%-8s ", "TT"); 1437 break; 1438 default: 1439 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 1440 _("Specified psTime type, %d, is not supported."), 1441 time->type); 1442 psFree(content); 1443 return NULL; 1444 } 1445 psString timeStr = psTimeToISO(time); 1446 psStringAppend(&content, "%-15s", timeStr); 1447 psFree(timeStr); 1448 } else { 1449 // psTime is a NULL pointer 1450 psStringAppend(&content, "%-15s", "NULL"); 1451 } 1441 1452 1442 1453 if (item->comment && strncmp(item->comment,"",2)) {
Note:
See TracChangeset
for help on using the changeset viewer.
