Changeset 9734 for trunk/psphot/src/psphotTest.c
- Timestamp:
- Oct 24, 2006, 2:07:03 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotTest.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotTest.c
r9270 r9734 15 15 int main (int argc, char **argv) { 16 16 17 psRegion region = {0,0,0,0}; // a region representing the entire array17 psRegion region = {0,0,0,0}; // a region representing the entire array 18 18 psphotTestArguments (&argc, argv); 19 19 … … 56 56 mdi->data.S32 = 0; 57 57 mdi->type = PS_DATA_S32; 58 58 59 59 // create a test image 60 60 // psImage *tmpimage = psImageAlloc (10, 10, PS_DATA_F32); 61 61 62 62 // create a test table 63 table = psArrayAlloc (10); 64 table->n = 0; 63 table = psArrayAllocEmpty (10); 65 64 66 65 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; 73 72 } 74 73 table->n = 10; 75 74 76 75 psMetadata *theader = psMetadataAlloc (); 77 76 psMetadataAdd (theader, PS_LIST_HEAD, "EXTNAME", PS_DATA_STRING, "extension name", "SMPFILE");
Note:
See TracChangeset
for help on using the changeset viewer.
