IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 9, 2004, 4:50:16 PM (22 years ago)
Author:
desonia
Message:

Changed psList API for iterators, etc.

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

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astronomy/Makefile

    r2521 r2681  
    33##  Makefile:   test/astronomy
    44##
    5 ##  $Revision: 1.23 $  $Name: not supported by cvs2svn $
    6 ##  $Date: 2004-11-30 00:28:36 $
     5##  $Revision: 1.24 $  $Name: not supported by cvs2svn $
     6##  $Date: 2004-12-10 02:50:15 $
    77##
    88##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131         tst_psMetadata_06 \
    3232         tst_psMetadata_07 \
    33          tst_psCoord \
    3433         tst_psAstrometry \
    3534         tst_psAstrometry01
     35#         tst_psCoord \
    3636
    3737OBJS = $(addprefix builddir/,$(addsuffix .o,$(TARGET)))
  • trunk/psLib/test/astronomy/tst_psMetadataIO.c

    r2607 r2681  
    1313*  @author  Ross Harman, MHPCC
    1414*
    15 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
    16 *  @date  $Date: 2004-12-03 23:19:07 $
     15*  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
     16*  @date  $Date: 2004-12-10 02:50:15 $
    1717*
    1818*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4141    psMetadataItem *entryChild = NULL;
    4242
    43     psListSetIterator(metadataItemList, PS_LIST_HEAD);
    44     entryChild = psListGetCurrent(metadataItemList);
    45     while (entryChild != NULL) {
     43    psListIterator* iter = psListIteratorAlloc(metadataItemList, PS_LIST_HEAD);
     44
     45    while ( (entryChild=psListGetNext(iter)) != NULL) {
    4646        printMetadataItem(entryChild, spaces);
    47         entryChild = psListGetNext(metadataItemList);
    4847    }
     48
     49    psFree(iter);
    4950}
    5051
  • trunk/psLib/test/astronomy/tst_psMetadata_01.c

    r2607 r2681  
    1818*  @author  Ross Harman, MHPCC
    1919*
    20 *  @version $Revision: 1.16 $  $Name: not supported by cvs2svn $
    21 *  @date  $Date: 2004-12-03 23:19:07 $
     20*  @version $Revision: 1.17 $  $Name: not supported by cvs2svn $
     21*  @date  $Date: 2004-12-10 02:50:15 $
    2222*
    2323*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4646    psMetadataItem *entryChild = NULL;
    4747
    48     psListSetIterator(metadataItemList, PS_LIST_HEAD);
    49     entryChild = psListGetCurrent(metadataItemList);
    50     while (entryChild != NULL) {
     48    psListIterator* iter = psListIteratorAlloc(metadataItemList, PS_LIST_HEAD);
     49
     50    while ( (entryChild=psListGetNext(iter)) != NULL) {
    5151        printMetadataItem(entryChild, spaces);
    52         entryChild = psListGetNext(metadataItemList);
    53     }
     52    }
     53
     54    psFree(iter);
     55
    5456}
    5557
  • trunk/psLib/test/astronomy/tst_psTime_01.c

    r2526 r2681  
    2323 *  @author  Ross Harman, MHPCC
    2424 *
    25  *  @version $Revision: 1.16 $  $Name: not supported by cvs2svn $
    26  *  @date  $Date: 2004-11-30 01:14:08 $
     25 *  @version $Revision: 1.17 $  $Name: not supported by cvs2svn $
     26 *  @date  $Date: 2004-12-10 02:50:15 $
    2727 *
    2828 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    5555    // Test B - Print test time
    5656    printPositiveTestHeader(stdout,"psTime", "Print test time");
    57     printf("Test time: Seconds = %lld Microseconds = %u\n", testTime->sec, testTime->usec);
     57    printf("Test time: Seconds = %lld Microseconds = %u\n",
     58           (long long int)testTime->sec,
     59           testTime->usec);
    5860    printFooter(stdout, "psTime", "Print test time", true);
    5961
     
    7577    psTime *timeD = NULL;
    7678    timeD = psTimeFromISOTime(isoString);
    77     printf("psTime: Seconds = %lld Microseconds = %u\n", timeD->sec, timeD->usec);
     79    printf("psTime: Seconds = %lld Microseconds = %u\n",
     80           (long long int)timeD->sec,
     81           timeD->usec);
    7882    psFree(isoString);
    7983    psFree(timeD);
     
    9094    timeE = psTimeConvert(timeE, PS_TIME_UTC);
    9195    psFree(timeE);
    92     printf("psTime: Seconds = %lld Microseconds = %u\n", timeE->sec, timeE->usec);
     96    printf("psTime: Seconds = %lld Microseconds = %u\n",
     97           (long long int)timeE->sec,
     98           timeE->usec);
    9399    printFooter(stdout, "psTime", "Convert psTime time to UTC time", true);
    94100
     
    103109    timeF = psTimeConvert(timeF, PS_TIME_TAI);
    104110    psFree(timeF);
    105     printf("psTime: Seconds = %lld Microseconds = %u\n", timeF->sec, timeF->usec);
     111    printf("psTime: Seconds = %lld Microseconds = %u\n",
     112           (long long int)timeF->sec,
     113           timeF->usec);
    106114    printFooter(stdout, "psTime", "Convert UTC time to psTime", true);
    107115
     
    119127    psTime *timeH = NULL;
    120128    timeH = psTimeFromMJD(mjdTime);
    121     printf("psTime: Seconds = %lld Microseconds = %u\n", timeH->sec, timeH->usec);
     129    printf("psTime: Seconds = %lld Microseconds = %u\n",
     130           (long long int)timeH->sec,
     131           timeH->usec);
    122132    psFree(timeH);
    123133    printFooter(stdout, "psTime", "Convert MJD time to psTime", true);
     
    136146    psTime *timeJ = NULL;
    137147    timeJ = psTimeFromJD(jdTime);
    138     printf("psTime: Seconds = %lld Microseconds = %u\n", timeJ->sec, timeJ->usec);
     148    printf("psTime: Seconds = %lld Microseconds = %u\n",
     149           (long long int)timeJ->sec,
     150           timeJ->usec);
    139151    psFree(timeJ);
    140152    printFooter(stdout, "psTime", "Convert JD time to psTime", true);
     
    145157    struct timeval timevalTime;
    146158    timevalTime = psTimeToTimeval(testTime);
    147     printf("timevalTime: Seconds = %lld Microseconds = %lld\n", (psS64)timevalTime.tv_sec, (psS64)timevalTime.tv_usec);
     159    printf("timevalTime: Seconds = %lld Microseconds = %lld\n",
     160           (long long int)timevalTime.tv_sec,
     161           (long long int)timevalTime.tv_usec);
    148162    printFooter(stdout, "psTime", "Convert psTime to timeval time", true);
    149163
     
    153167    psTime *timeL = NULL;
    154168    timeL = psTimeFromTimeval(&timevalTime);
    155     printf("psTime: Seconds = %lld Microseconds = %u\n", timeL->sec, timeL->usec);
     169    printf("psTime: Seconds = %lld Microseconds = %u\n",
     170           (long long int)timeL->sec,
     171           timeL->usec);
    156172    psFree(timeL);
    157173    printFooter(stdout, "psTime", "Convert timeval time to psTime", true);
     
    176192    psTime *timeN = NULL;
    177193    timeN = psTimeFromTM(tmTime);
    178     printf("psTime: Seconds = %lld Microseconds = %u\n", timeN->sec, timeN->usec);
     194    printf("psTime: Seconds = %lld Microseconds = %u\n",
     195           (long long int)timeN->sec,
     196           timeN->usec);
    179197    psFree(timeN);
    180198    psFree(tmTime);
  • trunk/psLib/test/astronomy/tst_psTime_03.c

    r2392 r2681  
    1212 *  @author  Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    15  *  @date  $Date: 2004-11-22 20:52:45 $
     14 *  @version $Revision: 1.5 $  $Name: not supported by cvs2svn $
     15 *  @date  $Date: 2004-12-10 02:50:15 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2323
    2424#define PRINT_TIME(TEXT,TIME) \
    25 printf("%s Seconds = %lld Microseconds = %u\n", TEXT, TIME->sec, TIME->usec);
     25printf("%s Seconds = %lld Microseconds = %u\n", TEXT, (long long int)TIME->sec, TIME->usec);
    2626
    2727psS32 main(psS32 argc, char* argv[])
Note: See TracChangeset for help on using the changeset viewer.