Changeset 3220 for trunk/psLib/src/astro/psTime.c
- Timestamp:
- Feb 14, 2005, 5:02:53 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psTime.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psTime.c
r3182 r3220 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.5 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-02-1 0 02:36:41$12 * @version $Revision: 1.52 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-02-15 03:02:53 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 74 74 psF64 searchTables(psF64 index, psU64 column, psLookupStatusType *status, char *metadataTableNames[], psU32 nTables); 75 75 76 76 77 /** Removes leading and trailing whitespace and # characters from a string. The cleaned string is a new null 77 78 * terminated copy of the original input string. */ … … 133 134 return cleanToken; 134 135 } 136 137 // get the psTime.config filename by checking environment variable first, then original installation area. 138 char* p_psGetConfigFileName() 139 { 140 char* filename = getenv("PS_CONFIG_FILE"); 141 142 if (filename == NULL) { // environment variable not found 143 filename = PS_CONFIG_FILE_DEFAULT; // this should come from configure.ac 144 } 145 146 return filename; 147 } 148 135 149 136 150 /** Searches time tables in priority order and performs interpolation if input index value is within a table. … … 148 162 // Check time metadata. Function call reports errors. 149 163 if(timeMetadata == NULL) { 150 if(!p_psTimeInit( CONFIG_FILE))164 if(!p_psTimeInit(p_psGetConfigFileName())) 151 165 return 0.0; 152 166 } … … 705 719 // Check time metadata 706 720 if(timeMetadata == NULL) { 707 if(!p_psTimeInit( CONFIG_FILE)) {721 if(!p_psTimeInit(p_psGetConfigFileName())) { 708 722 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_FILE_NOT_FOUND, "psTime.config"); 709 723 return 0.0;
Note:
See TracChangeset
for help on using the changeset viewer.
