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.

Location:
trunk/psLib/test/astronomy
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astronomy/tst_psAstrometry.c

    r2096 r2204  
    55 *  @author Robert DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2004-10-13 23:58:20 $
     7 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2004-10-27 00:57:31 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1717#include "pslib.h"
    1818
    19 static int testExposureAlloc(void);
    20 static int testObservatoryAlloc(void);
    21 static int testFPAAlloc(void);
    22 static int testChipAlloc(void);
    23 static int testCellAlloc(void);
    24 static int testReadoutAlloc(void);
     19static psS32 testExposureAlloc(void);
     20static psS32 testObservatoryAlloc(void);
     21static psS32 testFPAAlloc(void);
     22static psS32 testChipAlloc(void);
     23static psS32 testCellAlloc(void);
     24static psS32 testReadoutAlloc(void);
    2525
    2626testDescription tests[] = {
     
    3434                          };
    3535
    36 int main(int argc, char* argv[])
     36psS32 main(psS32 argc, char* argv[])
    3737{
    3838    psLogSetLevel(PS_LOG_INFO);
     
    4141}
    4242
    43 static int testExposureAlloc(void)
     43static psS32 testExposureAlloc(void)
    4444{
    4545    psTime* now = psTimeGetTime(PS_TIME_UTC);
     
    123123}
    124124
    125 static int testObservatoryAlloc(void)
     125static psS32 testObservatoryAlloc(void)
    126126{
    127127    char* name = "The Kaiser Royal Observatory";
     
    173173}
    174174
    175 static int testFPAAlloc(void)
     175static psS32 testFPAAlloc(void)
    176176{
    177177
     
    220220    }
    221221
    222     for (int lcv=0; lcv < 8; lcv++) {
     222    for (psS32 lcv=0; lcv < 8; lcv++) {
    223223        if (fpa->chips->data[lcv] != NULL) {
    224224            psLogMsg(__func__,PS_LOG_ERROR,
     
    307307    */
    308308
    309     for (int lcv=0; lcv < 8; lcv++) {
     309    for (psS32 lcv=0; lcv < 8; lcv++) {
    310310        fpa->chips->data[lcv] = psAlloc(4);
    311311    }
     
    329329}
    330330
    331 static int testChipAlloc(void)
     331static psS32 testChipAlloc(void)
    332332{
    333333    char* name = "The Kaiser Royal Observatory";
     
    372372    }
    373373
    374     for (int lcv=0; lcv < 8; lcv++) {
     374    for (psS32 lcv=0; lcv < 8; lcv++) {
    375375        if (chip->cells->data[lcv] != NULL) {
    376376            psLogMsg(__func__,PS_LOG_ERROR,
     
    477477}
    478478
    479 static int testCellAlloc(void)
     479static psS32 testCellAlloc(void)
    480480{
    481481    char* name = "The Kaiser Royal Observatory";
     
    522522    }
    523523
    524     for (int lcv=0; lcv < 8; lcv++) {
     524    for (psS32 lcv=0; lcv < 8; lcv++) {
    525525        if (cell1->readouts->data[lcv] != NULL) {
    526526            psLogMsg(__func__,PS_LOG_ERROR,
     
    641641}
    642642
    643 static int testReadoutAlloc(void)
     643static psS32 testReadoutAlloc(void)
    644644{
    645645    psImage* image = psImageAlloc(64,64,PS_TYPE_S8);
  • trunk/psLib/test/astronomy/tst_psAstrometry01.c

    r2109 r2204  
    55*  @author GLG, MHPCC
    66*
    7 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    8 *  @date $Date: 2004-10-14 02:05:00 $
     7*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     8*  @date $Date: 2004-10-27 00:57:31 $
    99*
    1010*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1414#include "pslib.h"
    1515
    16 static int test1( void );
    17 static int test2( void );
    18 static int test3( void );
     16static psS32 test1( void );
     17static psS32 test2( void );
     18static psS32 test3( void );
    1919
    2020testDescription tests[] = {
     
    115115psFPA *genSystem()
    116116{
    117     int i;
    118     int j;
    119     int k;
     117    psS32 i;
     118    psS32 j;
     119    psS32 k;
    120120    psImage *tmpImage;
    121121    //    psTime* now = psTimeGetTime(PS_TIME_UTC);
     
    170170            for (k=0;k<NUM_READOUTS;k++) {
    171171                tmpImage = psImageAlloc(READOUT_NUM_COLS, READOUT_NUM_ROWS, PS_TYPE_F32);
    172                 for (int row=0;row<READOUT_NUM_ROWS;row++) {
    173                     for(int col=0;col<READOUT_NUM_COLS;col++) {
     172                for (psS32 row=0;row<READOUT_NUM_ROWS;row++) {
     173                    for(psS32 col=0;col<READOUT_NUM_COLS;col++) {
    174174                        tmpImage->data.F32[row][col] = (float) ((i * (CHIP_WIDTH + CHIP_GAP)) +
    175175                                                                (j * (CELL_WIDTH + CELL_GAP)));
     
    185185}
    186186
    187 int main( int argc, char* argv[] )
     187psS32 main( psS32 argc, char* argv[] )
    188188{
    189189    psLogSetLevel( PS_LOG_INFO );
     
    201201#define Y0  60.0
    202202
    203 int test1( void )
    204 {
    205     int i;
    206     int j;
     203psS32 test1( void )
     204{
     205    psS32 i;
     206    psS32 j;
    207207    psFixedPattern *tmp = NULL;
    208208    float x0 = X0;
     
    212212    psImage *x = psImageAlloc(X_NUM_COLS, X_NUM_ROWS, PS_TYPE_F64);
    213213    psImage *y = psImageAlloc(Y_NUM_COLS, Y_NUM_ROWS, PS_TYPE_F64);
    214     int testStatus = 0;
    215     int numPixels = 0;
     214    psS32 testStatus = 0;
     215    psS32 numPixels = 0;
    216216
    217217    for (i=0;i<X_NUM_ROWS;i++) {
     
    295295}
    296296
    297 int test2()
    298 {
    299     int testStatus = 0;
     297psS32 test2()
     298{
     299    psS32 testStatus = 0;
    300300
    301301    psTime* now = psTimeGetTime(PS_TIME_UTC);
     
    371371}
    372372
    373 int printCell(psCell *cell)
     373psS32 printCell(psCell *cell)
    374374{
    375375    psReadout **readouts = (psReadout **) cell->readouts->data;
     
    377377
    378378    printf("-------------------------------\n");
    379     for (int i = 0; i < readout->image->numRows ; i++) {
    380         for (int j = 0; j < readout->image->numCols ; j++) {
     379    for (psS32 i = 0; i < readout->image->numRows ; i++) {
     380        for (psS32 j = 0; j < readout->image->numCols ; j++) {
    381381            printf("(%.1f) ", readout->image->data.F32[i][j]);
    382382        }
     
    415415 
    416416 *****************************************************************************/
    417 int test3( void )
    418 {
    419     int x;
    420     int y;
     417psS32 test3( void )
     418{
     419    psS32 x;
     420    psS32 y;
    421421    psPlane fpaCoord;
    422422    psFPA *myFPA = genSystem();
     
    426426    psPlane testCoord;
    427427
    428     int xReadout = 0;
    429     int xFPA = 0;
    430     for (int chip=0;chip<NUM_CHIPS;chip++) {
    431         for (int cell=0;cell<NUM_CELLS;cell++) {
     428    psS32 xReadout = 0;
     429    psS32 xFPA = 0;
     430    for (psS32 chip=0;chip<NUM_CHIPS;chip++) {
     431        for (psS32 cell=0;cell<NUM_CELLS;cell++) {
    432432            for(x=0;x<CELL_WIDTH;x++) {
    433433                for (y=0;y<CELL_HEIGHT;y++) {
     
    444444                        psCoordChipToCell(&cellCoord, &chipCoord, myCell);
    445445
    446                         if (x != (int) cellCoord.x) {
     446                        if (x != (psS32) cellCoord.x) {
    447447                            printf("ERROR: x coord was %f, should be %d\n", cellCoord.x, x);
    448448                        }
    449                         if (y != (int) cellCoord.y) {
     449                        if (y != (psS32) cellCoord.y) {
    450450                            printf("ERROR: y coord was %f, should be %d\n", cellCoord.y, y);
    451451                        }
  • trunk/psLib/test/astronomy/tst_psCoord.c

    r2201 r2204  
    66*  @author GLG, MHPCC
    77*
    8 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2004-10-26 22:51:56 $
     8*  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2004-10-27 00:57:31 $
    1010*
    1111*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1515#include "pslib.h"
    1616
    17 static int test1( void );
    18 static int test1b( void );
    19 static int test1c( void );
    20 static int test2( void );
    21 static int test3( void );
    22 static int test4( void );
    23 static int test5( void );
    24 static int test6( void );
    25 static int test7( void );
    26 static int test8( void );
    27 static int test20( void );
    28 static int test21( void );
    29 static int test40( void );
    30 static int test41( void );
     17static psS32 test1( void );
     18static psS32 test1b( void );
     19static psS32 test1c( void );
     20static psS32 test2( void );
     21static psS32 test3( void );
     22static psS32 test4( void );
     23static psS32 test5( void );
     24static psS32 test6( void );
     25static psS32 test7( void );
     26static psS32 test8( void );
     27static psS32 test20( void );
     28static psS32 test21( void );
     29static psS32 test40( void );
     30static psS32 test41( void );
    3131
    3232testDescription tests[] = {
     
    5656
    5757
    58 int main( int argc, char* argv[] )
     58psS32 main( psS32 argc, char* argv[] )
    5959{
    6060    psLogSetLevel( PS_LOG_INFO );
     
    8787#define X0_SMALL 2.0
    8888
    89 int test1( void )
     89psS32 test1( void )
    9090{
    9191    float tmpF32;
    92     int testStatus = 0;
     92    psS32 testStatus = 0;
    9393    psSphereTransform *myST = psSphereTransformAlloc(NPLAT, X0_BIG, X0_SMALL);
    9494
     
    122122#define NY_TERMS 4
    123123#define NZ_TERMS 5
    124 int test1b( void )
    125 {
    126     int testStatus = 0;
     124psS32 test1b( void )
     125{
     126    psS32 testStatus = 0;
    127127    psPlaneTransform *myPT = psPlaneTransformAlloc(NX_TERMS, NY_TERMS);
    128128
     
    148148    return(testStatus);
    149149}
    150 int test1c( void )
    151 {
    152     int testStatus = 0;
     150psS32 test1c( void )
     151{
     152    psS32 testStatus = 0;
    153153    psPlaneDistort *myPD = psPlaneDistortAlloc(NW_TERMS, NX_TERMS, NY_TERMS, NZ_TERMS);
    154154
     
    195195#define N 10
    196196// We do a simple identity transformation on a few x,y pairs.
    197 int test2( void )
    198 {
    199     int i;
    200     int testStatus = 0;
     197psS32 test2( void )
     198{
     199    psS32 i;
     200    psS32 testStatus = 0;
    201201    psPlane in;
    202202    psPlane out;
     
    235235// We do a simple identity transformation on a few x,y pairs.  For x and y,
    236236// we add in the COLOR and MAGNITUDE.
    237 int test3( void )
    238 {
    239     int i;
    240     int testStatus = 0;
     237psS32 test3( void )
     238{
     239    psS32 i;
     240    psS32 testStatus = 0;
    241241    psPlane in;
    242242    psPlane out;
     
    277277#define DEG_INC 30.0
    278278// We do a simple identity transformation on a few RA, DEC pairs.
    279 int test4( void )
    280 {
    281     int testStatus = 0;
     279psS32 test4( void )
     280{
     281    psS32 testStatus = 0;
    282282    psSphere in;
    283283    psSphere out;
     
    315315}
    316316
    317 int test5( void )
    318 {
    319     int testStatus = 0;
     317psS32 test5( void )
     318{
     319    psS32 testStatus = 0;
    320320    psTime* now = psTimeGetTime(PS_TIME_UTC);
    321321    struct tm *tm_time = psTimeToTM(now);
     
    354354
    355355
    356 int test6( void )
    357 {
    358     int testStatus = 0;
     356psS32 test6( void )
     357{
     358    psS32 testStatus = 0;
    359359    psTime* now = psTimeGetTime(PS_TIME_UTC);
    360360    struct tm *tm_time = psTimeToTM(now);
     
    393393
    394394
    395 int test7( void )
    396 {
    397     int testStatus = 0;
     395psS32 test7( void )
     396{
     397    psS32 testStatus = 0;
    398398    // XXX: This test code is simply a copy of the original source code.
    399399    double phi = 62.6;
     
    426426}
    427427
    428 int test8( void )
    429 {
    430     int testStatus = 0;
     428psS32 test8( void )
     429{
     430    psS32 testStatus = 0;
    431431    // XXX: This test code is simply a copy of the original source code.
    432432    double phi = -62.6;
     
    459459}
    460460
    461 int test20( void )
    462 {
    463     int testStatus = 0;
     461psS32 test20( void )
     462{
     463    psS32 testStatus = 0;
    464464    psSphere in;
    465465    double R;
     
    553553
    554554#define SPACE_INC 10.0
    555 int test21( void )
    556 {
    557     int testStatus = 0;
     555psS32 test21( void )
     556{
     557    psS32 testStatus = 0;
    558558    psPlane in;
    559559    double R;
     
    649649}
    650650
    651 int test40( void )
    652 {
    653     int testStatus = 0;
     651psS32 test40( void )
     652{
     653    psS32 testStatus = 0;
    654654    psSphere position1;
    655655    psSphere position2;
     
    714714}
    715715
    716 int test41( void )
    717 {
    718     int testStatus = 0;
     716psS32 test41( void )
     717{
     718    psS32 testStatus = 0;
    719719    psSphere position1;
    720720    psSphere *position2;
  • trunk/psLib/test/astronomy/tst_psMetadataIO.c

    r1986 r2204  
    1313*  @author  Ross Harman, MHPCC
    1414*
    15 *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
    16 *  @date  $Date: 2004-10-06 22:51:31 $
     15*  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
     16*  @date  $Date: 2004-10-27 00:57:31 $
    1717*
    1818*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    8080        vec = (psVector*)metadataItem->data.V;
    8181        printf("Key Value: ");
    82         for(int i=0; i<vec->nalloc;i++) {
     82        for(psS32 i=0; i<vec->nalloc;i++) {
    8383            printf("%d ", vec->data.S32[i]);
    8484        }
     
    103103static void printMetadataTable(psHash *mdTable)
    104104{
    105     int i;
     105    psS32 i;
    106106    psHashBucket* ptr = NULL;
    107107    for(i=0; i<mdTable->nbucket; i++) {
     
    123123
    124124
    125 int main(int argc, char* argv[])
     125psS32 main(psS32 argc, char* argv[])
    126126{
    127127    // Test A - Read config file with overwrite set true
    128128    printPositiveTestHeader(stdout, "psMetadata", "Test A - Read config file with overwrite set true");
    129129    psMetadata *metadata1 = NULL;
    130     int failedLines1 = 0;
     130    psS32 failedLines1 = 0;
    131131    failedLines1 = psMetadataParseConfig(&metadata1, "test.config", true);
    132132    printf("Failed lines: %d Expected: 6\n", failedLines1);
     
    138138    printPositiveTestHeader(stdout, "psMetadata", "Test B - Read config file with overwrite set false");
    139139    psMetadata *metadata2 = NULL;
    140     int failedLines2 = 0;
     140    psS32 failedLines2 = 0;
    141141    failedLines2 = psMetadataParseConfig(&metadata2, "test.config", false);
    142142    printf("Failed lines: %d Expected: 7", failedLines2);
     
    148148    printPositiveTestHeader(stdout, "psMetadata", "Test C - Read config file without auto-allocation of metadata");
    149149    psMetadata *metadata3 = psMetadataAlloc();
    150     int failedLines3 = 0;
     150    psS32 failedLines3 = 0;
    151151    failedLines3 = psMetadataParseConfig(&metadata3, "test.config", false);
    152152    printf("Failed lines: %d Expected: 7", failedLines3);
     
    176176    psMemCheckLeaks(0, NULL, stdout);
    177177    psMemCheckCorruption(0);
    178     int nBad = psMemCheckCorruption(0);
     178    psS32 nBad = psMemCheckCorruption(0);
    179179    if(nBad) {
    180180        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/astronomy/tst_psMetadata_01.c

    r2153 r2204  
    1717*  @author  Ross Harman, MHPCC
    1818*
    19 *  @version $Revision: 1.12 $  $Name: not supported by cvs2svn $
    20 *  @date  $Date: 2004-10-15 19:26:31 $
     19*  @version $Revision: 1.13 $  $Name: not supported by cvs2svn $
     20*  @date  $Date: 2004-10-27 00:57:33 $
    2121*
    2222*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    9696static void printMetadataTable(psHash *mdTable)
    9797{
    98     int i;
     98    psS32 i;
    9999    psHashBucket* ptr = NULL;
    100100    for(i=0; i<mdTable->nbucket; i++) {
     
    116116
    117117
    118 int main(int argc, char* argv[])
     118psS32 main(psS32 argc, char* argv[])
    119119{
    120120    psMetadata *metadata1 = NULL;
     
    262262    psMemCheckLeaks(0, NULL, stdout);
    263263    psMemCheckCorruption(0);
    264     int nBad = psMemCheckCorruption(0);
     264    psS32 nBad = psMemCheckCorruption(0);
    265265    if(nBad) {
    266266        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/astronomy/tst_psMetadata_02.c

    r2012 r2204  
    1414*  @author  Ross Harman, MHPCC
    1515*
    16 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    17 *  @date  $Date: 2004-10-07 22:31:31 $
     16*  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     17*  @date  $Date: 2004-10-27 00:57:33 $
    1818*
    1919*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6060
    6161
    62 int main( int argc, char* argv[] )
     62psS32 main( psS32 argc, char* argv[] )
    6363{
    6464    psMetadataItem *item1 = NULL;
     
    136136    psMemCheckLeaks(0, NULL, stdout);
    137137    psMemCheckCorruption(0);
    138     int nBad = psMemCheckCorruption(0);
     138    psS32 nBad = psMemCheckCorruption(0);
    139139    if(nBad) {
    140140        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/astronomy/tst_psMetadata_03.c

    r2018 r2204  
    1414*  @author  Ross Harman, MHPCC
    1515*
    16 *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
    17 *  @date  $Date: 2004-10-08 01:33:14 $
     16*  @version $Revision: 1.8 $  $Name: not supported by cvs2svn $
     17*  @date  $Date: 2004-10-27 00:57:33 $
    1818*
    1919*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6060
    6161
    62 int main( int argc, char* argv[] )
     62psS32 main( psS32 argc, char* argv[] )
    6363{
    6464    psMetadataItem *item1 = NULL;
     
    231231    }
    232232    psMemCheckCorruption(0);
    233     int nBad = psMemCheckCorruption(0);
     233    psS32 nBad = psMemCheckCorruption(0);
    234234    if(nBad) {
    235235        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/astronomy/tst_psMetadata_04.c

    r2023 r2204  
    1818*  @author  Ross Harman, MHPCC
    1919*
    20 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    21 *  @date  $Date: 2004-10-08 20:53:21 $
     20*  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     21*  @date  $Date: 2004-10-27 00:57:33 $
    2222*
    2323*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6464
    6565
    66 int main( int argc, char* argv[] )
     66psS32 main( psS32 argc, char* argv[] )
    6767{
    6868    psMetadataItem *item1 = NULL;
     
    201201    }
    202202    psMemCheckCorruption(0);
    203     int nBad = psMemCheckCorruption(0);
     203    psS32 nBad = psMemCheckCorruption(0);
    204204    if(nBad) {
    205205        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/astronomy/tst_psMetadata_05.c

    r2049 r2204  
    2222*  @author  Ross Harman, MHPCC
    2323*
    24 *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
    25 *  @date  $Date: 2004-10-12 01:40:32 $
     24*  @version $Revision: 1.8 $  $Name: not supported by cvs2svn $
     25*  @date  $Date: 2004-10-27 00:57:33 $
    2626*
    2727*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6868
    6969
    70 int main( int argc, char* argv[] )
     70psS32 main( psS32 argc, char* argv[] )
    7171{
    72     long data;
     72    psS64 data;
    7373    psF32 fpdata;
    7474    psMetadataItem *item1 = NULL;
     
    271271    }
    272272    psMemCheckCorruption(0);
    273     int nBad = psMemCheckCorruption(0);
     273    psS32 nBad = psMemCheckCorruption(0);
    274274    if(nBad) {
    275275        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/astronomy/tst_psMetadata_06.c

    r2050 r2204  
    1313*  @author  Ross Harman, MHPCC
    1414*
    15 *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    16 *  @date  $Date: 2004-10-12 01:54:00 $
     15*  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     16*  @date  $Date: 2004-10-27 00:57:33 $
    1717*
    1818*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5959
    6060
    61 int main( int argc, char* argv[] )
     61psS32 main( psS32 argc, char* argv[] )
    6262{
    6363    psMetadataItem *item1a = NULL;
     
    134134    }
    135135    psMemCheckCorruption(0);
    136     int nBad = psMemCheckCorruption(0);
     136    psS32 nBad = psMemCheckCorruption(0);
    137137    if(nBad) {
    138138        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/astronomy/tst_psTime_01.c

    r2048 r2204  
    2323 *  @author  Ross Harman, MHPCC
    2424 *
    25  *  @version $Revision: 1.12 $  $Name: not supported by cvs2svn $
    26  *  @date  $Date: 2004-10-12 01:34:09 $
     25 *  @version $Revision: 1.13 $  $Name: not supported by cvs2svn $
     26 *  @date  $Date: 2004-10-27 00:57:33 $
    2727 *
    2828 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3434#include <string.h>
    3535
    36 int main(int argc, char* argv[])
     36psS32 main(psS32 argc, char* argv[])
    3737{
    3838    psTime *testTime;
     
    5555    // Test B - Print test time
    5656    printPositiveTestHeader(stdout,"psTime", "Print test time");
    57     printf("Test time: Seconds = %ld Microseconds = %ld\n", (long)testTime->sec, (long)testTime->usec);
     57    printf("Test time: Seconds = %ld Microseconds = %ld\n", (psS64)testTime->sec, (psS64)testTime->usec);
    5858    printFooter(stdout, "psTime", "Print test time", true);
    5959
     
    7575    psTime *timeD = NULL;
    7676    timeD = psTimeFromISOTime(isoString);
    77     printf("psTime: Seconds = %ld Microseconds = %d\n", (long)timeD->sec, (psU32)timeD->usec);
     77    printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeD->sec, (psU32)timeD->usec);
    7878    psFree(isoString);
    7979    psFree(timeD);
     
    9090    timeE = psTimeConvert(timeE, PS_TIME_UTC);
    9191    psFree(timeE);
    92     printf("psTime: Seconds = %ld Microseconds = %d\n", (long)timeE->sec, (psU32)timeE->usec);
     92    printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeE->sec, (psU32)timeE->usec);
    9393    printFooter(stdout, "psTime", "Convert psTime time to UTC time", true);
    9494
     
    103103    timeF = psTimeConvert(timeF, PS_TIME_TAI);
    104104    psFree(timeF);
    105     printf("psTime: Seconds = %ld Microseconds = %d\n", (long)timeF->sec, (psU32)timeF->usec);
     105    printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeF->sec, (psU32)timeF->usec);
    106106    printFooter(stdout, "psTime", "Convert UTC time to psTime", true);
    107107
     
    119119    psTime *timeH = NULL;
    120120    timeH = psTimeFromMJD(mjdTime);
    121     printf("psTime: Seconds = %ld Microseconds = %d\n", (long)timeH->sec, (psU32)timeH->usec);
     121    printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeH->sec, (psU32)timeH->usec);
    122122    psFree(timeH);
    123123    printFooter(stdout, "psTime", "Convert MJD time to psTime", true);
     
    136136    psTime *timeJ = NULL;
    137137    timeJ = psTimeFromJD(jdTime);
    138     printf("psTime: Seconds = %ld Microseconds = %d\n", (long)timeJ->sec, (psU32)timeJ->usec);
     138    printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeJ->sec, (psU32)timeJ->usec);
    139139    psFree(timeJ);
    140140    printFooter(stdout, "psTime", "Convert JD time to psTime", true);
     
    145145    struct timeval timevalTime;
    146146    timevalTime = psTimeToTimeval(testTime);
    147     printf("timevalTime: Seconds = %ld Microseconds = %ld\n", (long)timevalTime.tv_sec, (long)timevalTime.tv_usec);
     147    printf("timevalTime: Seconds = %ld Microseconds = %ld\n", (psS64)timevalTime.tv_sec, (psS64)timevalTime.tv_usec);
    148148    printFooter(stdout, "psTime", "Convert psTime to timeval time", true);
    149149
     
    153153    psTime *timeL = NULL;
    154154    timeL = psTimeFromTimeval(&timevalTime);
    155     printf("psTime: Seconds = %ld Microseconds = %d\n", (long)timeL->sec, (psU32)timeL->usec);
     155    printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeL->sec, (psU32)timeL->usec);
    156156    psFree(timeL);
    157157    printFooter(stdout, "psTime", "Convert timeval time to psTime", true);
     
    176176    psTime *timeN = NULL;
    177177    timeN = psTimeFromTM(tmTime);
    178     printf("psTime: Seconds = %ld Microseconds = %d\n", (long)timeN->sec, (psU32)timeN->usec);
     178    printf("psTime: Seconds = %ld Microseconds = %d\n", (psS64)timeN->sec, (psU32)timeN->usec);
    179179    psFree(timeN);
    180180    psFree(tmTime);
     
    198198    psMemCheckLeaks(0, NULL, stdout);
    199199    psMemCheckCorruption(0);
    200     int nBad = psMemCheckCorruption(0);
     200    psS32 nBad = psMemCheckCorruption(0);
    201201    if(nBad) {
    202202        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/astronomy/tst_psTime_02.c

    r2177 r2204  
    1010 *  @author  Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
    13  *  @date  $Date: 2004-10-20 20:02:46 $
     12 *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
     13 *  @date  $Date: 2004-10-27 00:57:33 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2020#include "psTest.h"
    2121
    22 int main(int argc, char* argv[])
     22psS32 main(psS32 argc, char* argv[])
    2323{
    2424
     
    4444    psMemCheckLeaks(0, NULL, stdout);
    4545    psMemCheckCorruption(0);
    46     int nBad = psMemCheckCorruption(0);
     46    psS32 nBad = psMemCheckCorruption(0);
    4747    if(nBad) {
    4848        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/astronomy/tst_psTime_03.c

    r2177 r2204  
    1212 *  @author  Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
    15  *  @date  $Date: 2004-10-20 20:03:10 $
     14 *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
     15 *  @date  $Date: 2004-10-27 00:57:33 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2323
    2424#define PRINT_TIME(TEXT,TIME) \
    25 printf("%s Seconds = %ld Microseconds = %u\n", TEXT, (long int)TIME->sec, TIME->usec);
     25printf("%s Seconds = %ld Microseconds = %u\n", TEXT, (psS64)TIME->sec, TIME->usec);
    2626
    27 int main(int argc, char* argv[])
     27psS32 main(psS32 argc, char* argv[])
    2828{
    2929
     
    135135    psMemCheckLeaks(0, NULL, stdout);
    136136    psMemCheckCorruption(0);
    137     int nBad = psMemCheckCorruption(0);
     137    psS32 nBad = psMemCheckCorruption(0);
    138138    if(nBad) {
    139139        printf("ERROR: Found %d bad memory blocks\n", nBad);
Note: See TracChangeset for help on using the changeset viewer.