Changeset 5454
- Timestamp:
- Oct 28, 2005, 2:05:53 PM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 7 edited
-
src/sys/psType.h (modified) (3 diffs)
-
src/types/psArray.h (modified) (2 diffs)
-
src/types/psMetadata.c (modified) (5 diffs)
-
src/types/psMetadata.h (modified) (3 diffs)
-
test/types/tst_psMetadata_04.c (modified) (3 diffs)
-
test/types/verified/tst_psMetadata_01.stdout (modified) (2 diffs)
-
test/types/verified/tst_psMetadata_06.stdout (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psType.h
r5136 r5454 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.4 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005- 09-26 21:13:25$12 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-10-29 00:05:52 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 105 105 PS_DATA_ARRAY, ///< psArray 106 106 PS_DATA_BITSET, ///< psBitSet 107 PS_DATA_CELL, ///< psCell108 PS_DATA_CHIP, ///< psChip109 107 PS_DATA_CUBE, ///< psCube 110 108 PS_DATA_FITS, ///< psFits … … 127 125 PS_DATA_POLYNOMIAL4D, ///< psPolynomial4D 128 126 PS_DATA_PROJECTION, ///< psProjection 129 PS_DATA_READOUT, ///< psReadout130 PS_DATA_REGION, ///< psRegion131 127 PS_DATA_SCALAR, ///< psScalar 132 128 PS_DATA_SPHERE, ///< psSphere -
trunk/psLib/src/types/psArray.h
r5216 r5454 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.3 3$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-10- 01 02:22:15$13 * @version $Revision: 1.34 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-10-29 00:05:53 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 116 116 */ 117 117 void psArrayElementsFree( 118 psArray* psArr///< Void pointer array to destroy.118 psArray* array ///< Void pointer array to destroy. 119 119 ); 120 120 -
trunk/psLib/src/types/psMetadata.c
r5203 r5454 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.8 7$ $Name: not supported by cvs2svn $15 * @date $Date: 2005- 09-30 01:34:45$14 * @version $Revision: 1.88 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-10-29 00:05:53 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 248 248 case PS_DATA_ARRAY: ///< psArray 249 249 case PS_DATA_BITSET: ///< psBitSet 250 case PS_DATA_CELL: ///< psCell251 case PS_DATA_CHIP: ///< psChip252 250 case PS_DATA_CUBE: ///< psCube 253 251 case PS_DATA_FITS: ///< psFits … … 270 268 case PS_DATA_POLYNOMIAL4D: ///< psPolynomial4D 271 269 case PS_DATA_PROJECTION: ///< psProjection 272 case PS_DATA_READOUT: ///< psReadout273 case PS_DATA_REGION: ///< psRegion274 270 case PS_DATA_SCALAR: ///< psScalar 275 271 case PS_DATA_SPHERE: ///< psSphere … … 867 863 868 864 869 char *psMetadataLookupStr(bool *status,870 const psMetadata *md,871 const char *key)865 psString psMetadataLookupStr(bool *status, 866 const psMetadata *md, 867 const char *key) 872 868 { 873 869 psMetadataItem *item = psMetadataLookup((psMetadata*)md, key); // The metadata with instruments 874 char *value = NULL; // The value to return 870 // char *value = NULL; // The value to return 871 psString value = NULL; 875 872 if (!item) { 876 873 // The given key isn't in the metadata … … 893 890 *status = true; 894 891 } 895 value = item->data.V; // The requested metadata 892 // value = item->data.V; // The requested metadata 893 value = psStringNCopy(item->data.V, strlen(item->data.V) ); 896 894 } 897 895 return value; -
trunk/psLib/src/types/psMetadata.h
r5203 r5454 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.6 8$ $Name: not supported by cvs2svn $14 * @date $Date: 2005- 09-30 01:34:45$13 * @version $Revision: 1.69 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-10-29 00:05:53 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 490 490 * @return bool: True for success, False for failure. 491 491 */ 492 psBool psMetadataAddPtr(492 bool psMetadataAddPtr( 493 493 psMetadata* md, ///< Metadata collection to insert metadata item 494 494 long location, ///< Index number, PS_LIST_HEAD, or PS_LIST_TAIL … … 711 711 * @return char*: Value of metadata item. 712 712 */ 713 char *psMetadataLookupStr(713 psString psMetadataLookupStr( 714 714 bool *status, ///< Status of lookup. 715 715 const psMetadata *md, ///< Metadata collection to lookup metadata item. -
trunk/psLib/test/types/tst_psMetadata_04.c
r5136 r5454 25 25 * @author Ross Harman, MHPCC 26 26 * 27 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $28 * @date $Date: 2005- 09-26 21:13:33 $27 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 28 * @date $Date: 2005-10-29 00:05:53 $ 29 29 * 30 30 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 223 223 // Test K - Lookup metadata item and return psString value 224 224 printPositiveTestHeader(stdout, "psMetadata", "Test K - Lookup metadata item and return psString value"); 225 char *newSTR;225 psString newSTR; 226 226 newSTR = psMetadataLookupStr(&status, metadata, "myItem8"); 227 227 if( strncmp(newSTR, string, 50) ) { … … 307 307 // Test Q - Free psMetadata 308 308 printPositiveTestHeader(stdout, "psMetadata", "Test Q - Free psMetadata"); 309 //psFree(newSTR);309 psFree(newSTR); 310 310 // psFree(string); 311 311 psFree(newMD); -
trunk/psLib/test/types/verified/tst_psMetadata_01.stdout
r5136 r5454 44 44 Key Name: PCOUNT Key mdType: 0x00000104 Key Value: 0 Key Comment: required keyword; must = 0 45 45 Key Name: XTENSION Key mdType: 0x00010000 Key Value: 'IMAGE ' Key Comment: IMAGE extension 46 Key Name: BITPIX Key mdType: 0x000100 23Key Value: Key Comment:46 Key Name: BITPIX Key mdType: 0x0001001f Key Value: Key Comment: 47 47 Key Name: BITPIX Key mdType: 0x00000104 Key Value: -64 Key Comment: number of bits per data pixel 48 48 Key Name: BITPIX Key mdType: 0x00000104 Key Value: -64 Key Comment: number of bits per data pixel 49 49 Key Name: GCOUNT Key mdType: 0x00000104 Key Value: 1 Key Comment: required keyword; must = 1 50 Key Name: HISTORY Key mdType: 0x000100 23Key Value: Key Comment:50 Key Name: HISTORY Key mdType: 0x0001001f Key Value: Key Comment: 51 51 Key Name: HISTORY Key mdType: 0x00010000 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 52 52 Key Name: HISTORY Key mdType: 0x00010000 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> … … 81 81 Key Name: GCOUNT Key mdType: 0x00000104 Key Value: 1 Key Comment: required keyword; must = 1 82 82 Key Name: BITPIX Key mdType: 0x00000104 Key Value: -64 Key Comment: number of bits per data pixel 83 Key Name: HISTORY Key mdType: 0x000100 23Key Value: Key Comment:83 Key Name: HISTORY Key mdType: 0x0001001f Key Value: Key Comment: 84 84 Key Name: HISTORY Key mdType: 0x00010000 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 85 85 Key Name: HISTORY Key mdType: 0x00010000 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> -
trunk/psLib/test/types/verified/tst_psMetadata_06.stdout
r5136 r5454 9 9 Key Name: myItem1 Key mdType: 0x00000104 Key Value: 222 Key Comment: I am a signed integer 10 10 Key Name: myItem2 Key mdType: 0x00000104 Key Value: 333 Key Comment: I am a signed integer 11 Key Name: myItem2 Key mdType: 0x0001000 bKey Value: psList Key Comment: I am a list11 Key Name: myItem2 Key mdType: 0x00010009 Key Value: psList Key Comment: I am a list 12 12 13 13 ---> TESTPOINT PASSED (psMetadata{Test A - Allocate metadata and items} | tst_psMetadata_06.c)
Note:
See TracChangeset
for help on using the changeset viewer.
