IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 2275


Ignore:
Timestamp:
Nov 3, 2004, 4:02:10 PM (22 years ago)
Author:
desonia
Message:

fixed problems with psError and associate parameter checking macros.

Location:
trunk/psModules/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/pmFlatField.c

    r2138 r2275  
    1818 *  @author Ross Harman, MHPCC
    1919 *
    20  *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    21  *  @date $Date: 2004-10-14 23:52:09 $
     20 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     21 *  @date $Date: 2004-11-04 02:02:10 $
    2222 *
    2323 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5656        return true;       // Readout may not have data in it
    5757    } else if(flat==NULL) {
    58         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_NULL, true,
    59                    PS_ERRORTEXT_pmFlatField_NULL_FLAT_READOUT);
     58        psError( PS_ERR_BAD_PARAMETER_NULL, true,
     59                 PS_ERRORTEXT_pmFlatField_NULL_FLAT_READOUT);
    6060        return false;
    6161    }
     
    6464    flatImage = flat->image;
    6565    if (inImage == NULL) {
    66         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_NULL, true,
    67                    PS_ERRORTEXT_pmFlatField_NULL_INPUT_IMAGE);
     66        psError( PS_ERR_BAD_PARAMETER_NULL, true,
     67                 PS_ERRORTEXT_pmFlatField_NULL_INPUT_IMAGE);
    6868        return false;
    6969    } else if(flatImage == NULL) {
    70         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_NULL, true,
    71                    PS_ERRORTEXT_pmFlatField_NULL_FLAT_IMAGE);
     70        psError( PS_ERR_BAD_PARAMETER_NULL, true,
     71                 PS_ERRORTEXT_pmFlatField_NULL_FLAT_IMAGE);
    7272        return false;
    7373    } else if(in->mask == NULL) {
     
    7979    // Check input image and its mask are not larger than flat image
    8080    if(inImage->numRows>flatImage->numRows || inImage->numCols>flatImage->numCols) {
    81         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_SIZE, true,
    82                    PS_ERRORTEXT_pmFlatField_SIZE_INPUT_IMAGE,
    83                    inImage->numRows, inImage->numCols, flatImage->numRows, flatImage->numCols);
     81        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     82                 PS_ERRORTEXT_pmFlatField_SIZE_INPUT_IMAGE,
     83                 inImage->numRows, inImage->numCols, flatImage->numRows, flatImage->numCols);
    8484        return false;
    8585    } else if(inMask->numRows>flatImage->numRows || inMask->numCols > flatImage->numCols) {
    86         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_SIZE, true,
    87                    PS_ERRORTEXT_pmFlatField_SIZE_MASK_IMAGE,
    88                    inMask->numRows, inMask->numCols, flatImage->numRows, flatImage->numCols);
     86        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     87                 PS_ERRORTEXT_pmFlatField_SIZE_MASK_IMAGE,
     88                 inMask->numRows, inMask->numCols, flatImage->numRows, flatImage->numCols);
    8989        return false;
    9090    }
     
    9696    // Check that offsets are within image limits
    9797    if(totOffRow>=flatImage->numRows || totOffCol>=flatImage->numCols) {
    98         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_SIZE, true,
    99                    PS_ERRORTEXT_pmFlatField_OFFSET_FLAT_IMAGE,
    100                    totOffRow, totOffCol, flatImage->numRows, flatImage->numCols);
     98        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     99                 PS_ERRORTEXT_pmFlatField_OFFSET_FLAT_IMAGE,
     100                 totOffRow, totOffCol, flatImage->numRows, flatImage->numCols);
    101101        return false;
    102102    } else if(totOffRow>=inImage->numRows || totOffCol>=inImage->numCols) {
    103         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_SIZE, true,
    104                    PS_ERRORTEXT_pmFlatField_OFFSET_INPUT_IMAGE,
    105                    totOffRow, totOffCol, inImage->numRows, inImage->numCols);
     103        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     104                 PS_ERRORTEXT_pmFlatField_OFFSET_INPUT_IMAGE,
     105                 totOffRow, totOffCol, inImage->numRows, inImage->numCols);
    106106        return false;
    107107    } else if(totOffRow>=inMask->numRows || totOffCol>=inMask->numCols) {
    108         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_SIZE, true,
    109                    PS_ERRORTEXT_pmFlatField_OFFSET_MASK_IMAGE,
    110                    totOffRow, totOffCol, inMask->numRows, inMask->numCols);
     108        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     109                 PS_ERRORTEXT_pmFlatField_OFFSET_MASK_IMAGE,
     110                 totOffRow, totOffCol, inMask->numRows, inMask->numCols);
    111111        return false;
    112112    }
     
    117117    maskType = inMask->type.type;
    118118    if(PS_IS_PSELEMTYPE_COMPLEX(inType)) {
    119         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_TYPE, true,
    120                    PS_ERRORTEXT_pmFlatField_TYPE_INPUT_IMAGE,
    121                    inType);
     119        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
     120                 PS_ERRORTEXT_pmFlatField_TYPE_INPUT_IMAGE,
     121                 inType);
    122122        return false;
    123123    } else if(PS_IS_PSELEMTYPE_COMPLEX(flatType)) {
    124         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_TYPE, true,
    125                    PS_ERRORTEXT_pmFlatField_TYPE_FLAT_IMAGE,
    126                    flatType);
     124        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
     125                 PS_ERRORTEXT_pmFlatField_TYPE_FLAT_IMAGE,
     126                 flatType);
    127127        return false;
    128128    } else if(maskType != PS_TYPE_MASK) {
    129         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_TYPE, true,
    130                    PS_ERRORTEXT_pmFlatField_TYPE_MASK_IMAGE,
    131                    maskType);
     129        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
     130                 PS_ERRORTEXT_pmFlatField_TYPE_MASK_IMAGE,
     131                 maskType);
    132132        return false;
    133133    } else if(inType != flatType) {
    134         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_TYPE, true,
    135                    PS_ERRORTEXT_pmFlatField_TYPE_MISMATCH,
    136                    inType, flatType);
     134        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
     135                 PS_ERRORTEXT_pmFlatField_TYPE_MISMATCH,
     136                 inType, flatType);
    137137        return false;
    138138    }
     
    172172        PM_FLAT_DIVISION(F64);
    173173    default:
    174         psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_TYPE, true,
    175                    PS_ERRORTEXT_pmFlatField_TYPE_UNSUPPORTED,
    176                    inType);
     174        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
     175                 PS_ERRORTEXT_pmFlatField_TYPE_UNSUPPORTED,
     176                 inType);
    177177    }
    178178
  • trunk/psModules/src/pmMaskBadPixels.c

    r2138 r2275  
    1919 *  @author Ross Harman, MHPCC
    2020 *
    21  *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    22  *  @date $Date: 2004-10-14 23:52:09 $
     21 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     22 *  @date $Date: 2004-11-04 02:02:10 $
    2323 *
    2424 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6161        return true;   // Readout may not have data in it
    6262    } else if(mask==NULL) {
    63         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_NULL, true,
    64                    PS_ERRORTEXT_pmMaskBadPixels_NULL_MASK_IMAGE);
     63        psError( PS_ERR_BAD_PARAMETER_NULL, true,
     64                 PS_ERRORTEXT_pmMaskBadPixels_NULL_MASK_IMAGE);
    6565        return false;
    6666    }
     
    6868    inImage = in->image;
    6969    if (inImage == NULL) {
    70         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_NULL, true,
    71                    PS_ERRORTEXT_pmMaskBadPixels_NULL_INPUT_IMAGE);
     70        psError( PS_ERR_BAD_PARAMETER_NULL, true,
     71                 PS_ERRORTEXT_pmMaskBadPixels_NULL_INPUT_IMAGE);
    7272        return false;
    7373    } else if(in->mask == NULL) {
     
    7979    // Check input image and its mask are not larger than mask
    8080    if(inImage->numRows > mask->numRows || inImage->numCols > mask->numCols) {
    81         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
    82                    PS_ERRORTEXT_pmMaskBadPixels_SIZE_INPUT_IMAGE,
    83                    inImage->numRows, inImage->numCols, mask->numRows, mask->numCols);
     81        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     82                 PS_ERRORTEXT_pmMaskBadPixels_SIZE_INPUT_IMAGE,
     83                 inImage->numRows, inImage->numCols, mask->numRows, mask->numCols);
    8484        return false;
    8585    } else if(inMask->numRows>mask->numRows || inMask->numCols>mask->numCols) {
    86         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
    87                    PS_ERRORTEXT_pmMaskBadPixels_SIZE_MASK_IMAGE,
    88                    inMask->numRows, inMask->numCols, mask->numRows, mask->numCols);
     86        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     87                 PS_ERRORTEXT_pmMaskBadPixels_SIZE_MASK_IMAGE,
     88                 inMask->numRows, inMask->numCols, mask->numRows, mask->numCols);
    8989        return false;
    9090    }
     
    9696    // Check that offsets are within image limits
    9797    if(totOffRow>=mask->numRows || totOffCol>=mask->numCols) {
    98         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
    99                    PS_ERRORTEXT_pmMaskBadPixels_OFFSET_MASK_IMAGE,
    100                    totOffRow, totOffCol, mask->numRows, mask->numCols);
     98        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     99                 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_MASK_IMAGE,
     100                 totOffRow, totOffCol, mask->numRows, mask->numCols);
    101101        return false;
    102102    } else if(totOffRow>=inImage->numRows || totOffCol>=inImage->numCols) {
    103         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
    104                    PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE,
    105                    totOffRow, totOffCol, inImage->numRows, inImage->numCols);
     103        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     104                 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE,
     105                 totOffRow, totOffCol, inImage->numRows, inImage->numCols);
    106106        return false;
    107107    } else if(totOffRow>=inMask->numRows || totOffCol>=inMask->numCols) {
    108         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
    109                    PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE_MASK,
    110                    totOffRow, totOffCol, inMask->numRows, inMask->numCols);
     108        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
     109                 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE_MASK,
     110                 totOffRow, totOffCol, inMask->numRows, inMask->numCols);
    111111        return false;
    112112    }
     
    116116    maskType = mask->type.type;
    117117    if(PS_IS_PSELEMTYPE_COMPLEX(inType)) {
    118         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_TYPE, true,
    119                    PS_ERRORTEXT_pmMaskBadPixels_TYPE_INPUT_IMAGE,
    120                    inType);
     118        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
     119                 PS_ERRORTEXT_pmMaskBadPixels_TYPE_INPUT_IMAGE,
     120                 inType);
    121121        return false;
    122122    } else if(maskType!=PS_TYPE_MASK) {
    123         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_TYPE, true,
    124                    PS_ERRORTEXT_pmMaskBadPixels_TYPE_MASK_IMAGE,
    125                    maskType);
     123        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
     124                 PS_ERRORTEXT_pmMaskBadPixels_TYPE_MASK_IMAGE,
     125                 maskType);
    126126        return false;
    127127    }
     
    175175        PM_BAD_PIXELS(F64);
    176176    default:
    177         psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_TYPE, true,
    178                    PS_ERRORTEXT_pmMaskBadPixels_TYPE_UNSUPPORTED,
    179                    inType);
     177        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
     178                 PS_ERRORTEXT_pmMaskBadPixels_TYPE_UNSUPPORTED,
     179                 inType);
    180180    }
    181181
  • trunk/psModules/src/pmNonLinear.c

    r2130 r2275  
    55 *  @author George Gusciora, MHPCC
    66 *
    7  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2004-10-14 21:44:08 $
     7 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2004-11-04 02:02:10 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434    int j;
    3535
    36     PS_CHECK_NULL_PTR_RETURN_NULL(in);
    37     PS_CHECK_NULL_PTR_RETURN_NULL(in->image);
    38     PS_CHECK_NULL_PTR_RETURN_NULL(coeff);
     36    PS_PTR_CHECK_NULL(in,NULL);
     37    PS_PTR_CHECK_NULL(in->image, NULL);
     38    PS_PTR_CHECK_NULL(coeff,NULL);
    3939
    4040    for (i=0;i<(in->image)->numRows;i++) {
     
    5858                                const psVector *outFlux)
    5959{
    60     PS_CHECK_NULL_PTR_RETURN_NULL(in);
    61     PS_CHECK_NULL_PTR_RETURN_NULL(in->image);
    62     PS_CHECK_NULL_PTR_RETURN_NULL(inFlux);
    63     PS_CHECK_NULL_PTR_RETURN_NULL(outFlux);
     60    PS_PTR_CHECK_NULL(in,NULL);
     61    PS_PTR_CHECK_NULL(in->image,NULL);
     62    PS_PTR_CHECK_NULL(inFlux,NULL);
     63    PS_PTR_CHECK_NULL(outFlux,NULL);
    6464
    6565    int i;
  • trunk/psModules/src/pmReadoutCombine.c

    r2270 r2275  
    55 *  @author GLG, MHPCC
    66 *
    7  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2004-11-03 22:10:37 $
     7 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2004-11-04 02:02:10 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1515#include<math.h>
    1616#include "pslib.h"
    17 // XXX: have Desonia do this correctly.
    18 #include "../../psLib/src/dataManip/psConstants.h"
     17#include "psConstants.h"
    1918
    2019typedef struct
     
    9089        // XXX
    9190        if (numInputCols != tmpReadout->image->numCols) {
    92             psError(__func__, "Image %d not same size as other input images (%d, %d)\n",
     91            psError(PS_ERR_UNKNOWN,true, "Image %d not same size as other input images (%d, %d)\n",
    9392                    tmpReadout->image->numRows, tmpReadout->image->numCols);
    9493            return(NULL);
     
    9695        // XXX
    9796        if (numInputRows != tmpReadout->image->numRows) {
    98             psError(__func__, "Image %d not same size as other input images (%d, %d)\n",
     97            psError(PS_ERR_UNKNOWN,true, "Image %d not same size as other input images (%d, %d)\n",
    9998                    tmpReadout->image->numRows, tmpReadout->image->numCols);
    10099            return(NULL);
     
    111110
    112111    if (1 < p_psDetermineNumBits(params->stats->options)) {
    113         psError(__func__, "Multiple statistical options have been requested.\n");
     112        psError(PS_ERR_UNKNOWN,true, "Multiple statistical options have been requested.\n");
    114113        return(NULL);
    115114    }
     
    175174            double statValue;
    176175            if (!p_psGetStatValue(stats, &statValue)) {
    177                 psError(__func__, "Could not determine stats value.\n");
     176                psError(PS_ERR_UNKNOWN,true, "Could not determine stats value.\n");
    178177                return(NULL);
    179178            } else {
  • trunk/psModules/src/pmSubtractBias.c

    r2148 r2275  
    66 *  @author George Gusciora, MHPCC
    77 *
    8  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-15 02:20:39 $
     8 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-11-04 02:02:10 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3838
    3939    if (((in->image)->numRows + in->row0 - bias->row0) > (bias->image)->numRows) {
    40         psError(__func__, "bias image does not have enough rows\n");
     40        psError(PS_ERR_UNKNOWN,true, "bias image does not have enough rows\n");
    4141    }
    4242    if (((in->image)->numCols + in->row0 - bias->row0) > (bias->image)->numCols) {
    43         psError(__func__, "bias image does not have enough columns\n");
     43        psError(PS_ERR_UNKNOWN,true, "bias image does not have enough columns\n");
    4444    }
    4545
     
    130130
    131131    if (numOptions == 0) {
    132         psError(__func__, "No statistics options have been specified\n");
     132        psError(PS_ERR_UNKNOWN,true, "No statistics options have been specified\n");
    133133    }
    134134    if (numOptions != 1) {
     
    189189        }
    190190    } else {
    191         psError(__func__, "unknown fit type\n");
     191        psError(PS_ERR_UNKNOWN,true, "unknown fit type\n");
    192192    }
    193193
     
    219219    int nBin;
    220220
    221     PS_CHECK_NULL_PTR_RETURN_NULL(in);
     221    PS_PTR_CHECK_NULL(in,NULL);
    222222
    223223    //
     
    229229
    230230    if ((overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)) {
    231         psError(__func__, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)\n");
     231        psError(PS_ERR_UNKNOWN,true, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)\n");
    232232        return(in);
    233233    }
  • trunk/psModules/src/psTest.c

    r2126 r2275  
    2828#define HEADER_BOTTOM "\\**********************************************************************************/\n\n"
    2929
    30 bool p_runTestSuite( FILE *fp, const char* testPointFile, const char* packageName,
    31                      testDescription tests[], int argc, char * const argv[] )
    32 {
    33     bool success = true;
    34     bool runAll = true;
    35     bool useFork = true;
    36     bool found;
    37     int c;
    38     int n;
     30psBool p_runTestSuite( FILE *fp, const char* testPointFile, const char* packageName,
     31                       testDescription tests[], psS32 argc, char * const argv[] )
     32{
     33    psBool success = true;
     34    psBool runAll = true;
     35    psBool useFork = true;
     36    psBool found;
     37    psS32 c;
     38    psS32 n;
    3939    extern char *optarg;
    4040
     
    6262                printf( "Testpoints:\n" );
    6363                runAll = false;
    64                 for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
     64                for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
    6565                    printf( "    %6d - %s \n", tests[ index ].testPointNumber,
    6666                            tests[ index ].testPointName );
     
    7070            case 't':
    7171                runAll = false;
    72                 for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
     72                for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
    7373                    if ( strcmp( optarg, tests[ index ].testPointName ) == 0 ) {
    7474                        success = p_runTest( fp,
     
    8585                runAll = false;
    8686                if ( sscanf( optarg, "%i", &n ) != 1 ) {
    87                     psError( __func__, "Failed to parse the testpoint number (%s).",
    88                              optarg );
     87                    psError(PS_ERR_UNKNOWN, true, "Failed to parse the testpoint number (%s).",
     88                            optarg );
    8989                    break;
    9090                }
    9191                found = false;
    92                 for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
     92                for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
    9393                    if ( n == tests[ index ].testPointNumber ) {
    9494                        found = true;
     
    103103                }
    104104                if ( ! found ) {
    105                     psError( __func__, "The specified testpoint number (%d) doesn't exist in this test driver.",
    106                              n );
     105                    psError(PS_ERR_UNKNOWN, true, "The specified testpoint number (%d) doesn't exist in this test driver.",
     106                            n );
    107107                    break;
    108108                }
    109109                break;
    110110            case '?':
    111                 psError( __func__, "Option %s is not recognized and is ignored.", optarg );
     111                psError(PS_ERR_UNKNOWN, true, "Option %s is not recognized and is ignored.", optarg );
    112112                break;
    113113            }
     
    116116
    117117    if ( runAll ) {
    118         for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
     118        for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
    119119            if ( ! tests[ index ].isDuplicateEntry ) {
    120120                success = p_runTest( fp,
     
    130130
    131131    if ( ! success ) {
    132         psError( testPointFile, "One or more tests failed" );
     132        psError( PS_ERR_UNKNOWN, true,
     133                 "One or more tests failed" );
    133134    }
    134135
     
    136137}
    137138
    138 bool p_runTest( FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
    139                 testFcn fcn, int expectedReturn, bool useFork )
    140 {
    141     int childReturn = 0;
     139psBool p_runTest( FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
     140                  testFcn fcn, psS32 expectedReturn, psBool useFork )
     141{
     142    psS32 childReturn = 0;
    142143    pid_t child;
    143144
     
    147148        child = fork();
    148149        if ( child == 0 ) {                   // I am the child process, run the test
    149             int currentId = psMemGetId();
    150             int retVal = fcn();
     150            psS32 currentId = psMemGetId();
     151            psS32 retVal = fcn();
    151152            if ( retVal == 0 ) { // only bother checking memory if test executed to end.
    152153                if ( psMemCheckLeaks( currentId, NULL, stderr ) != 0 ) {
    153                     psError( __func__, "Memory Leaks Detected" );
     154                    psError(PS_ERR_UNKNOWN, true, "Memory Leaks Detected" );
    154155                    retVal = 64;
    155156                }
     
    171172        }
    172173    } else {
    173         int currentId = psMemGetId();
     174        psS32 currentId = psMemGetId();
    174175        childReturn = fcn();
    175176        if ( childReturn == 0 ) { // only bother checking memory if test executed to end.
    176177            if ( psMemCheckLeaks( currentId, NULL, stderr ) != 0 ) {
    177                 psError( __func__, "Memory Leaks Detected" );
     178                psError(PS_ERR_UNKNOWN, true, "Memory Leaks Detected" );
    178179                childReturn = 64;
    179180            }
     
    215216                                const char* testPointName,
    216217                                const char* expectedError,
    217                                 int exitValue )
     218                                psS32 exitValue )
    218219{
    219220    char TP[ 80 ];
     
    235236                    const char* packageName,
    236237                    const char* testPointName,
    237                     bool success )
     238                    psBool success )
    238239{
    239240    if ( success ) {
Note: See TracChangeset for help on using the changeset viewer.