IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11668


Ignore:
Timestamp:
Feb 6, 2007, 11:36:09 AM (19 years ago)
Author:
jhoblitt
Message:

use 'bool' instead of psBool where-ever possible

Location:
trunk/psLib/src
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psCoord.c

    r11618 r11668  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.132 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2007-02-03 06:01:42 $
     12*  @version $Revision: 1.133 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2007-02-06 21:36:09 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    151151Why isn't this called p_psIsPlaneTransformLinear()?
    152152 *****************************************************************************/
    153 psBool p_psIsProjectionLinear(psPlaneTransform *transform)
     153bool p_psIsProjectionLinear(psPlaneTransform *transform)
    154154{
    155155    PS_ASSERT_PTR_NON_NULL(transform, false);
  • trunk/psLib/src/astro/psCoord.h

    r11248 r11668  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2007-01-23 22:47:22 $
     10 *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2007-02-06 21:36:09 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    321321 *  the order of the projection
    322322*/
    323 psBool p_psIsProjectionLinear(
     323bool p_psIsProjectionLinear(
    324324    psPlaneTransform *transform        ///< transform to test for linearity
    325325);
  • trunk/psLib/src/astro/psTime.c

    r10999 r11668  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.108 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2007-01-09 22:38:52 $
     12 *  @version $Revision: 1.109 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2007-02-06 21:36:09 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    12681268{
    12691269    psTime*    prevUtc     = NULL;
    1270     psBool     returnValue = false;
     1270    bool     returnValue = false;
    12711271
    12721272    // Check for valid time
  • trunk/psLib/src/astro/psTime.h

    r11248 r11668  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-01-23 22:47:22 $
     13 *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2007-02-06 21:36:09 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8585 * @return bool:    True for success, false for failure.
    8686 */
    87 psBool p_psTimeInit(
     87bool p_psTimeInit(
    8888    const char *fileName               ///< File name containing config/data info
    8989);
     
    103103 * @return void:    void.
    104104 */
    105 psBool p_psTimeFinalize(void);
     105bool p_psTimeFinalize(void);
    106106
    107107/** Frees memory that was allocated by psTime functions.
  • trunk/psLib/src/db/psDB.c

    r11426 r11668  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.133 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2007-01-30 05:16:28 $
     14 *  @version $Revision: 1.134 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2007-02-06 21:36:09 $
    1616 *
    1717 *  Copyright (C) 2005-2006  Joshua Hoblitt, University of Hawaii
     
    13371337        case PS_DATA_BOOL: {
    13381338                // XXX: ASC HACK NOTE (2005/06/03): set extreme bytes to the
    1339                 // boolean character value.  sizeof(psBool)==4 which triggers
     1339                // boolean character value.  sizeof(bool)==4 which triggers
    13401340                // an endianess issue in the MySQL conversion (reading only 1
    13411341                // byte), on Macintosh hardware (and maybe others?)
     
    20132013            break;
    20142014        default:
    2015             psError(PS_ERR_UNKNOWN, true, "NULL psBool can't be compared with any operator other than '=='");
     2015            psError(PS_ERR_UNKNOWN, true, "NULL bool can't be compared with any operator other than '=='");
    20162016            psFree(itemName);
    20172017            return NULL;
  • trunk/psLib/src/fft/psImageFFT.c

    r10999 r11668  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-01-09 22:38:52 $
     7 *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-02-06 21:36:09 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3030#define PS_FFTW_PLAN_RIGOR FFTW_ESTIMATE
    3131
    32 static psBool p_fftwWisdomImported = false;
     32static bool p_fftwWisdomImported = false;
    3333
    3434psImage* psImageFFT(psImage* out, const psImage* image, psFFTFlags direction)
  • trunk/psLib/src/fft/psVectorFFT.c

    r10999 r11668  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-01-09 22:38:52 $
     7 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-02-06 21:36:09 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3030#define P_FFTW_PLAN_RIGOR FFTW_ESTIMATE
    3131
    32 static psBool p_fftwWisdomImported = false;
     32static bool p_fftwWisdomImported = false;
    3333
    3434psVector* psVectorFFT(psVector* out, const psVector* in, psFFTFlags direction)
  • trunk/psLib/src/fits/psFitsHeader.c

    r10999 r11668  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-01-09 22:38:52 $
     9 *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-02-06 21:36:09 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    103103        }
    104104
    105         psBool success;                 // Was the add to the metadata successful?
     105        bool success;                 // Was the add to the metadata successful?
    106106        switch (keyType) {
    107107        case 'X': // bit
  • trunk/psLib/src/math/psMinimizeLMM.c

    r10999 r11668  
    1010 *  @author EAM, IfA
    1111 *
    12  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2007-01-09 22:38:53 $
     12 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2007-02-06 21:36:09 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5454/*****************************************************************************/
    5555
    56 psBool p_psMinLM_GuessABP(
     56bool p_psMinLM_GuessABP(
    5757    psImage  *Alpha,
    5858    psVector *Beta,
     
    171171    psVector *Params = psVectorAlloc(params->n, PS_TYPE_F32);
    172172    psVector *dy     = NULL;
    173     psBool rc = true;
     173    bool rc = true;
    174174
    175175    // the user provides the error or NULL.  we need to convert
     
    196196    }
    197197
    198     psBool rcBool = p_psMinLM_GuessABP(Alpha, delta, Params, alpha, beta, params, paramMask, NULL, 0.0);
     198    bool rcBool = p_psMinLM_GuessABP(Alpha, delta, Params, alpha, beta, params, paramMask, NULL, 0.0);
    199199    if (rcBool == false) {
    200200        psTrace ("psLib.math", 5, "p_psMinLM_GuessABP() returned FALSE.\n");
     
    334334XXX Make an F64 version?
    335335  *****************************************************************************/
    336 psBool psMinimizeLMChi2(
     336bool psMinimizeLMChi2(
    337337    psMinimization *min,
    338338    psImage *covar,
  • trunk/psLib/src/math/psMinimizeLMM.h

    r11248 r11668  
    77 * @author GLG, MHPCC
    88 *
    9  * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    10  * @date $Date: 2007-01-23 22:47:23 $
     9 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     10 * @date $Date: 2007-02-06 21:36:09 $
    1111 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1212 */
     
    156156
    157157
    158 psBool p_psMinLM_GuessABP(
     158bool p_psMinLM_GuessABP(
    159159    psImage  *Alpha,
    160160    psVector *Beta,
  • trunk/psLib/src/math/psMinimizePowell.c

    r10999 r11668  
    1111 *  NOTE: XXX: The SDR is silent about data types.  F32 is implemented here.
    1212 *
    13  *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-01-09 22:38:53 $
     13 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2007-02-06 21:36:09 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    120120    psF32 stepSize = PS_DETERMINE_BRACKET_STEP_SIZE;
    121121    psVector *tmp = NULL;
    122     psBool boolLineIsNull = true;
     122    bool boolLineIsNull = true;
    123123
    124124    psTrace("psLib.math", 4, "---- p_psDetermineBracket() begin ----\n");
     
    254254    psS32 iter = 0;
    255255    psVector *tmp = psVectorAlloc(params->n, PS_TYPE_F32);
    256     psBool boolLineIsNull = true;
     256    bool boolLineIsNull = true;
    257257    psF32 prevMin = 0.0;
    258258    psS32 countMin = 0;
  • trunk/psLib/src/mathtypes/psImage.c

    r10999 r11668  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.121 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2007-01-09 22:38:53 $
     11 *  @version $Revision: 1.122 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2007-02-06 21:36:09 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    780780    ps##TYPE V10 = 0; \
    781781    ps##TYPE V11 = 0; \
    782     psBool valid00 = false; \
    783     psBool valid01 = false; \
    784     psBool valid10 = false; \
    785     psBool valid11 = false; \
     782    bool valid00 = false; \
     783    bool valid01 = false; \
     784    bool valid10 = false; \
     785    bool valid11 = false; \
    786786    \
    787787    if (floorY >= 0 && floorY <= lastY) { \
     
    821821    \
    822822    RETURNTYPE V0 = 0.0; \
    823     psBool valid0 = true; \
     823    bool valid0 = true; \
    824824    if (valid00 && valid10) { \
    825825        V0 = V00*FRACFUNC(1-fracX)+V10*FRACFUNC(fracX); \
     
    833833    \
    834834    RETURNTYPE V1 = 0.0; \
    835     psBool valid1 = true; \
     835    bool valid1 = true; \
    836836    if (valid01 && valid11) { \
    837837        V1 = V01*FRACFUNC(1-fracX)+V11*FRACFUNC(fracX); \
  • trunk/psLib/src/mathtypes/psVector.c

    r10999 r11668  
    99*  @author Robert DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.90 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2007-01-09 22:38:53 $
     11*  @version $Revision: 1.91 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2007-02-06 21:36:09 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    693693            // This is a little ugly, because psVector doesn't have a boolean type yet.
    694694            int temp = va_arg(argp, int);
    695             psBool value = temp;
     695            bool value = temp;
    696696            if (!value) {
    697                 memset(vector->data.U8, 0, vector->n * sizeof(psBool));
     697                memset(vector->data.U8, 0, vector->n * sizeof(bool));
    698698            } else {
    699699                for (long i = 0; i < vector->n; i++) {
  • trunk/psLib/src/mathtypes/psVector.h

    r11248 r11668  
    99 * @author Ross Harman, MHPCC
    1010 *
    11  * @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
    12  * @date $Date: 2007-01-23 22:47:23 $
     11 * @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
     12 * @date $Date: 2007-02-06 21:36:09 $
    1313 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1414 */
     
    199199/** Print a vector to a stream
    200200 *
    201  *  @return psBool          TRUE is successful, otherwise FALSE.
     201 *  @return bool          TRUE is successful, otherwise FALSE.
    202202 */
    203203bool p_psVectorPrint (
  • trunk/psLib/src/sys/psError.h

    r11248 r11668  
    1111 *  @author Eric Van Alst, MHPCC
    1212 *
    13  *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-01-23 22:47:23 $
     13 *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2007-02-06 21:36:09 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    134134psErrorCode psError(
    135135    psErrorCode code,                  ///< Error class code
    136     psBool new,                        ///< true if error originates at this location
     136    bool new,                        ///< true if error originates at this location
    137137    const char* format,                ///< printf-style format of header line
    138138    ...                                ///< any parameters required in format
  • trunk/psLib/src/sys/psErrorCodes.c.in

    r11265 r11668  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-01-24 22:14:48 $
     9 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-02-06 21:36:09 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    145145}
    146146
    147 psBool p_psErrorUnregister(psErrorCode code)
     147bool p_psErrorUnregister(psErrorCode code)
    148148{
    149149    // Check input argument is non-negative
  • trunk/psLib/src/sys/psErrorCodes.h.in

    r11248 r11668  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-01-23 22:47:23 $
     8 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-02-06 21:36:09 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7575/** Clears error codes registered via psErrorRegister.
    7676 *
    77  *  @return psBool    TRUE if given errorcode was removed, otherwise FALSE.
     77 *  @return bool    TRUE if given errorcode was removed, otherwise FALSE.
    7878 */
    79 psBool p_psErrorUnregister(
     79bool p_psErrorUnregister(
    8080    psErrorCode code                   ///< the error code to find and remove
    8181);
  • trunk/psLib/src/sys/psLogMsg.c

    r11617 r11668  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-02-03 05:54:08 $
     13 *  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2007-02-06 21:36:09 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4747static int logFD = STDERR_FILENO;       // Log file descriptor
    4848static psS32 globalLogLevel = PS_LOG_INFO; // log all messages at this or above
    49 static psBool logTime = true;     // Flag to include time info
    50 static psBool logHost = true;     // Flag to include host info
    51 static psBool logLevel = true;    // Flag to include level info
    52 static psBool logName = true;     // Flag to include name info
    53 static psBool logMsg = true;      // Flag to include message info
     49static bool logTime = true;     // Flag to include time info
     50static bool logHost = true;     // Flag to include host info
     51static bool logLevel = true;    // Flag to include level info
     52static bool logName = true;     // Flag to include name info
     53static bool logMsg = true;      // Flag to include message info
    5454
    5555/*****************************************************************************
     
    8686 dest (psS32): the new log destination
    8787Return:
    88  An psBool: TRUE if successful.
     88 An bool: TRUE if successful.
    8989 *****************************************************************************/
    9090bool psLogSetDestination(int fd)
  • trunk/psLib/src/sys/psTrace.c

    r11617 r11668  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.83 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2007-02-03 05:54:08 $
     11 *  @version $Revision: 1.84 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2007-02-06 21:36:09 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6767
    6868static p_psComponent* cRoot = NULL; // The root of the trace component
    69 static psBool traceTime = false;     // Flag to include time info
    70 static psBool traceHost = false;     // Flag to include host info
    71 static psBool traceLevel = false;    // Flag to include level info
    72 static psBool traceName = false;     // Flag to include name info
    73 static psBool traceMsg = true;      // Flag to include message info
     69static bool traceTime = false;     // Flag to include time info
     70static bool traceHost = false;     // Flag to include host info
     71static bool traceLevel = false;    // Flag to include level info
     72static bool traceName = false;     // Flag to include name info
     73static bool traceMsg = true;      // Flag to include message info
    7474static int traceFD = STDOUT_FILENO; // default value
    7575
     
    182182componentAdd(): Adds the component named "addNodeName" to the root tree.
    183183 *****************************************************************************/
    184 static psBool componentAdd(const char *addNodeName, psS32 level)
     184static bool componentAdd(const char *addNodeName, psS32 level)
    185185{
    186186    assert(addNodeName);
  • trunk/psLib/src/sys/psType.h

    r11265 r11668  
    1010*  @author Ross Harman, MHPCC
    1111*
    12 *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2007-01-24 22:14:48 $
     12*  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2007-02-06 21:36:09 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7373typedef char* psString;                ///< string value
    7474typedef void* psPtr;                   ///< void pointer
     75// XXX psBool can't be removed until all macros that 'generate' this type are
     76// fixed -JH
     77// #ifdef __GNUC__
     78// typedef bool psBool __attribute__ ((deprecated)); ///< boolean value
     79//#else // ifdef __GNUC__
    7580typedef bool psBool;                   ///< boolean value
     81// #endif // fdef __GNUC__
     82typedef bool psBOOL;                 ///< allow psBOOL to be used instead of psBool (for macros)
    7683
    7784/** Enumeration of data types for function elements.
     
    150157
    151158typedef psU8 psMaskType;               ///< the C datatype for a mask image
    152 typedef psBool psBOOL;                 ///< allow psBOOL to be used instead of psBool (for macros)
    153159
    154160#define PS_MIN_S8        INT8_MIN      /**< minimum valid psS8 value */
  • trunk/psLib/src/types/psArray.h

    r11248 r11668  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2007-01-23 22:47:23 $
     11 *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2007-02-06 21:36:09 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    166166 *  element is freed.
    167167 *
    168  *  @return psBool  TRUE if the element was set successfully, otherwise FALSE
     168 *  @return bool  TRUE if the element was set successfully, otherwise FALSE
    169169 */
    170170bool psArraySet(
  • trunk/psLib/src/types/psHash.c

    r10999 r11668  
    1212*  @author GLG, MHPCC
    1313*
    14 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2007-01-09 22:38:53 $
     14*  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2007-02-06 21:36:09 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3838static psHashBucket* hashBucketAlloc(const char *key, psPtr data, psHashBucket* next);
    3939static void hashBucketFree(psHashBucket* bucket);
    40 static psPtr doHashWork(psHash* table, const char *key, psPtr data, psBool remove
     40static psPtr doHashWork(psHash* table, const char *key, psPtr data, bool remove
    4141                           );
    4242static void hashFree(psHash* table);
     
    227227                        const char *key,
    228228                        psPtr data,
    229                         psBool remove
     229                        bool remove
    230230                           )
    231231{
     
    407407
    408408    psPtr data = NULL;
    409     psBool retVal = false;
     409    bool retVal = false;
    410410
    411411    data = doHashWork(hash, key, NULL, true);
  • trunk/psLib/src/types/psList.c

    r10999 r11668  
    66 *  @author Robert Daniel DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-01-09 22:38:53 $
     8 *  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-02-06 21:36:09 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3535static void listFree(psList* list);
    3636static void listIteratorFree(psListIterator* iter);
    37 static psBool listIteratorRemove(psListIterator* iterator);
     37static bool listIteratorRemove(psListIterator* iterator);
    3838
    3939static void listFree(psList* list)
     
    8080}
    8181
    82 static psBool listIteratorRemove(psListIterator* iterator)
     82static bool listIteratorRemove(psListIterator* iterator)
    8383{
    8484    if (iterator == NULL || iterator->cursor == NULL) {
  • trunk/psLib/src/types/psLookupTable.c

    r10999 r11668  
    77*  @author Ross Harman, MHPCC
    88*
    9 *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2007-01-09 22:38:53 $
     9*  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2007-02-06 21:36:09 $
    1111*
    1212*  Copyright 2004-2005 Maui High Performance Computing Center, Univ. of Hawaii
     
    613613{
    614614    psLookupTable* outputTable = NULL;
    615     psBool         sortNeeded  = false;
     615    bool         sortNeeded  = false;
    616616    psF64          validTo     = 0;
    617617    psF64          validFrom   = 0;
  • trunk/psLib/src/types/psMetadata.c

    r10999 r11668  
    1212 *  @author Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.148 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2007-01-09 22:38:53 $
     14 *  @version $Revision: 1.149 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2007-02-06 21:36:09 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    185185METADATAITEM_ALLOC_TYPE(U32,psU32,PS_DATA_U32)
    186186METADATAITEM_ALLOC_TYPE(U64,psU64,PS_DATA_U64)
    187 METADATAITEM_ALLOC_TYPE(Bool,psBool,PS_DATA_BOOL)
     187METADATAITEM_ALLOC_TYPE(Bool,bool,PS_DATA_BOOL)
    188188
    189189psMetadataItem* psMetadataItemAllocPtr(const char *name,
     
    233233    switch(metadataItem->type) {
    234234    case PS_DATA_BOOL:
    235         metadataItem->data.B = (psBool)va_arg(argPtr, psS32);
     235        metadataItem->data.B = (bool)va_arg(argPtr, psS32);
    236236        break;
    237237    case PS_DATA_S8:
     
    647647
    648648    va_start(argPtr, comment);
    649     psBool result = psMetadataAddV(md,location,name,format,comment,argPtr);
     649    bool result = psMetadataAddV(md,location,name,format,comment,argPtr);
    650650    va_end(argPtr);
    651651
     
    683683}
    684684
    685 METADATA_ADD_TYPE(Bool,psBool,PS_DATA_BOOL)
     685METADATA_ADD_TYPE(Bool,bool,PS_DATA_BOOL)
    686686METADATA_ADD_TYPE(S8,psS8,PS_DATA_S8)
    687687METADATA_ADD_TYPE(S16,psS16,PS_DATA_S16)
  • trunk/psLib/src/types/psMetadata.h

    r11248 r11668  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.94 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2007-01-23 22:47:23 $
     11*  @version $Revision: 1.95 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2007-02-06 21:36:09 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    104104    psDataType type;                   ///< Type of metadata item.
    105105    union {
    106         psBool B;                      ///< boolean data
     106        bool B;                      ///< boolean data
    107107        psS8 S8;                       ///< Signed 8-bit integer data.
    108108        psS16 S16;                     ///< Signed 16-bit integer data.
     
    301301);
    302302
    303 /** Create a metadata item with specified psBool data.
     303/** Create a metadata item with specified bool data.
    304304 *
    305305 *  Returns a fill psMetadataItem ready for insertion into the psMetadata
     
    452452#endif // #ifndef SWIG
    453453
    454 /** Add a psBool value to metadata collection.
     454/** Add a bool value to metadata collection.
    455455 *
    456456 *  @return bool:  True for success, False for failure.
  • trunk/psLib/src/types/psMetadataConfig.c

    r11152 r11668  
    1010*  @author Eric Van Alst, MHPCC
    1111*
    12 *  @version $Revision: 1.127 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2007-01-19 04:29:11 $
     12*  @version $Revision: 1.128 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2007-02-06 21:36:09 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6767static psMetadata* setMetadataItem(psMetadata* template, char* linePtr)
    6868;
    69 static psBool parseLine(psArray* levelArray, char*  linePtr,
    70                         psS32 lineCount, psBool overwrite);
    71 static psBool parseMetadataItem(char* keyName, psArray* levelArray,
    72                                 char* linePtr, psS32 lineCount, psMetadataFlags flags);
     69static bool parseLine(psArray* levelArray, char*  linePtr,
     70                      psS32 lineCount, bool overwrite);
     71static bool parseMetadataItem(char* keyName, psArray* levelArray,
     72                              char* linePtr, psS32 lineCount, psMetadataFlags flags);
    7373static psString formatMetadataItem(psMetadataItem *item);
    7474static psArray *p_psMetadataKeyArray(psMetadata *md);
     
    125125// Determines if a line is blank (whitespace only) or a commentline. It returns true if so. The input string
    126126// must be null terminated.
    127 static psBool ignoreLine(char *inString)
     127static bool ignoreLine(char *inString)
    128128{
    129129    while(*inString!='\0' && *inString!='#') {
     
    142142static char *cleanString(char *inString,
    143143                         psS32 sLen,
    144                          psBool ignoreComment)
     144                         bool ignoreComment)
    145145{
    146146    char *ptrB = NULL;
     
    208208                      char *delimiter,
    209209                      psS32 *status,
    210                       psBool ignoreComment)
     210                      bool ignoreComment)
    211211{
    212212    char *cleanToken = NULL;
     
    295295
    296296/** Returns true or false. 'T', 't', '1', 'F', 'f', and '0' are acceptable, parsable variations. */
    297 static psBool parseBool(char *inString,
    298                         psS32 *status)
     297static bool parseBool(char *inString,
     298                      psS32 *status)
    299299{
    300300    // if inString is NULL return flalse, status = 0
     
    446446{
    447447    psDataType type;
    448     psBool success = true;
     448    bool success = true;
    449449
    450450    PS_ASSERT_PTR_NON_NULL(fd, false);
     
    669669}
    670670
    671 psBool parseMetadataItem(char* keyName,
    672                          psArray* levelArray,
    673                          char* linePtr,
    674                          psS32 lineCount,
    675                          psMetadataFlags flags)
    676 {
    677     psBool               returnValue   = true;
    678     psBool               addStatus     = false;
     671bool parseMetadataItem(char* keyName,
     672                       psArray* levelArray,
     673                       char* linePtr,
     674                       psS32 lineCount,
     675                       psMetadataFlags flags)
     676{
     677    bool               returnValue   = true;
     678    bool               addStatus     = false;
    679679    psDataType           mdType        = PS_DATA_UNKNOWN;
    680680    psElemType           vectorType    = PS_TYPE_S8;
     
    685685    psMetadata*          md            = NULL;
    686686    psF64                tempDbl       = 0.0;
    687     psBool               tempBool      = false;
     687    bool               tempBool      = false;
    688688    psS64                tempInt       = 0;
    689689    psU64                tempUint      = 0;
     
    691691    char*                tempStr       = NULL;
    692692    psArray*             nonUniqueKeys = NULL;
    693     psBool               typeFound     = false;
     693    bool               typeFound     = false;
    694694    psArray*             typeArray     = NULL;
    695695    psArray*             templateArray = NULL;
     
    10831083}
    10841084
    1085 psBool parseLine(psArray* levelArray,
    1086                  char* linePtr,
    1087                  psS32 lineCount,
    1088                  psBool overwrite)
     1085bool parseLine(psArray* levelArray,
     1086               char* linePtr,
     1087               psS32 lineCount,
     1088               bool overwrite)
    10891089{
    10901090    psMetadataFlags     flags  = PS_META_DEFAULT;
  • trunk/psLib/src/types/psMetadataItemCompare.c

    r10999 r11668  
    5757
    5858    switch (template->type) {
    59         TEMPLATE_CASE(BOOL, B,   psBool)
     59        TEMPLATE_CASE(BOOL, B,   bool)
    6060        ;
    6161        TEMPLATE_CASE(U8,   U8,  psU8 );
  • trunk/psLib/src/types/psMetadataItemParse.c

    r10999 r11668  
    3838}
    3939
    40 psBool psMetadataItemParseBool(const psMetadataItem *item
    41                               )
     40bool psMetadataItemParseBool(const psMetadataItem *item
     41                            )
    4242{
    4343    PS_ASSERT_PTR_NON_NULL(item, false);
    4444
    4545    switch (item->type) {
    46         PS_METADATA_ITEM_PARSE_NUMBER(F32, Bool);
    47         PS_METADATA_ITEM_PARSE_NUMBER(F64, Bool);
    48         PS_METADATA_ITEM_PARSE_NUMBER(S8,  Bool);
    49         PS_METADATA_ITEM_PARSE_NUMBER(S16, Bool);
    50         PS_METADATA_ITEM_PARSE_NUMBER(S32, Bool);
    51         PS_METADATA_ITEM_PARSE_NUMBER(U8,  Bool);
    52         PS_METADATA_ITEM_PARSE_NUMBER(U16, Bool);
    53         PS_METADATA_ITEM_PARSE_NUMBER(U32, Bool);
     46        PS_METADATA_ITEM_PARSE_NUMBER(F32, BOOL);
     47        PS_METADATA_ITEM_PARSE_NUMBER(F64, BOOL);
     48        PS_METADATA_ITEM_PARSE_NUMBER(S8,  BOOL);
     49        PS_METADATA_ITEM_PARSE_NUMBER(S16, BOOL);
     50        PS_METADATA_ITEM_PARSE_NUMBER(S32, BOOL);
     51        PS_METADATA_ITEM_PARSE_NUMBER(U8,  BOOL);
     52        PS_METADATA_ITEM_PARSE_NUMBER(U16, BOOL);
     53        PS_METADATA_ITEM_PARSE_NUMBER(U32, BOOL);
    5454    case PS_DATA_BOOL:
    5555        return item->data.B;
  • trunk/psLib/src/types/psMetadataItemParse.h

    r11248 r11668  
    55*  @author EAM, PAP, JH, RHL,
    66*
    7 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    8 *  @date $Date: 2007-01-23 22:47:23 $
     7*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     8*  @date $Date: 2007-02-06 21:36:09 $
    99*
    1010*  Copyright 2004-2005 IfA, University of Hawaii
     
    2121
    2222// Parse a psMetadataItem as a particular type
    23 psBool psMetadataItemParseBool(const psMetadataItem *item);
     23bool psMetadataItemParseBool(const psMetadataItem *item);
    2424psF32 psMetadataItemParseF32(const psMetadataItem *item);
    2525psF64 psMetadataItemParseF64(const psMetadataItem *item);
Note: See TracChangeset for help on using the changeset viewer.