Changeset 2204 for trunk/psLib/src/astronomy/psMetadataIO.c
- Timestamp:
- Oct 26, 2004, 2:57:34 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astronomy/psMetadataIO.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psMetadataIO.c
r2014 r2204 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-10- 08 00:43:12$11 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2004-10-27 00:57:30 $ 13 13 * 14 14 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 104 104 /** Determines if a line is blank (whitespace only) or a commentline. It returns true if so. The input string 105 105 * must be null terminated. */ 106 bool ignoreLine(char *inString)106 psBool ignoreLine(char *inString) 107 107 { 108 108 while(*inString!='\0' && *inString!='#') { … … 119 119 /** Removes leading and trailing whitespace and # characters from a string. The cleaned string is a new null 120 120 * terminated copy of the original input string. */ 121 char *cleanString(char *inString, intsLen)121 char *cleanString(char *inString, psS32 sLen) 122 122 { 123 123 char *ptrB = NULL; … … 149 149 150 150 /** Count repeat occurances of a single character within a line. The input string must be null terminated. */ 151 intrepeatedChars(char *inString, char ch)152 { 153 intcount = 0;151 psS32 repeatedChars(char *inString, char ch) 152 { 153 psS32 count = 0; 154 154 155 155 … … 166 166 /** Returns cleaned token based on delimiter, but not including delimiter. Also changes the pointer location 167 167 * the beginning of the string. Tokens are newly allocated null terminated strings. */ 168 char* getToken(char **inString, char *delimiter, int*status)168 char* getToken(char **inString, char *delimiter, psS32 *status) 169 169 { 170 170 char *cleanToken = NULL; 171 intsLen = 0;171 psS32 sLen = 0; 172 172 173 173 … … 195 195 /** Returns single parsed value as a double precision number. The input string must be cleaned and null 196 196 * terminated. */ 197 double parseValue(char *inString, int*status)197 double parseValue(char *inString, psS32 *status) 198 198 { 199 199 char *end = NULL; … … 212 212 213 213 /** Returns true or false. 'T', 't', '1', 'F', 'f', and '0' are acceptable, parsable variations. */ 214 bool parseBool(char *inString, int*status)215 { 216 bool value = false;214 psBool parseBool(char *inString, psS32 *status) 215 { 216 psBool value = false; 217 217 218 218 … … 229 229 230 230 /** Returns parsed vector filled with with data. The input string must be null terminated. */ 231 psVector* parseVector(char *inString, psElemType elemType, int*status)231 psVector* parseVector(char *inString, psElemType elemType, psS32 *status) 232 232 { 233 233 char *end = NULL; 234 234 char *saveValue = NULL; 235 inti = 0;236 intnumValues = 0;235 psS32 i = 0; 236 psS32 numValues = 0; 237 237 double value = 0.0; 238 238 psVector *vec = NULL; … … 341 341 342 342 343 psMetadata* psMetadataReadHeader(psMetadata* output, char *extName, intextNum, char *fileName)344 { 345 bool tempBool;346 bool success;343 psMetadata* psMetadataReadHeader(psMetadata* output, char *extName, psS32 extNum, char *fileName) 344 { 345 psBool tempBool; 346 psBool success; 347 347 char keyType; 348 348 char keyName[FITS_LINE_SIZE]; … … 350 350 char keyComment[FITS_LINE_SIZE]; 351 351 char fitsErr[MAX_STRING_LENGTH]; 352 inti;353 inthduType = 0;354 intstatus = 0;355 intnumKeys = 0;356 intkeyNum = 0;352 psS32 i; 353 psS32 hduType = 0; 354 psS32 status = 0; 355 psS32 numKeys = 0; 356 psS32 keyNum = 0; 357 357 psMetadataType metadataItemType; 358 358 fitsfile *fd = NULL; … … 449 449 450 450 451 int psMetadataParseConfig(psMetadata** md, char *fileName, bool overwrite)452 { 453 bool tempBool;451 psS32 psMetadataParseConfig(psMetadata** md, char *fileName, psBool overwrite) 452 { 453 psBool tempBool; 454 454 char *line = NULL; 455 455 char *strName = NULL; … … 458 458 char *strComment = NULL; 459 459 char *linePtr = NULL; 460 intstatus = 0;461 intlineCount = 0;462 intfailedLines = 0;460 psS32 status = 0; 461 psS32 lineCount = 0; 462 psS32 failedLines = 0; 463 463 psF64 tempDbl = 0.0; 464 464 psS32 tempInt = 0.0;
Note:
See TracChangeset
for help on using the changeset viewer.
