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/collections
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/collections/tst_psArray.c

    r1920 r2204  
    1212 *  @author  Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    15  *  @date  $Date: 2004-09-28 23:26:49 $
     14 *  @version $Revision: 1.4 $  $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
     
    2626typedef struct
    2727{
    28     int x;
     28    psS32 x;
    2929    float y;
    3030}
     
    3232
    3333
    34 int main(int argc,
    35          char* argv[])
     34psS32 main(psS32 argc,
     35           char* argv[])
    3636{
    3737    // Create array of pointers
     
    5151    // Test B - Add data to void pointer array
    5252    printPositiveTestHeader(stdout, "psArray", "Add data to void pointer array");
    53     for(int i = 0; i < 5; i++) {
     53    for(psS32 i = 0; i < 5; i++) {
    5454        testStruct *ts = psAlloc(sizeof(testStruct));
    5555        ts->x = 10*i;
     
    6060    }
    6161
    62     for(int i = 0; i < 5; i++) {
     62    for(psS32 i = 0; i < 5; i++) {
    6363        testStruct *ts = (testStruct*)psArr->data[i];
    6464        printf("ts[%d].x = %d ts[%d].y = %.2f\n", i, ts->x, i, ts->y);
     
    8585    psArr = psArrayRealloc(psArr,10);
    8686    printf("Adding more elements to void pointer array...\n");
    87     for(int i = 5; i < 10; i++) {
     87    for(psS32 i = 5; i < 10; i++) {
    8888        testStruct *ts = psAlloc(sizeof(testStruct));
    8989        ts->x = 10*i;
     
    9494        psMemIncrRefCounter(ts);
    9595    }
    96     for(int i = 0; i < 10; i++) {
     96    for(psS32 i = 0; i < 10; i++) {
    9797        testStruct *ts = (testStruct*)psArr->data[i];
    9898        printf("ts[%d].x = %d ts[%d].y = %.2f\n", i, ts->x, i, ts->y);
     
    118118    printPositiveTestHeader(stdout,"psArray","Reallocate void pointer array smaller");
    119119    psArr = psArrayRealloc(psArr,3);
    120     for(int i = 0; i < 3; i++) {
     120    for(psS32 i = 0; i < 3; i++) {
    121121        testStruct *ts = (testStruct*)psArr->data[i];
    122122        printf("ts[%d].x = %d ts[%d].y = %.2f\n", i, ts->x, i, ts->y);
     
    142142    printPositiveTestHeader(stdout, "psArray", "Free void pointer array");
    143143    psFree(psArr);
    144     for(int i = 0; i < 10; i++) {
     144    for(psS32 i = 0; i < 10; i++) {
    145145        psFree(mySt[i]);
    146146    }
    147147    psMemCheckLeaks(0, NULL, stdout);
    148     int nBad = psMemCheckCorruption(0);
     148    psS32 nBad = psMemCheckCorruption(0);
    149149    if(nBad) {
    150150        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/collections/tst_psBitSet.c

    r1807 r2204  
    1717 *  @author  Ross Harman, MHPCC
    1818 *
    19  *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
    20  *  @date  $Date: 2004-09-14 20:01:52 $
     19 *  @version $Revision: 1.2 $  $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
     
    2727#include "psTest.h"
    2828
    29 static int testBitSet01a(void);
    30 static int testBitSet01b(void);
    31 static int testBitSet01c(void);
    32 static int testBitSet02(void);
    33 static int testBitSet03(void);
    34 static int testBitSet04(void);
    35 static int testBitSet05(void);
    36 static int testBitSet06(void);
     29static psS32 testBitSet01a(void);
     30static psS32 testBitSet01b(void);
     31static psS32 testBitSet01c(void);
     32static psS32 testBitSet02(void);
     33static psS32 testBitSet03(void);
     34static psS32 testBitSet04(void);
     35static psS32 testBitSet05(void);
     36static psS32 testBitSet06(void);
    3737
    3838testDescription tests[] = {
     
    5050
    5151
    52 int main( int argc, char* argv[] )
     52psS32 main( psS32 argc, char* argv[] )
    5353{
    5454    psLogSetLevel( PS_LOG_INFO );
     
    5757}
    5858
    59 int testBitSet01a(void)
     59psS32 testBitSet01a(void)
    6060{
    6161    psErr* err;
     
    109109}
    110110
    111 int testBitSet01b(void)
     111psS32 testBitSet01b(void)
    112112{
    113113    char *binOut = NULL;
     
    212212}
    213213
    214 static int testBitSet01c(void)
     214static psS32 testBitSet01c(void)
    215215{
    216216    psBitSet* bs = psBitSetAlloc(24);
     
    275275}
    276276
    277 int testBitSet02()
     277psS32 testBitSet02()
    278278{
    279279    char *binOut1 = NULL;
     
    284284    psBitSet* bs2 = psBitSetAlloc(24);
    285285    psBitSet* and = psBitSetAlloc(24);
    286     for(int i=0; i<24; i++) {
     286    for(psS32 i=0; i<24; i++) {
    287287        if ((i & 2) == 0) {
    288288            bs1 = psBitSetSet(bs1, i);
     
    312312    }
    313313
    314     for(int i=0; i<24; i++) {
    315         bool truth = psBitSetTest(and,i);
    316         bool res = psBitSetTest(outbs,i);
     314    for(psS32 i=0; i<24; i++) {
     315        psBool truth = psBitSetTest(and,i);
     316        psBool res = psBitSetTest(outbs,i);
    317317        if ( res != truth) {
    318318            binOut1 = psBitSetToString(bs1);
     
    331331        psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result");
    332332    }
    333     for(int i=0; i<24; i++) {
    334         bool truth = psBitSetTest(and,i);
    335         bool res = psBitSetTest(outbs,i);
     333    for(psS32 i=0; i<24; i++) {
     334        psBool truth = psBitSetTest(and,i);
     335        psBool res = psBitSetTest(outbs,i);
    336336        if ( res != truth) {
    337337            binOut1 = psBitSetToString(bs1);
     
    351351}
    352352
    353 static int testBitSet03(void)
     353static psS32 testBitSet03(void)
    354354{
    355355    char *binOut1 = NULL;
     
    360360    psBitSet* bs2 = psBitSetAlloc(24);
    361361    psBitSet* or = psBitSetAlloc(24);
    362     for(int i=0; i<24; i++) {
     362    for(psS32 i=0; i<24; i++) {
    363363        if ((i/2) % 2) {
    364364            bs1 = psBitSetSet(bs1, i);
     
    389389    }
    390390
    391     for(int i=0; i<24; i++) {
    392         bool truth = psBitSetTest(or,i);
    393         bool res = psBitSetTest(outbs,i);
     391    for(psS32 i=0; i<24; i++) {
     392        psBool truth = psBitSetTest(or,i);
     393        psBool res = psBitSetTest(outbs,i);
    394394        if ( res != truth) {
    395395            binOut1 = psBitSetToString(bs1);
     
    408408        psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result");
    409409    }
    410     for(int i=0; i<24; i++) {
    411         bool truth = psBitSetTest(or,i);
    412         bool res = psBitSetTest(outbs,i);
     410    for(psS32 i=0; i<24; i++) {
     411        psBool truth = psBitSetTest(or,i);
     412        psBool res = psBitSetTest(outbs,i);
    413413        if ( res != truth) {
    414414            binOut1 = psBitSetToString(bs1);
     
    429429}
    430430
    431 static int testBitSet04(void)
     431static psS32 testBitSet04(void)
    432432{
    433433    char *binOut1 = NULL;
     
    438438    psBitSet* bs2 = psBitSetAlloc(24);
    439439    psBitSet* xor = psBitSetAlloc(24);
    440     for(int i=0; i<24; i++) {
     440    for(psS32 i=0; i<24; i++) {
    441441        if ((i/2) % 2) {
    442442            bs1 = psBitSetSet(bs1, i);
     
    467467    }
    468468
    469     for(int i=0; i<24; i++) {
    470         bool truth = psBitSetTest(xor,i);
    471         bool res = psBitSetTest(outbs,i);
     469    for(psS32 i=0; i<24; i++) {
     470        psBool truth = psBitSetTest(xor,i);
     471        psBool res = psBitSetTest(outbs,i);
    472472        if ( res != truth) {
    473473            binOut1 = psBitSetToString(bs1);
     
    486486        psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result");
    487487    }
    488     for(int i=0; i<24; i++) {
    489         bool truth = psBitSetTest(xor,i);
    490         bool res = psBitSetTest(outbs,i);
     488    for(psS32 i=0; i<24; i++) {
     489        psBool truth = psBitSetTest(xor,i);
     490        psBool res = psBitSetTest(outbs,i);
    491491        if ( res != truth) {
    492492            binOut1 = psBitSetToString(bs1);
     
    507507}
    508508
    509 static int testBitSet05(void)
     509static psS32 testBitSet05(void)
    510510{
    511511    char *binOut1 = NULL;
     
    514514    psBitSet* bs1 = psBitSetAlloc(24);
    515515    psBitSet* not = psBitSetAlloc(24);
    516     for(int i=0; i<24; i++) {
     516    for(psS32 i=0; i<24; i++) {
    517517        if (i % 2) {
    518518            bs1 = psBitSetSet(bs1, i);
     
    538538    }
    539539
    540     for(int i=0; i<24; i++) {
    541         bool truth = psBitSetTest(not,i);
    542         bool res = psBitSetTest(outbs,i);
     540    for(psS32 i=0; i<24; i++) {
     541        psBool truth = psBitSetTest(not,i);
     542        psBool res = psBitSetTest(outbs,i);
    543543        if ( res != truth) {
    544544            binOut1 = psBitSetToString(bs1);
     
    556556        psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result");
    557557    }
    558     for(int i=0; i<24; i++) {
    559         bool truth = psBitSetTest(not,i);
    560         bool res = psBitSetTest(outbs,i);
     558    for(psS32 i=0; i<24; i++) {
     559        psBool truth = psBitSetTest(not,i);
     560        psBool res = psBitSetTest(outbs,i);
    561561        if ( res != truth) {
    562562            binOut1 = psBitSetToString(bs1);
     
    575575}
    576576
    577 static int testBitSet06(void)
     577static psS32 testBitSet06(void)
    578578{
    579579    psErr* err;
  • trunk/psLib/test/collections/tst_psHash00.c

    r1421 r2204  
    88#include "psHash.h"
    99#define NUM_HASH_TABLE_BUCKETS 10
    10 int main()
     10psS32 main()
    1111{
    1212    psHash *myHashTable = NULL;
    13     int testStatus      = true;
    14     int i               = 0;
    15     int currentId = psMemGetId();
    16     int memLeaks        = 0;
     13    psS32 testStatus      = true;
     14    psS32 i               = 0;
     15    psS32 currentId = psMemGetId();
     16    psS32 memLeaks        = 0;
    1717    printPositiveTestHeader(stdout,
    1818                            "psHash functions",
  • trunk/psLib/test/collections/tst_psHash01.c

    r1811 r2204  
    77#include "psHash.h"
    88#define NUM_HASH_TABLE_BUCKETS 100
    9 int imGlobal = 0;
     9psS32 imGlobal = 0;
    1010
    1111typedef struct
     
    3232}
    3333
    34 int main()
     34psS32 main()
    3535{
    3636    psHash *myHashTable = NULL;
    37     int testStatus      = true;
    38     int currentId = psMemGetId();
     37    psS32 testStatus      = true;
     38    psS32 currentId = psMemGetId();
    3939    ID* id = NULL;
    40     int memLeaks        = 0;
     40    psS32 memLeaks        = 0;
    4141
    4242    printPositiveTestHeader(stdout,
  • trunk/psLib/test/collections/tst_psHash02.c

    r1421 r2204  
    1212#include "psHash.h"
    1313#define NUM_HASH_TABLE_BUCKETS 100
    14 int imGlobal = 0;
     14psS32 imGlobal = 0;
    1515
    1616typedef struct
     
    3636}
    3737
    38 int main()
     38psS32 main()
    3939{
    4040    psHash *myHashTable = NULL;
    41     int testStatus      = true;
    42     int i               = 0;
     41    psS32 testStatus      = true;
     42    psS32 i               = 0;
    4343    ID *id = NULL;
    4444    char *myKeys[] = {"ENTRY00", "ENTRY01", "ENTRY02", "ENTRY03", NULL
     
    4646    char *myData[] = {"IDA", "IDB", "IDC", "IDD", NULL
    4747                     };
    48     int currentId = psMemGetId();
    49     int memLeaks        = 0;
     48    psS32 currentId = psMemGetId();
     49    psS32 memLeaks        = 0;
    5050
    5151    printPositiveTestHeader(stdout,
  • trunk/psLib/test/collections/tst_psHash03.c

    r1811 r2204  
    1111#include "psMemory.h"
    1212#define NUM_HASH_TABLE_BUCKETS 100
    13 int imGlobal = 0;
    14 int currentId = 0;
     13psS32 imGlobal = 0;
     14psS32 currentId = 0;
    1515
    1616typedef struct
     
    2727    psMemBlock **memBlocks = NULL;
    2828    psMemBlock *tmp = NULL;
    29     int numBlocks = 0;
     29    psS32 numBlocks = 0;
    3030
    3131    numBlocks = psMemCheckLeaks(currentId, &memBlocks, NULL);
     
    3636    if (memBlocks != NULL) {
    3737        for (tmp = *memBlocks; tmp != NULL; tmp = tmp->nextBlock) {
    38             printf("%d ", (int) tmp->id);
     38            printf("%d ", (psS32) tmp->id);
    3939        }
    4040    }
     
    6262}
    6363
    64 int main()
     64psS32 main()
    6565{
    6666    psHash *myHashTable = NULL;
    67     int testStatus      = true;
    68     int i               = 0;
    69     int TotalKeys       = 0;
    70     bool retVal         = false;
     67    psS32 testStatus      = true;
     68    psS32 i               = 0;
     69    psS32 TotalKeys       = 0;
     70    psBool retVal         = false;
    7171    ID *id = NULL;
    7272    ID *ids[4];
     
    7575    char *myData[] = {"IDA", "IDB", "IDC", "IDD", NULL
    7676                     };
    77     int memLeaks        = 0;
     77    psS32 memLeaks        = 0;
    7878
    7979    currentId = psMemGetId();
  • trunk/psLib/test/collections/tst_psHash04.c

    r1421 r2204  
    77#include "psHash.h"
    88#define NUM_HASH_TABLE_BUCKETS 100
    9 int imGlobal = 0;
     9psS32 imGlobal = 0;
    1010
    1111typedef struct
     
    3232}
    3333
    34 int main()
     34psS32 main()
    3535{
    3636    psHash *myHashTable = NULL;
    37     int testStatus      = true;
    38     int i               = 0;
     37    psS32 testStatus      = true;
     38    psS32 i               = 0;
    3939    char *myKeys[] = {"ENTRY00", "ENTRY01", "ENTRY02", "ENTRY03", NULL
    4040                     };
    4141    char *myData[] = {"IDA", "IDB", "IDC", "IDD", NULL
    4242                     };
    43     int currentId = psMemGetId();
    44     int memLeaks        = 0;
     43    psS32 currentId = psMemGetId();
     44    psS32 memLeaks        = 0;
    4545    psList *myLinkList = NULL;
    4646    psListElem *tmp = NULL;
  • trunk/psLib/test/collections/tst_psList.c

    r1749 r2204  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-09-09 02:24:59 $
     8 *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-27 00:57:33 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1818
    1919
    20 static int testListAlloc(void);
    21 static int testListAdd(void);
    22 static int testListGet(void);
    23 static int testListRemove(void);
    24 static int testListConvert(void);
    25 static int testListIterator(void);
    26 static int testListFree(void);
    27 static int testListSort(void);
     20static psS32 testListAlloc(void);
     21static psS32 testListAdd(void);
     22static psS32 testListGet(void);
     23static psS32 testListRemove(void);
     24static psS32 testListConvert(void);
     25static psS32 testListIterator(void);
     26static psS32 testListFree(void);
     27static psS32 testListSort(void);
    2828
    2929testDescription tests[] = {
     
    3939                          };
    4040
    41 int main(int argc, char* argv[])
     41psS32 main(psS32 argc, char* argv[])
    4242{
    4343    psLogSetLevel(PS_LOG_INFO);
     
    5050}
    5151
    52 int testListAlloc(void)
     52psS32 testListAlloc(void)
    5353{
    5454    psList* list;
    55     int ref;
     55    psS32 ref;
    5656    float* data;
    5757
     
    117117}
    118118
    119 int testListAdd(void)
     119psS32 testListAdd(void)
    120120{
    121121    psList* list = NULL;
    122     int* data = NULL;
     122    psS32* data = NULL;
    123123
    124124    psLogMsg(__func__,PS_LOG_INFO,"psListAdd shall add an element to list");
     
    134134    */
    135135
    136     data = psAlloc(sizeof(int));
     136    data = psAlloc(sizeof(psS32));
    137137    *data = 1;
    138138
     
    161161
    162162    //  3. where is PS_LIST_HEAD or PS_LIST_TAIL
    163     data = psAlloc(sizeof(int));
     163    data = psAlloc(sizeof(psS32));
    164164    *data = 2;
    165165    if ( ! psListAdd(list,PS_LIST_HEAD,data) ) {
     
    181181
    182182    // verify that the head is the inserted data item
    183     if (*(int*)list->head->data != 2) {
     183    if (*(psS32*)list->head->data != 2) {
    184184        psError(__func__,"psListAdd with PS_LIST_HEAD didn't insert at the head.");
    185185        return 5;
    186186    }
    187187
    188     data = psAlloc(sizeof(int));
     188    data = psAlloc(sizeof(psS32));
    189189    *data = 3;
    190190    if ( ! psListAdd(list,PS_LIST_TAIL,data) ) {
     
    205205
    206206    // verify that the head is still the same
    207     if (*(int*)list->head->data != 2) {
     207    if (*(psS32*)list->head->data != 2) {
    208208        psError(__func__,"psListAdd with PS_LIST_TAIL modified the head.");
    209209        return 7;
     
    211211
    212212    // verify that the tail is the data item inserted
    213     if (*(int*)list->tail->data != 3) {
     213    if (*(psS32*)list->tail->data != 3) {
    214214        psError(__func__,"psListAdd with PS_LIST_TAIL didn't insert at the tail.");
    215215        return 8;
     
    218218    // 4. where is not PS_LIST_* but <0
    219219
    220     data = psAlloc(sizeof(int));
     220    data = psAlloc(sizeof(psS32));
    221221    *data = 4;
    222222    psLogMsg(__func__,PS_LOG_INFO,"Following should error with invalid insert location");
     
    239239
    240240    // 5. where is >0
    241     data = psAlloc(sizeof(int));
     241    data = psAlloc(sizeof(psS32));
    242242    *data = 5;
    243243
     
    253253    psFree(data);
    254254    // verify that the size incremented
    255     if (list->size != 4 || *(int*)list->head->next->data != 5) {
     255    if (list->size != 4 || *(psS32*)list->head->next->data != 5) {
    256256        printListInt(list);
    257257        psError(__func__,"psListAdd didn't insert to position #1.");
     
    259259    }
    260260
    261     data = psAlloc(sizeof(int));
     261    data = psAlloc(sizeof(psS32));
    262262    *data = 6;
    263263    if ( ! psListAdd(list,3,data) ) {
     
    271271    psFree(data);
    272272    // verify that the size incremented
    273     if (list->size != 5  || *(int *)list->head->next->next->next->data != 6) {
     273    if (list->size != 5  || *(psS32 *)list->head->next->next->next->data != 6) {
    274274        printListInt(list);
    275275        psError(__func__,"psListAdd didn't insert to position #4.");
     
    277277    }
    278278
    279     data = psAlloc(sizeof(int));
     279    data = psAlloc(sizeof(psS32));
    280280    *data = 7;
    281281    if ( ! psListAdd(list,2,data) ) {
     
    289289    psFree(data);
    290290    // verify that the size incremented
    291     if (list->size != 6  || *(int *)list->head->next->next->data != 7) {
     291    if (list->size != 6  || *(psS32 *)list->head->next->next->data != 7) {
    292292        printListInt(list);
    293293        psError(__func__,"psListAdd didn't insert to position #2.");
     
    295295    }
    296296
    297     data = psAlloc(sizeof(int));
     297    data = psAlloc(sizeof(psS32));
    298298    *data = 7;
    299299    psLogMsg(__func__,PS_LOG_INFO,"Following should be a warning.");
     
    325325void printListInt(psList* list)
    326326{
    327     int* data = NULL;
    328     bool first = true;
     327    psS32* data = NULL;
     328    psBool first = true;
    329329
    330330    psListSetIterator(list,PS_LIST_HEAD);
     
    333333    while ( data != NULL ) {
    334334        if (!first) {
    335             printf(", %d",*(int*)data);
     335            printf(", %d",*(psS32*)data);
    336336        } else {
    337             printf("%d",*(int*)data);
     337            printf("%d",*(psS32*)data);
    338338            first = false;
    339339        }
     
    345345
    346346
    347 int testListGet(void)
     347psS32 testListGet(void)
    348348{
    349349    psList* list = NULL;
    350     int* data;
     350    psS32* data;
    351351
    352352    /*
     
    371371
    372372    // create a list
    373     data = psAlloc(sizeof(int));
     373    data = psAlloc(sizeof(psS32));
    374374    *data = 0;
    375375    list = psListAlloc(data);
    376376    psFree(data);
    377377
    378     data = psAlloc(sizeof(int));
     378    data = psAlloc(sizeof(psS32));
    379379    *data = 1;
    380380    psListAdd(list,PS_LIST_TAIL,data);
    381381    psFree(data);
    382382
    383     data = psAlloc(sizeof(int));
     383    data = psAlloc(sizeof(psS32));
    384384    *data = 2;
    385385    psListAdd(list,PS_LIST_TAIL,data);
    386386    psFree(data);
    387387
    388     data = psAlloc(sizeof(int));
     388    data = psAlloc(sizeof(psS32));
    389389    *data = 3;
    390390    psListAdd(list,PS_LIST_TAIL,data);
     
    392392
    393393    //  2. which>0 and which<list.n.
    394     data = (int*)psListGet(list,3);
     394    data = (psS32*)psListGet(list,3);
    395395    if (data == NULL || *data != 3) {
    396396        psError(__func__,"psListGet failed with which=3");
    397397        return 2;
    398398    }
    399     data = (int*)psListGet(list,1);
     399    data = (psS32*)psListGet(list,1);
    400400    if (data == NULL || *data != 1) {
    401401        psError(__func__,"psListGet failed with which=1");
     
    404404
    405405    //  3. which>=list.n.
    406     data = (int*)psListGet(list,5);
     406    data = (psS32*)psListGet(list,5);
    407407    if (data != NULL) {
    408408        psError(__func__,"psListGet failed with which=5");
    409409        return 4;
    410410    }
    411     data = (int*)psListGet(list,4);
     411    data = (psS32*)psListGet(list,4);
    412412    if (data != NULL) {
    413413        psError(__func__,"psListGet failed with which=4");
     
    416416
    417417    //  4. which=PS_LIST_HEAD
    418     data = (int*)psListGet(list,PS_LIST_HEAD);
     418    data = (psS32*)psListGet(list,PS_LIST_HEAD);
    419419    if (data == NULL || *data != 0) {
    420420        psError(__func__,"psListGet failed with which=PS_LIST_HEAD");
     
    423423
    424424    //  5. which=PS_LIST_NEXT
    425     data = (int*)psListGet(list,PS_LIST_NEXT);
     425    data = (psS32*)psListGet(list,PS_LIST_NEXT);
    426426    if (data == NULL || *data != 1) {
    427427        psError(__func__,"psListGet failed with which=PS_LIST_NEXT");
     
    430430
    431431    //  6. which=PS_LIST_TAIL
    432     data = (int*)psListGet(list,PS_LIST_TAIL);
     432    data = (psS32*)psListGet(list,PS_LIST_TAIL);
    433433    if (data == NULL || *data != 3) {
    434434        psError(__func__,"psListGet failed with which=PS_LIST_TAIL");
     
    437437
    438438    //  7. which=PS_LIST_PREV
    439     data = (int*)psListGet(list,PS_LIST_PREVIOUS);
     439    data = (psS32*)psListGet(list,PS_LIST_PREVIOUS);
    440440    if (data == NULL || *data != 2) {
    441441        psError(__func__,"psListGet failed with which=PS_LIST_PREV");
     
    448448}
    449449
    450 int testListRemove(void)
     450psS32 testListRemove(void)
    451451{
    452452    psList* list = NULL;
    453     int* data;
     453    psS32* data;
    454454
    455455    /*
     
    480480    list = psListAlloc(NULL);
    481481
    482     for (int lcv=0;lcv<15;lcv++) {
    483         data = psAlloc(sizeof(int));
     482    for (psS32 lcv=0;lcv<15;lcv++) {
     483        data = psAlloc(sizeof(psS32));
    484484        *data = lcv;
    485485        psListAdd(list,PS_LIST_TAIL,data);
     
    682682}
    683683
    684 int testListConvert(void)
     684psS32 testListConvert(void)
    685685{
    686686
    687687    psList* list = NULL;
    688688    psArray* arr = NULL;
    689     int* data;
     689    psS32* data;
    690690
    691691    /*
    692692        array=psListToArray(list) shall take each element of the list, increment
    693         their reference, and insert them into the returned fresh void* array.
     693        their reference, and insert them into the returned fresh psPtr array.
    694694        The list shall not be changed, except for the element reference increment.
    695695    */
     
    699699    // create a list
    700700    list = psListAlloc(NULL);
    701     for (int lcv=0;lcv<15;lcv++) {
    702         data = psAlloc(sizeof(int));
     701    for (psS32 lcv=0;lcv<15;lcv++) {
     702        data = psAlloc(sizeof(psS32));
    703703        *data = lcv;
    704704        psListAdd(list,PS_LIST_TAIL,data);
     
    712712        return 1;
    713713    }
    714     for (int i=0;i<arr->n;i++) {
    715         if (i != *(int*)arr->data[i]) {
     714    for (psS32 i=0;i<arr->n;i++) {
     715        if (i != *(psS32*)arr->data[i]) {
    716716            psError(__func__,"Element %d of array is incorrect (%d).",
    717                     i,*(int*)arr->data[i]);
     717                    i,*(psS32*)arr->data[i]);
    718718            return 1;
    719719        }
    720         if (i != *(int*)psListGet(list,i)) {
     720        if (i != *(psS32*)psListGet(list,i)) {
    721721            psError(__func__,"Element %d of list is incorrect (%d).",
    722                     i,*(int*)arr->data[i]);
     722                    i,*(psS32*)arr->data[i]);
    723723            return 1;
    724724        }
     
    738738    arr = psArrayAlloc(15);
    739739    arr->n = arr->nalloc;
    740     for (int lcv=0;lcv<15;lcv++) {
    741         data = psAlloc(sizeof(int));
     740    for (psS32 lcv=0;lcv<15;lcv++) {
     741        data = psAlloc(sizeof(psS32));
    742742        *data = lcv;
    743743        arr->data[lcv] = data;
     
    750750        return 1;
    751751    }
    752     for (int i=0;i<arr->n;i++) {
    753         if (i != *(int*)arr->data[i]) {
     752    for (psS32 i=0;i<arr->n;i++) {
     753        if (i != *(psS32*)arr->data[i]) {
    754754            psError(__func__,"Element %d of array is incorrect (%d).",
    755                     i,*(int*)arr->data[i]);
     755                    i,*(psS32*)arr->data[i]);
    756756            return 1;
    757757        }
    758         if (i != *(int*)psListGet(list,i)) {
     758        if (i != *(psS32*)psListGet(list,i)) {
    759759            psError(__func__,"Element %d of list is incorrect (%d).",
    760                     i,*(int*)arr->data[i]);
     760                    i,*(psS32*)arr->data[i]);
    761761            return 1;
    762762        }
     
    810810}
    811811
    812 int testListIterator(void)
     812psS32 testListIterator(void)
    813813{
    814814    psList* list = NULL;
    815     int* data;
     815    psS32* data;
    816816
    817817    psLogMsg(__func__,PS_LOG_INFO," psListSetIterator/psListGetNext/psListGetPrev"
     
    837837    // create a list
    838838    list = psListAlloc(NULL);
    839     for (int lcv=0;lcv<15;lcv++) {
    840         data = psAlloc(sizeof(int));
     839    for (psS32 lcv=0;lcv<15;lcv++) {
     840        data = psAlloc(sizeof(psS32));
    841841        *data = lcv;
    842842        psListAdd(list,PS_LIST_TAIL,data);
     
    852852    // 3. set list.cursor to list.tail if where=PS_LIST_TAIL
    853853    psListSetIterator(list,PS_LIST_TAIL);
    854     if (*(int*)psListGetCurrent(list) != 14) {
     854    if (*(psS32*)psListGetCurrent(list) != 14) {
    855855        psError(__func__,"Didn't successfully move cursor to tail.");
    856856        return 1;
     
    859859    // 2. set list.cursor to list.head if where=PS_LIST_HEAD
    860860    psListSetIterator(list,PS_LIST_HEAD);
    861     if (*(int*)psListGetCurrent(list) != 0) {
     861    if (*(psS32*)psListGetCurrent(list) != 0) {
    862862        psError(__func__,"Didn't successfully move cursor to head.");
    863863        return 2;
     
    866866    // 4. set list.cursor to list.cursor->next if where=PS_LIST_NEXT
    867867    psListSetIterator(list,PS_LIST_NEXT);
    868     if (*(int*)psListGetCurrent(list) != 1) {
     868    if (*(psS32*)psListGetCurrent(list) != 1) {
    869869        psError(__func__,"Didn't successfully move cursor to next.");
    870870        return 3;
    871871    }
    872872    psListSetIterator(list,PS_LIST_NEXT);
    873     if (*(int*)psListGetCurrent(list) != 2) {
     873    if (*(psS32*)psListGetCurrent(list) != 2) {
    874874        psError(__func__,"Didn't successfully move cursor to next twice.");
    875875        return 4;
     
    878878    // 5. set list.cursor to list.cursor->prev if where=PS_LIST_PREV
    879879    psListSetIterator(list,PS_LIST_PREVIOUS);
    880     if (*(int*)psListGetCurrent(list) != 1) {
     880    if (*(psS32*)psListGetCurrent(list) != 1) {
    881881        psError(__func__,"Didn't successfully move cursor to previous.");
    882882        return 5;
    883883    }
    884884    psListSetIterator(list,PS_LIST_PREVIOUS);
    885     if (*(int*)psListGetCurrent(list) != 0) {
     885    if (*(psS32*)psListGetCurrent(list) != 0) {
    886886        psError(__func__,"Didn't successfully move cursor to previous twice.");
    887887        return 6;
     
    892892    psLogMsg(__func__,PS_LOG_INFO,"Following should error with 'Can't move to an unknown position.'");
    893893    psListSetIterator(list,PS_LIST_UNKNOWN);
    894     if (*(int*)psListGetCurrent(list) != 1) {
     894    if (*(psS32*)psListGetCurrent(list) != 1) {
    895895        psError(__func__,"PS_LIST_UNKNOWN moved cursor.");
    896896        return 7;
    897897    }
    898898    psListSetIterator(list,PS_LIST_CURRENT);
    899     if (*(int*)psListGetCurrent(list) != 1) {
     899    if (*(psS32*)psListGetCurrent(list) != 1) {
    900900        psError(__func__,"PS_LIST_CURRENT moved cursor.");
    901901        return 8;
     
    903903
    904904    // test psListGetPrevious/Next
    905     if (*(int*)psListGetNext(list) != 2) {
     905    if (*(psS32*)psListGetNext(list) != 2) {
    906906        psError(__func__,"psListGetNext didn't move cursor to next.");
    907907        return 9;
    908908    }
    909     if (*(int*)psListGetNext(list) != 3) {
     909    if (*(psS32*)psListGetNext(list) != 3) {
    910910        psError(__func__,"psListGetNext didn't move cursor to next.");
    911911        return 10;
    912912    }
    913     if (*(int*)psListGetPrevious(list) != 2) {
     913    if (*(psS32*)psListGetPrevious(list) != 2) {
    914914        psError(__func__,"psListGetPrevious didn't move cursor to previous.");
    915915        return 11;
    916916    }
    917     if (*(int*)psListGetPrevious(list) != 1) {
     917    if (*(psS32*)psListGetPrevious(list) != 1) {
    918918        psError(__func__,"psListGetPrevious didn't move cursor to previous.");
    919919        return 12;
    920920    }
    921     if (*(int*)psListGetPrevious(list) != 0) {
     921    if (*(psS32*)psListGetPrevious(list) != 0) {
    922922        psError(__func__,"psListGetPrevious didn't move cursor to previous..");
    923923        return 13;
     
    939939}
    940940
    941 int testListFree(void)
     941psS32 testListFree(void)
    942942{
    943943    float* data[15];
     
    954954
    955955    list = psListAlloc(NULL);
    956     for (int lcv=0;lcv<15;lcv++) {
    957         data[lcv] = psAlloc(sizeof(int));
     956    for (psS32 lcv=0;lcv<15;lcv++) {
     957        data[lcv] = psAlloc(sizeof(psS32));
    958958        *data[lcv] = lcv;
    959959        psListAdd(list,PS_LIST_TAIL,data[lcv]);
     
    987987    */
    988988
    989     for (int i=0;i<15;i++) {
     989    for (psS32 i=0;i<15;i++) {
    990990        if (psMemGetRefCounter(data[i]) != 1) {
    991991            psError(__func__,"pslistFree didn't decrement the data item's reference counter");
     
    998998}
    999999
    1000 int testListSort(void)
     1000psS32 testListSort(void)
    10011001{
    10021002    psList* list;
     
    10041004    list = psListAlloc(NULL);
    10051005
    1006     for (int lcv=0;lcv<15;lcv++) {
    1007         float* data = psAlloc(sizeof(int));
     1006    for (psS32 lcv=0;lcv<15;lcv++) {
     1007        float* data = psAlloc(sizeof(psS32));
    10081008        if (lcv < 7) {
    10091009            *data = 13-lcv*2;
     
    10701070    list = psListAlloc(NULL);
    10711071
    1072     for (int lcv=0;lcv<15;lcv++) {
    1073         psU32* data = psAlloc(sizeof(int));
     1072    for (psS32 lcv=0;lcv<15;lcv++) {
     1073        psU32* data = psAlloc(sizeof(psS32));
    10741074        if (lcv < 7) {
    10751075            *data = 13-lcv*2;
  • trunk/psLib/test/collections/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/collections/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/collections/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/collections/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/collections/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/collections/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/collections/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/collections/tst_psVector.c

    r1920 r2204  
    1414 *  @author  Ross Harman, MHPCC
    1515 *
    16  *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    17  *  @date  $Date: 2004-09-28 23:26:49 $
     16 *  @version $Revision: 1.5 $  $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
     
    2424#include "psTest.h"
    2525
    26 int main(int argc,
    27          char* argv[])
     26psS32 main(psS32 argc,
     27           char* argv[])
    2828{
    2929
     
    4040    // Test B - Add data to integer vector
    4141    printPositiveTestHeader(stdout, "psVector", "Add data to S32 vector");
    42     for(int i = 0; i < 5; i++) {
     42    for(psS32 i = 0; i < 5; i++) {
    4343        psVec->data.S32[i] = i*10;
    4444        printf("Elem %d = %d\n", i, psVec->data.S32[i]);
     
    5353    psVec = psVectorRealloc(psVec,10);
    5454    printf("Adding more elements to S32 vector...\n");
    55     for(int i = 5; i < 10; i++) {
     55    for(psS32 i = 5; i < 10; i++) {
    5656        psVec->data.S32[i] = i*10;
    5757        psVec->n++;
     
    6767    psVec = psVectorRealloc(psVec,3);
    6868    printf("Vector size = %d\n", psVec->nalloc);
    69     for(int i = 0; i < 3; i++) {
     69    for(psS32 i = 0; i < 3; i++) {
    7070        printf("Elem %d = %d\n", i, psVec->data.S32[i]);
    7171    }
     
    7878    printPositiveTestHeader(stdout, "psVector", "Free S32 vector");
    7979    psFree(psVec);
    80     int leaks = psMemCheckLeaks(0, NULL, stdout);
     80    psS32 leaks = psMemCheckLeaks(0, NULL, stdout);
    8181    if(leaks != 0) {
    8282        printf("ERROR: Found %d memory leaks\n",leaks);
    8383    }
    84     int nBad = psMemCheckCorruption(0);
     84    psS32 nBad = psMemCheckCorruption(0);
    8585    if(nBad) {
    8686        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/collections/tst_psVectorSort_01.c

    r1406 r2204  
    1010 *  @author  Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
    13  *  @date  $Date: 2004-08-06 22:34:05 $
     12 *  @version $Revision: 1.3 $  $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,
    23          char* argv[])
     22psS32 main(psS32 argc,
     23           char* argv[])
    2424{
    2525    psVector *in = NULL;
     
    4141    in->data.F32[5] = 5.0f;
    4242    in->data.F32[6] = -20.0f;
    43     for(int i=0; i<7; i++) {
     43    for(psS32 i=0; i<7; i++) {
    4444        printf("vec[%d] = %f\n", i, in->data.F32[i]);
    4545    }
     
    5151    tempVec = out;
    5252    out = psVectorSort(out, in);
    53     for(int i=0; i<7; i++) {
     53    for(psS32 i=0; i<7; i++) {
    5454        printf("vec[%d] = %f\n", i, out->data.F32[i]);
    5555    }
     
    6363    printPositiveTestHeader(stdout,"psVectorSort", "Sort input float vector into itself");
    6464    in = psVectorSort(in, in);
    65     for(int i=0; i<7; i++) {
     65    for(psS32 i=0; i<7; i++) {
    6666        printf("vec[%d] = %f\n", i, out->data.F32[i]);
    6767    }
     
    7474    psFree(out);
    7575    psMemCheckLeaks(0, NULL, stdout);
    76     int nBad = psMemCheckCorruption(0);
     76    psS32 nBad = psMemCheckCorruption(0);
    7777    if(nBad) {
    7878        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/collections/tst_psVectorSort_02.c

    r1406 r2204  
    1010 *  @author  Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    13  *  @date  $Date: 2004-08-06 22:34:05 $
     12 *  @version $Revision: 1.4 $  $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,
    23          char* argv[])
     22psS32 main(psS32 argc,
     23           char* argv[])
    2424{
    2525    psVector *in = NULL;
     
    3636    in->data.F32[3] = 1.0f;
    3737    in->data.F32[4] = 5.0f;
    38     for(int i=0; i<5; i++) {
     38    for(psS32 i=0; i<5; i++) {
    3939        printf("arr[%d] = %f\n", i, in->data.F32[i]);
    4040    }
     
    4545    printPositiveTestHeader(stdout,"psVectorSortIndex", "Create sorted index vector");
    4646    out = psVectorSortIndex(out, in);
    47     for(int i=0; i<5; i++) {
     47    for(psS32 i=0; i<5; i++) {
    4848        printf("arr[%d] = %d\n", i, out->data.U32[i]);
    4949    }
     
    6161    psFree(in);
    6262    psFree(out);
    63     int nLeaks = psMemCheckLeaks(0, NULL, stdout);
     63    psS32 nLeaks = psMemCheckLeaks(0, NULL, stdout);
    6464    if(nLeaks) {
    6565        printf("ERROR: Found %d memory leaks\n", nLeaks);
    6666    }
    67     int nBad = psMemCheckCorruption(0);
     67    psS32 nBad = psMemCheckCorruption(0);
    6868    if(nBad) {
    6969        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/collections/tst_psVectorSort_03.c

    r1406 r2204  
    1212 *  @author  Ross Harman, MHPCC
    1313 *
    14  *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
    15  *  @date  $Date: 2004-08-06 22:34:05 $
     14 *  @version $Revision: 1.5 $  $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
     
    2222#include "psTest.h"
    2323
    24 int main(int argc,
    25          char* argv[])
     24psS32 main(psS32 argc,
     25           char* argv[])
    2626{
    2727    psVector *in = NULL;
     
    3737    out->n = 6;
    3838    in->n = 5;
    39     for(int i=0; i<5; i++) {
     39    for(psS32 i=0; i<5; i++) {
    4040        printf("arr[%d] = %f\n", i, in->data.F32[i]);
    4141    }
     
    5555    out2 = psVectorAlloc(5, PS_TYPE_F64);
    5656    out2->n = 5;
    57     for(int j=0; j<5; j++) {
     57    for(psS32 j=0; j<5; j++) {
    5858        printf("vec[%d] = %f\n", j, in2->data.F32[j]);
    5959    }
     
    7272    psFree(out);
    7373    psFree(out2);
    74     int nLeaks = psMemCheckLeaks(0, NULL, stdout);
     74    psS32 nLeaks = psMemCheckLeaks(0, NULL, stdout);
    7575    if(nLeaks) {
    7676        printf("ERROR: Found %d memory leaks\n", nLeaks);
    7777    }
    78     int nBad = psMemCheckCorruption(0);
     78    psS32 nBad = psMemCheckCorruption(0);
    7979    if(nBad) {
    8080        printf("ERROR: Found %d bad memory blocks\n", nBad);
  • trunk/psLib/test/collections/tst_psVectorSort_04.c

    r1406 r2204  
    99 *  @author  Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.3 $  $Name: not supported by cvs2svn $
    12  *  @date  $Date: 2004-08-06 22:34:05 $
     11 *  @version $Revision: 1.4 $  $Name: not supported by cvs2svn $
     12 *  @date  $Date: 2004-10-27 00:57:33 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1919#include "psTest.h"
    2020
    21 int main(int argc,
    22          char* argv[])
     21psS32 main(psS32 argc,
     22           char* argv[])
    2323{
    2424    psVector *badIn = NULL;
     
    3434    printPositiveTestHeader(stdout, "psVectorSort", "Free vectors");
    3535    psFree(goodOut);
    36     int nLeaks = psMemCheckLeaks(0, NULL, stdout);
     36    psS32 nLeaks = psMemCheckLeaks(0, NULL, stdout);
    3737    if(nLeaks) {
    3838        printf("ERROR: Found %d memory blocks\n", nLeaks);
    3939    }
    40     int nBad = psMemCheckCorruption(0);
     40    psS32 nBad = psMemCheckCorruption(0);
    4141    if(nBad) {
    4242        printf("ERROR: Found %d bad memory blocks\n", nBad);
Note: See TracChangeset for help on using the changeset viewer.