IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2006, 2:07:03 PM (20 years ago)
Author:
Paul Price
Message:

Changed definition of psVectorAlloc and psArrayAlloc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotTest.c

    r9270 r9734  
    1515int main (int argc, char **argv) {
    1616
    17     psRegion region = {0,0,0,0};        // a region representing the entire array
     17    psRegion region = {0,0,0,0};        // a region representing the entire array
    1818    psphotTestArguments (&argc, argv);
    1919
     
    5656    mdi->data.S32 = 0;
    5757    mdi->type = PS_DATA_S32;
    58    
     58
    5959    // create a test image
    6060    // psImage *tmpimage = psImageAlloc (10, 10, PS_DATA_F32);
    6161
    6262    // create a test table
    63     table = psArrayAlloc (10);
    64 table->n = 0;
     63    table = psArrayAllocEmpty (10);
    6564
    6665    for (int i = 0; i < 10; i++) {
    67         row = psMetadataAlloc ();
    68         psMetadataAdd (row, PS_LIST_TAIL, "ROW",   PS_DATA_S32,    "", i);
    69         psMetadataAdd (row, PS_LIST_TAIL, "FROW",  PS_TYPE_F32,    "", 0.1*i);
    70         psMetadataAdd (row, PS_LIST_TAIL, "DUMMY", PS_DATA_STRING, "", "test line");
    71    
    72         table->data[i] = row;
     66        row = psMetadataAlloc ();
     67        psMetadataAdd (row, PS_LIST_TAIL, "ROW",   PS_DATA_S32,    "", i);
     68        psMetadataAdd (row, PS_LIST_TAIL, "FROW",  PS_TYPE_F32,    "", 0.1*i);
     69        psMetadataAdd (row, PS_LIST_TAIL, "DUMMY", PS_DATA_STRING, "", "test line");
     70
     71        table->data[i] = row;
    7372    }
    7473    table->n = 10;
    75    
     74
    7675    psMetadata *theader = psMetadataAlloc ();
    7776    psMetadataAdd (theader, PS_LIST_HEAD, "EXTNAME", PS_DATA_STRING, "extension name", "SMPFILE");
Note: See TracChangeset for help on using the changeset viewer.