IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2004, 2:57:34 PM (22 years ago)
Author:
desonia
Message:

converted native C types to ps Types, where practical.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astronomy/psMetadataIO.c

    r2014 r2204  
    99*  @author Ross Harman, MHPCC
    1010*
    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 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    104104/** Determines if a line is blank (whitespace only) or a commentline. It returns true if so. The input string
    105105 *  must be null terminated. */
    106 bool ignoreLine(char *inString)
     106psBool ignoreLine(char *inString)
    107107{
    108108    while(*inString!='\0' && *inString!='#') {
     
    119119/** Removes leading and trailing whitespace and # characters from a string. The cleaned string is a new null
    120120 *  terminated copy of the original input string. */
    121 char *cleanString(char *inString, int sLen)
     121char *cleanString(char *inString, psS32 sLen)
    122122{
    123123    char *ptrB = NULL;
     
    149149
    150150/** Count repeat occurances of a single character within a line. The input string must be null terminated. */
    151 int repeatedChars(char *inString, char ch)
    152 {
    153     int count = 0;
     151psS32 repeatedChars(char *inString, char ch)
     152{
     153    psS32 count = 0;
    154154
    155155
     
    166166/** Returns cleaned token based on delimiter, but not including delimiter. Also changes the pointer location
    167167 * the beginning of the string. Tokens are newly allocated null terminated strings. */
    168 char* getToken(char **inString, char *delimiter, int *status)
     168char* getToken(char **inString, char *delimiter, psS32 *status)
    169169{
    170170    char *cleanToken = NULL;
    171     int sLen = 0;
     171    psS32 sLen = 0;
    172172
    173173
     
    195195/** Returns single parsed value as a double precision number. The input string must be cleaned and null
    196196 * terminated. */
    197 double parseValue(char *inString, int *status)
     197double parseValue(char *inString, psS32 *status)
    198198{
    199199    char *end = NULL;
     
    212212
    213213/** 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;
     214psBool parseBool(char *inString, psS32 *status)
     215{
     216    psBool value = false;
    217217
    218218
     
    229229
    230230/** Returns parsed vector filled with with data. The input string must be null terminated. */
    231 psVector* parseVector(char *inString, psElemType elemType, int *status)
     231psVector* parseVector(char *inString, psElemType elemType, psS32 *status)
    232232{
    233233    char *end = NULL;
    234234    char *saveValue = NULL;
    235     int i = 0;
    236     int numValues = 0;
     235    psS32 i = 0;
     236    psS32 numValues = 0;
    237237    double value = 0.0;
    238238    psVector *vec = NULL;
     
    341341
    342342
    343 psMetadata* psMetadataReadHeader(psMetadata* output, char *extName, int extNum, char *fileName)
    344 {
    345     bool tempBool;
    346     bool success;
     343psMetadata* psMetadataReadHeader(psMetadata* output, char *extName, psS32 extNum, char *fileName)
     344{
     345    psBool tempBool;
     346    psBool success;
    347347    char keyType;
    348348    char keyName[FITS_LINE_SIZE];
     
    350350    char keyComment[FITS_LINE_SIZE];
    351351    char fitsErr[MAX_STRING_LENGTH];
    352     int i;
    353     int hduType = 0;
    354     int status = 0;
    355     int numKeys = 0;
    356     int keyNum = 0;
     352    psS32 i;
     353    psS32 hduType = 0;
     354    psS32 status = 0;
     355    psS32 numKeys = 0;
     356    psS32 keyNum = 0;
    357357    psMetadataType metadataItemType;
    358358    fitsfile *fd = NULL;
     
    449449
    450450
    451 int psMetadataParseConfig(psMetadata** md, char *fileName, bool overwrite)
    452 {
    453     bool tempBool;
     451psS32 psMetadataParseConfig(psMetadata** md, char *fileName, psBool overwrite)
     452{
     453    psBool tempBool;
    454454    char *line = NULL;
    455455    char *strName = NULL;
     
    458458    char *strComment = NULL;
    459459    char *linePtr = NULL;
    460     int status = 0;
    461     int lineCount = 0;
    462     int failedLines = 0;
     460    psS32 status = 0;
     461    psS32 lineCount = 0;
     462    psS32 failedLines = 0;
    463463    psF64 tempDbl = 0.0;
    464464    psS32 tempInt = 0.0;
Note: See TracChangeset for help on using the changeset viewer.