Changeset 4209
- Timestamp:
- Jun 10, 2005, 8:09:12 AM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 13 edited
-
configure.ac (modified) (1 diff)
-
src/astro/psTime.c (modified) (2 diffs)
-
src/astronomy/psTime.c (modified) (2 diffs)
-
src/collections/psMetadataIO.c (modified) (3 diffs)
-
src/collections/psMetadataIO.h (modified) (3 diffs)
-
src/types/psMetadataConfig.c (modified) (3 diffs)
-
src/types/psMetadataConfig.h (modified) (3 diffs)
-
src/xml/psXML.c (modified) (3 diffs)
-
src/xml/psXML.h (modified) (3 diffs)
-
test/astronomy/verified/tst_psTime_04.stderr (modified) (1 diff)
-
test/collections/tst_psMetadataIO.c (modified) (11 diffs)
-
test/collections/tst_psMetadata_07.c (modified) (2 diffs)
-
test/collections/verified/tst_psMetadataIO.stderr (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/configure.ac
r4159 r4209 9 9 AM_MAINTAINER_MODE 10 10 11 PSLIB_LT_VERSION="0: 5:0"11 PSLIB_LT_VERSION="0:6:0" 12 12 AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION) 13 13 -
trunk/psLib/src/astro/psTime.c
r4051 r4209 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.6 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 5-31 21:47:46$12 * @version $Revision: 1.63 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-10 18:09:12 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 256 256 257 257 // Read time config file 258 timeMetadata = psMetadata ParseConfig(timeMetadata, &nFail, fileName, true);258 timeMetadata = psMetadataConfigParse(timeMetadata, &nFail, fileName, true); 259 259 if(timeMetadata == NULL) { 260 260 return false; -
trunk/psLib/src/astronomy/psTime.c
r4051 r4209 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.6 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 5-31 21:47:46$12 * @version $Revision: 1.63 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-10 18:09:12 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 256 256 257 257 // Read time config file 258 timeMetadata = psMetadata ParseConfig(timeMetadata, &nFail, fileName, true);258 timeMetadata = psMetadataConfigParse(timeMetadata, &nFail, fileName, true); 259 259 if(timeMetadata == NULL) { 260 260 return false; -
trunk/psLib/src/collections/psMetadataIO.c
r4113 r4209 10 10 * @author Eric Van Alst, MHPCC 11 11 * 12 * @version $Revision: 1. 29$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06- 04 03:00:39$12 * @version $Revision: 1.30 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-10 18:09:12 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1075 1075 } 1076 1076 1077 psMetadata* psMetadata ParseConfig(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite)1077 psMetadata* psMetadataConfigParse(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite) 1078 1078 { 1079 1079 FILE* fp = NULL; … … 1516 1516 } 1517 1517 1518 psMetadata* psMetadata ParseConfigXml(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite)1518 psMetadata* psMetadataConfigParseXml(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite) 1519 1519 { 1520 1520 xmlSAXHandler saxHandler; -
trunk/psLib/src/collections/psMetadataIO.h
r4162 r4209 10 10 * @author Robert DeSonia, MHPCC 11 11 * 12 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06- 08 23:40:45$12 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-10 18:09:12 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 71 71 * @return psMetadata* : Resulting metadata from read. 72 72 */ 73 psMetadata* psMetadata ParseConfig(73 psMetadata* psMetadataConfigParse( 74 74 psMetadata* md, ///< Resulting metadata from read. 75 75 psU32 *nFail, ///< Number of failed lines. … … 85 85 */ 86 86 87 psMetadata* psMetadata ParseConfigXml(87 psMetadata* psMetadataConfigParseXml( 88 88 psMetadata* md, ///< Resulting metadata from read. 89 89 psU32 *nFail, ///< Number of failed lines. -
trunk/psLib/src/types/psMetadataConfig.c
r4113 r4209 10 10 * @author Eric Van Alst, MHPCC 11 11 * 12 * @version $Revision: 1. 29$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06- 04 03:00:39$12 * @version $Revision: 1.30 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-10 18:09:12 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1075 1075 } 1076 1076 1077 psMetadata* psMetadata ParseConfig(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite)1077 psMetadata* psMetadataConfigParse(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite) 1078 1078 { 1079 1079 FILE* fp = NULL; … … 1516 1516 } 1517 1517 1518 psMetadata* psMetadata ParseConfigXml(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite)1518 psMetadata* psMetadataConfigParseXml(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite) 1519 1519 { 1520 1520 xmlSAXHandler saxHandler; -
trunk/psLib/src/types/psMetadataConfig.h
r4162 r4209 10 10 * @author Robert DeSonia, MHPCC 11 11 * 12 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06- 08 23:40:45$12 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-10 18:09:12 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 71 71 * @return psMetadata* : Resulting metadata from read. 72 72 */ 73 psMetadata* psMetadata ParseConfig(73 psMetadata* psMetadataConfigParse( 74 74 psMetadata* md, ///< Resulting metadata from read. 75 75 psU32 *nFail, ///< Number of failed lines. … … 85 85 */ 86 86 87 psMetadata* psMetadata ParseConfigXml(87 psMetadata* psMetadataConfigParseXml( 88 88 psMetadata* md, ///< Resulting metadata from read. 89 89 psU32 *nFail, ///< Number of failed lines. -
trunk/psLib/src/xml/psXML.c
r4113 r4209 10 10 * @author Eric Van Alst, MHPCC 11 11 * 12 * @version $Revision: 1. 29$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06- 04 03:00:39$12 * @version $Revision: 1.30 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-10 18:09:12 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 1075 1075 } 1076 1076 1077 psMetadata* psMetadata ParseConfig(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite)1077 psMetadata* psMetadataConfigParse(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite) 1078 1078 { 1079 1079 FILE* fp = NULL; … … 1516 1516 } 1517 1517 1518 psMetadata* psMetadata ParseConfigXml(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite)1518 psMetadata* psMetadataConfigParseXml(psMetadata* md, psU32 *nFail, const char *fileName, psBool overwrite) 1519 1519 { 1520 1520 xmlSAXHandler saxHandler; -
trunk/psLib/src/xml/psXML.h
r4162 r4209 10 10 * @author Robert DeSonia, MHPCC 11 11 * 12 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-06- 08 23:40:45$12 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2005-06-10 18:09:12 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 71 71 * @return psMetadata* : Resulting metadata from read. 72 72 */ 73 psMetadata* psMetadata ParseConfig(73 psMetadata* psMetadataConfigParse( 74 74 psMetadata* md, ///< Resulting metadata from read. 75 75 psU32 *nFail, ///< Number of failed lines. … … 85 85 */ 86 86 87 psMetadata* psMetadata ParseConfigXml(87 psMetadata* psMetadataConfigParseXml( 88 88 psMetadata* md, ///< Resulting metadata from read. 89 89 psU32 *nFail, ///< Number of failed lines. -
trunk/psLib/test/astronomy/verified/tst_psTime_04.stderr
r4059 r4209 14 14 \**********************************************************************************/ 15 15 16 <DATE><TIME>|<HOST>|E|psMetadata ParseConfig(FILE:LINENO)16 <DATE><TIME>|<HOST>|E|psMetadataConfigParse (FILE:LINENO) 17 17 Failed to open file 'zzz'. Check if it exists and it has the proper permissions. 18 18 <DATE><TIME>|<HOST>|E|psLibInit (FILE:LINENO) -
trunk/psLib/test/collections/tst_psMetadataIO.c
r4112 r4209 13 13 * @author Eric Van Alst, MHPCC 14 14 * 15 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $16 * @date $Date: 2005-06- 04 02:59:56$15 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2005-06-10 18:09:12 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 31 31 32 32 testDescription tests[] = { 33 {testMetadataParseConfig,000,"psMetadata ParseConfig",0,false},34 {testMetadataParseConfig1,000,"psMetadata ParseConfig",0,false},35 {testMetadataParseConfig2,000,"psMetadata ParseConfig",0,false},36 {testMetadataParseConfig3,000,"psMetadata ParseConfig",0,false},37 {testMetadataParseConfig4,000,"psMetadata ParseConfig",0,false},33 {testMetadataParseConfig,000,"psMetadataConfigParse",0,false}, 34 {testMetadataParseConfig1,000,"psMetadataConfigParse",0,false}, 35 {testMetadataParseConfig2,000,"psMetadataConfigParse",0,false}, 36 {testMetadataParseConfig3,000,"psMetadataConfigParse",0,false}, 37 {testMetadataParseConfig4,000,"psMetadataConfigParse",0,false}, 38 38 {NULL} 39 39 }; … … 474 474 psLogSetLevel(PS_LOG_INFO); 475 475 476 if( !runTestSuite(stderr,"psMetadata ParseConfig",tests,argc,argv)) {476 if( !runTestSuite(stderr,"psMetadataConfigParse",tests,argc,argv)) { 477 477 return 1; 478 478 } … … 493 493 494 494 // Read config file test1.config with overwrite set true 495 metadata1 = psMetadata ParseConfig(metadata1,&failedLines,testConfig1,true);495 metadata1 = psMetadataConfigParse(metadata1,&failedLines,testConfig1,true); 496 496 // Verify the expected number of failed lines 497 497 if(!checkFailedLines(failedLines,testConfig1FailsOverwrite,(char*)testConfig1)) { … … 923 923 // This file contains parse errors 924 924 psLogMsg(__func__,PS_LOG_INFO,"Following should generate parse error message"); 925 metadata1 = psMetadata ParseConfig(metadata1,&failedLines,testConfig2,true);925 metadata1 = psMetadataConfigParse(metadata1,&failedLines,testConfig2,true); 926 926 // Verify the expected number of failed lines 927 927 if(!checkFailedLines(failedLines,testConfig2Fails,(char*)testConfig2)) { … … 937 937 // Attempt parse a non-existant file 938 938 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 939 metadata1 = psMetadata ParseConfig(metadata1,&failedLines,"ab.config",true);939 metadata1 = psMetadataConfigParse(metadata1,&failedLines,"ab.config",true); 940 940 if(metadata1 != NULL) { 941 941 psError(PS_ERR_UNKNOWN,true,"Expected a NULL return for non-existant file"); … … 945 945 // Attempt parse with NULL failed lines ptr 946 946 psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL failed lines arg"); 947 metadata1 = psMetadata ParseConfig(metadata1,NULL,testConfig2,true);947 metadata1 = psMetadataConfigParse(metadata1,NULL,testConfig2,true); 948 948 if(metadata1 != NULL) { 949 949 psError(PS_ERR_UNKNOWN,true,"Expected a NULL return for NULL failed lines argument"); … … 953 953 // Attempt parse with NULL file name 954 954 psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message for NULL file name arg"); 955 metadata1 = psMetadata ParseConfig(metadata1,&failedLines,NULL,true);955 metadata1 = psMetadataConfigParse(metadata1,&failedLines,NULL,true); 956 956 if(metadata1 != NULL) { 957 957 psError(PS_ERR_UNKNOWN,true,"Expected a NULL return for NULL filename argument"); … … 971 971 // Read config file test3.config with overwrite set false 972 972 psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error of duplicate key names"); 973 metadata1 = psMetadata ParseConfig(metadata1,&failedLines,testConfig3,false);973 metadata1 = psMetadataConfigParse(metadata1,&failedLines,testConfig3,false); 974 974 // Verify the expected number of failed lines 975 975 if(!checkFailedLines(failedLines,testConfig3Fails,(char*)testConfig3)) { … … 991 991 992 992 // Read config file test4.config with overwrite set false 993 metadata1 = psMetadata ParseConfig(metadata1,&failedLines,testConfig4,false);993 metadata1 = psMetadataConfigParse(metadata1,&failedLines,testConfig4,false); 994 994 // Verify the expected number of failed lines 995 995 if(!checkFailedLines(failedLines,testConfig4Fails,(char*)testConfig4)) { … … 1010 1010 1011 1011 // Read config file test4.config with overwrite set false 1012 metadata1 = psMetadata ParseConfig(metadata1,&failedLines,testConfig5,true);1012 metadata1 = psMetadataConfigParse(metadata1,&failedLines,testConfig5,true); 1013 1013 // Verify the expected number of failed lines 1014 1014 if(!checkFailedLines(failedLines,testConfig5Fails,(char*)testConfig5)) { -
trunk/psLib/test/collections/tst_psMetadata_07.c
r3682 r4209 9 9 * @author Ross Harman, MHPCC 10 10 * 11 * @version $Revision: 1.1 0$ $Name: not supported by cvs2svn $12 * @date $Date: 2005-0 4-07 20:27:41$11 * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-06-10 18:09:12 $ 13 13 * 14 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 26 26 psU32 nFail = 0; 27 27 psMetadata *md = NULL; 28 md = psMetadata ParseConfigXml(md, &nFail, XML_CONFIG_FILE, true);28 md = psMetadataConfigParseXml(md, &nFail, XML_CONFIG_FILE, true); 29 29 if (nFail != 0) { 30 printf("psMetadata ParseConfigXml returned error %d\n", res);30 printf("psMetadataConfigParseXml returned error %d\n", res); 31 31 } 32 32 -
trunk/psLib/test/collections/verified/tst_psMetadataIO.stderr
r3956 r4209 1 1 /***************************** TESTPOINT ******************************************\ 2 2 * TestFile: tst_psMetadataIO.c * 3 * TestPoint: psMetadata ParseConfig{psMetadataParseConfig} *3 * TestPoint: psMetadataConfigParse{psMetadataConfigParse} * 4 4 * TestType: Positive * 5 5 \**********************************************************************************/ … … 8 8 Metadata item Float has been replaced 9 9 10 ---> TESTPOINT PASSED (psMetadata ParseConfig{psMetadataParseConfig} | tst_psMetadataIO.c)10 ---> TESTPOINT PASSED (psMetadataConfigParse{psMetadataConfigParse} | tst_psMetadataIO.c) 11 11 12 12 /***************************** TESTPOINT ******************************************\ 13 13 * TestFile: tst_psMetadataIO.c * 14 * TestPoint: psMetadata ParseConfig{psMetadataParseConfig} *14 * TestPoint: psMetadataConfigParse{psMetadataConfigParse} * 15 15 * TestType: Positive * 16 16 \**********************************************************************************/ … … 56 56 <DATE><TIME>|<HOST>|I|testMetadataParseConfig1 57 57 Following should generate error message 58 <DATE><TIME>|<HOST>|E|psMetadata ParseConfig(FILE:LINENO)58 <DATE><TIME>|<HOST>|E|psMetadataConfigParse (FILE:LINENO) 59 59 Failed to open file 'ab.config'. Check if it exists and it has the proper permissions. 60 60 <DATE><TIME>|<HOST>|I|testMetadataParseConfig1 61 61 Following should generate an error message for NULL failed lines arg 62 <DATE><TIME>|<HOST>|E|psMetadata ParseConfig(FILE:LINENO)62 <DATE><TIME>|<HOST>|E|psMetadataConfigParse (FILE:LINENO) 63 63 Unallowable operation: nFail is NULL. 64 64 <DATE><TIME>|<HOST>|I|testMetadataParseConfig1 65 65 Following should generate an error message for NULL file name arg 66 <DATE><TIME>|<HOST>|E|psMetadata ParseConfig(FILE:LINENO)66 <DATE><TIME>|<HOST>|E|psMetadataConfigParse (FILE:LINENO) 67 67 Unallowable operation: fileName is NULL. 68 68 69 ---> TESTPOINT PASSED (psMetadata ParseConfig{psMetadataParseConfig} | tst_psMetadataIO.c)69 ---> TESTPOINT PASSED (psMetadataConfigParse{psMetadataConfigParse} | tst_psMetadataIO.c) 70 70 71 71 /***************************** TESTPOINT ******************************************\ 72 72 * TestFile: tst_psMetadataIO.c * 73 * TestPoint: psMetadata ParseConfig{psMetadataParseConfig} *73 * TestPoint: psMetadataConfigParse{psMetadataConfigParse} * 74 74 * TestType: Positive * 75 75 \**********************************************************************************/ … … 82 82 Failed to add metadata item to metadata collection list. 83 83 84 ---> TESTPOINT PASSED (psMetadata ParseConfig{psMetadataParseConfig} | tst_psMetadataIO.c)84 ---> TESTPOINT PASSED (psMetadataConfigParse{psMetadataConfigParse} | tst_psMetadataIO.c) 85 85 86 86 /***************************** TESTPOINT ******************************************\ 87 87 * TestFile: tst_psMetadataIO.c * 88 * TestPoint: psMetadata ParseConfig{psMetadataParseConfig} *88 * TestPoint: psMetadataConfigParse{psMetadataConfigParse} * 89 89 * TestType: Positive * 90 90 \**********************************************************************************/ … … 93 93 Can not copy a negative number of characters (-9). 94 94 95 ---> TESTPOINT PASSED (psMetadata ParseConfig{psMetadataParseConfig} | tst_psMetadataIO.c)95 ---> TESTPOINT PASSED (psMetadataConfigParse{psMetadataConfigParse} | tst_psMetadataIO.c) 96 96 97 97 /***************************** TESTPOINT ******************************************\ 98 98 * TestFile: tst_psMetadataIO.c * 99 * TestPoint: psMetadata ParseConfig{psMetadataParseConfig} *99 * TestPoint: psMetadataConfigParse{psMetadataConfigParse} * 100 100 * TestType: Positive * 101 101 \**********************************************************************************/ … … 116 116 Metadata type 'CELL6', found on line 31 of test5.config, is invalid. 117 117 118 ---> TESTPOINT PASSED (psMetadata ParseConfig{psMetadataParseConfig} | tst_psMetadataIO.c)118 ---> TESTPOINT PASSED (psMetadataConfigParse{psMetadataConfigParse} | tst_psMetadataIO.c) 119 119
Note:
See TracChangeset
for help on using the changeset viewer.
