From 6c0f470d9dc4cc1d5e75687fef7245aa2d2fd0c6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 18 Jul 2011 10:37:26 -0500 Subject: [svn-r21111] Renamed test files to more descriptive name Tested: local linux --- MANIFEST | 74 ++++++------- tools/h5import/CMakeLists.txt | 100 ++++++++--------- tools/h5import/h5import.c | 185 ++++++++++++++++---------------- tools/h5import/h5importtest.c | 94 +++++++--------- tools/h5import/h5importtestutil.sh | 113 ++++++++++--------- tools/h5import/testfiles/binfp32.conf | 12 --- tools/h5import/testfiles/binfp64.h5 | Bin 0 -> 10760 bytes tools/h5import/testfiles/binin16.h5 | Bin 0 -> 10760 bytes tools/h5import/testfiles/binin32.h5 | Bin 0 -> 9472 bytes tools/h5import/testfiles/binin8.h5 | Bin 0 -> 10760 bytes tools/h5import/testfiles/binin8w.conf | 9 ++ tools/h5import/testfiles/binin8w.h5 | Bin 0 -> 2852 bytes tools/h5import/testfiles/binuin16.h5 | Bin 0 -> 10760 bytes tools/h5import/testfiles/binuin32.h5 | Bin 0 -> 6384 bytes tools/h5import/testfiles/fp1.txt | 9 -- tools/h5import/testfiles/fp2.txt | 19 ---- tools/h5import/testfiles/in1.txt | 15 --- tools/h5import/testfiles/in16.txt | 15 --- tools/h5import/testfiles/in32.txt | 15 --- tools/h5import/testfiles/in64.txt | 2 - tools/h5import/testfiles/str.txt | 2 - tools/h5import/testfiles/test1.h5 | Bin 4192 -> 0 bytes tools/h5import/testfiles/test10.h5 | Bin 10760 -> 0 bytes tools/h5import/testfiles/test11.h5 | Bin 9472 -> 0 bytes tools/h5import/testfiles/test12.h5 | Bin 10760 -> 0 bytes tools/h5import/testfiles/test13.h5 | Bin 6384 -> 0 bytes tools/h5import/testfiles/test14.h5 | Bin 10240 -> 0 bytes tools/h5import/testfiles/test15.h5 | Bin 2064 -> 0 bytes tools/h5import/testfiles/test2.h5 | Bin 9784 -> 0 bytes tools/h5import/testfiles/test3.h5 | Bin 9784 -> 0 bytes tools/h5import/testfiles/test4.h5 | Bin 6240 -> 0 bytes tools/h5import/testfiles/test5.h5 | Bin 10240 -> 0 bytes tools/h5import/testfiles/test6.h5 | Bin 4192 -> 0 bytes tools/h5import/testfiles/test7.h5 | Bin 9784 -> 0 bytes tools/h5import/testfiles/test8.h5 | Bin 10760 -> 0 bytes tools/h5import/testfiles/test9.h5 | Bin 10760 -> 0 bytes tools/h5import/testfiles/textfp32.conf | 10 -- tools/h5import/testfiles/textfp64.conf | 13 --- tools/h5import/testfiles/textin16.conf | 12 --- tools/h5import/testfiles/textin32.conf | 11 -- tools/h5import/testfiles/textin8.conf | 17 --- tools/h5import/testfiles/textpfe.h5 | Bin 0 -> 2064 bytes tools/h5import/testfiles/textpfe64.txt | 2 + tools/h5import/testfiles/textstr.conf | 6 -- tools/h5import/testfiles/textuin16.conf | 12 --- tools/h5import/testfiles/textuin32.conf | 11 -- tools/h5import/testfiles/txtfp32.conf | 10 ++ tools/h5import/testfiles/txtfp32.h5 | Bin 0 -> 4192 bytes tools/h5import/testfiles/txtfp32.txt | 9 ++ tools/h5import/testfiles/txtfp64.conf | 13 +++ tools/h5import/testfiles/txtfp64.h5 | Bin 0 -> 9784 bytes tools/h5import/testfiles/txtfp64.txt | 19 ++++ tools/h5import/testfiles/txtin16.conf | 12 +++ tools/h5import/testfiles/txtin16.h5 | Bin 0 -> 9784 bytes tools/h5import/testfiles/txtin16.txt | 15 +++ tools/h5import/testfiles/txtin32.conf | 11 ++ tools/h5import/testfiles/txtin32.h5 | Bin 0 -> 4192 bytes tools/h5import/testfiles/txtin32.txt | 15 +++ tools/h5import/testfiles/txtin8.conf | 18 ++++ tools/h5import/testfiles/txtin8.h5 | Bin 0 -> 9784 bytes tools/h5import/testfiles/txtstr.conf | 6 ++ tools/h5import/testfiles/txtstr.h5 | Bin 0 -> 10240 bytes tools/h5import/testfiles/txtstr.txt | 2 + tools/h5import/testfiles/txtuin16.conf | 12 +++ tools/h5import/testfiles/txtuin16.h5 | Bin 0 -> 10240 bytes tools/h5import/testfiles/txtuin32.conf | 11 ++ tools/h5import/testfiles/txtuin32.h5 | Bin 0 -> 6240 bytes tools/h5import/testfiles/txtuin32.txt | 15 +++ 68 files changed, 458 insertions(+), 468 deletions(-) delete mode 100755 tools/h5import/testfiles/binfp32.conf create mode 100644 tools/h5import/testfiles/binfp64.h5 create mode 100644 tools/h5import/testfiles/binin16.h5 create mode 100644 tools/h5import/testfiles/binin32.h5 create mode 100644 tools/h5import/testfiles/binin8.h5 create mode 100644 tools/h5import/testfiles/binin8w.conf create mode 100644 tools/h5import/testfiles/binin8w.h5 create mode 100644 tools/h5import/testfiles/binuin16.h5 create mode 100644 tools/h5import/testfiles/binuin32.h5 delete mode 100755 tools/h5import/testfiles/fp1.txt delete mode 100755 tools/h5import/testfiles/fp2.txt delete mode 100755 tools/h5import/testfiles/in1.txt delete mode 100644 tools/h5import/testfiles/in16.txt delete mode 100644 tools/h5import/testfiles/in32.txt delete mode 100644 tools/h5import/testfiles/in64.txt delete mode 100644 tools/h5import/testfiles/str.txt delete mode 100644 tools/h5import/testfiles/test1.h5 delete mode 100644 tools/h5import/testfiles/test10.h5 delete mode 100644 tools/h5import/testfiles/test11.h5 delete mode 100644 tools/h5import/testfiles/test12.h5 delete mode 100644 tools/h5import/testfiles/test13.h5 delete mode 100644 tools/h5import/testfiles/test14.h5 delete mode 100644 tools/h5import/testfiles/test15.h5 delete mode 100644 tools/h5import/testfiles/test2.h5 delete mode 100644 tools/h5import/testfiles/test3.h5 delete mode 100644 tools/h5import/testfiles/test4.h5 delete mode 100644 tools/h5import/testfiles/test5.h5 delete mode 100644 tools/h5import/testfiles/test6.h5 delete mode 100644 tools/h5import/testfiles/test7.h5 delete mode 100644 tools/h5import/testfiles/test8.h5 delete mode 100644 tools/h5import/testfiles/test9.h5 delete mode 100755 tools/h5import/testfiles/textfp32.conf delete mode 100755 tools/h5import/testfiles/textfp64.conf delete mode 100755 tools/h5import/testfiles/textin16.conf delete mode 100755 tools/h5import/testfiles/textin32.conf delete mode 100755 tools/h5import/testfiles/textin8.conf create mode 100644 tools/h5import/testfiles/textpfe.h5 create mode 100644 tools/h5import/testfiles/textpfe64.txt delete mode 100644 tools/h5import/testfiles/textstr.conf delete mode 100755 tools/h5import/testfiles/textuin16.conf delete mode 100755 tools/h5import/testfiles/textuin32.conf create mode 100755 tools/h5import/testfiles/txtfp32.conf create mode 100644 tools/h5import/testfiles/txtfp32.h5 create mode 100755 tools/h5import/testfiles/txtfp32.txt create mode 100755 tools/h5import/testfiles/txtfp64.conf create mode 100644 tools/h5import/testfiles/txtfp64.h5 create mode 100755 tools/h5import/testfiles/txtfp64.txt create mode 100755 tools/h5import/testfiles/txtin16.conf create mode 100644 tools/h5import/testfiles/txtin16.h5 create mode 100644 tools/h5import/testfiles/txtin16.txt create mode 100755 tools/h5import/testfiles/txtin32.conf create mode 100644 tools/h5import/testfiles/txtin32.h5 create mode 100644 tools/h5import/testfiles/txtin32.txt create mode 100755 tools/h5import/testfiles/txtin8.conf create mode 100644 tools/h5import/testfiles/txtin8.h5 create mode 100644 tools/h5import/testfiles/txtstr.conf create mode 100644 tools/h5import/testfiles/txtstr.h5 create mode 100644 tools/h5import/testfiles/txtstr.txt create mode 100755 tools/h5import/testfiles/txtuin16.conf create mode 100644 tools/h5import/testfiles/txtuin16.h5 create mode 100755 tools/h5import/testfiles/txtuin32.conf create mode 100644 tools/h5import/testfiles/txtuin32.h5 create mode 100755 tools/h5import/testfiles/txtuin32.txt diff --git a/MANIFEST b/MANIFEST index bc1c677..b25e368 100644 --- a/MANIFEST +++ b/MANIFEST @@ -975,45 +975,47 @@ ./tools/h5import/h5import.c ./tools/h5import/h5importtest.c ./tools/h5import/h5importtestutil.sh -./tools/h5import/testfiles/binfp32.conf + +# testfiles for h5import +./tools/h5import/testfiles/binin32.h5 +./tools/h5import/testfiles/binin16.h5 +./tools/h5import/testfiles/txtfp32.txt +./tools/h5import/testfiles/txtstr.conf +./tools/h5import/testfiles/txtfp32.conf +./tools/h5import/testfiles/binin8w.conf +./tools/h5import/testfiles/binin8.h5 +./tools/h5import/testfiles/txtfp64.conf +./tools/h5import/testfiles/binuin32.conf +./tools/h5import/testfiles/txtuin32.txt +./tools/h5import/testfiles/binuin16.conf +./tools/h5import/testfiles/txtstr.h5 +./tools/h5import/testfiles/txtfp32.h5 +./tools/h5import/testfiles/txtin32.h5 +./tools/h5import/testfiles/txtin16.h5 +./tools/h5import/testfiles/binin8w.h5 +./tools/h5import/testfiles/txtin32.txt ./tools/h5import/testfiles/binfp64.conf -./tools/h5import/testfiles/binin16.conf -./tools/h5import/testfiles/binin32.conf ./tools/h5import/testfiles/binin8.conf -./tools/h5import/testfiles/binuin16.conf -./tools/h5import/testfiles/binuin32.conf -./tools/h5import/testfiles/fp1.txt -./tools/h5import/testfiles/fp2.txt -./tools/h5import/testfiles/in1.txt -./tools/h5import/testfiles/textfp32.conf -./tools/h5import/testfiles/textfp64.conf -./tools/h5import/testfiles/textin16.conf -./tools/h5import/testfiles/textin32.conf -./tools/h5import/testfiles/textin8.conf -./tools/h5import/testfiles/textuin16.conf -./tools/h5import/testfiles/textuin32.conf -./tools/h5import/testfiles/test1.h5 -./tools/h5import/testfiles/test2.h5 -./tools/h5import/testfiles/test3.h5 -./tools/h5import/testfiles/test4.h5 -./tools/h5import/testfiles/test5.h5 -./tools/h5import/testfiles/test6.h5 -./tools/h5import/testfiles/test7.h5 -./tools/h5import/testfiles/test8.h5 -./tools/h5import/testfiles/test9.h5 -./tools/h5import/testfiles/test10.h5 -./tools/h5import/testfiles/test11.h5 -./tools/h5import/testfiles/test12.h5 -./tools/h5import/testfiles/test13.h5 -./tools/h5import/testfiles/test14.h5 -./tools/h5import/testfiles/test15.h5 -./tools/h5import/testfiles/textstr.conf -./tools/h5import/testfiles/str.txt +./tools/h5import/testfiles/txtin8.conf +./tools/h5import/testfiles/binfp64.h5 +./tools/h5import/testfiles/txtstr.txt +./tools/h5import/testfiles/txtin32.conf +./tools/h5import/testfiles/txtin16.conf +./tools/h5import/testfiles/txtin8.h5 +./tools/h5import/testfiles/txtuin32.conf +./tools/h5import/testfiles/txtuin16.conf +./tools/h5import/testfiles/binin32.conf +./tools/h5import/testfiles/binin16.conf +./tools/h5import/testfiles/txtfp64.h5 +./tools/h5import/testfiles/txtin16.txt +./tools/h5import/testfiles/txtfp64.txt +./tools/h5import/testfiles/binuin32.h5 +./tools/h5import/testfiles/binuin16.h5 +./tools/h5import/testfiles/txtuin32.h5 +./tools/h5import/testfiles/txtuin16.h5 ./tools/h5import/testfiles/textpfe.conf -./tools/h5import/testfiles/in64.txt -./tools/h5import/testfiles/in32.txt -./tools/h5import/testfiles/in16.txt - +./tools/h5import/testfiles/textpfe64.txt +./tools/h5import/testfiles/textpfe.h5 # h5diff sources ./tools/h5diff/Makefile.am diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index 10be869..abd0b7d 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -31,48 +31,49 @@ IF (BUILD_TESTING) TARGET_LINK_LIBRARIES (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET}) SET (HDF5_REFERENCE_CONF_FILES - binfp32.conf binfp64.conf binin8.conf + binin8w.conf binin16.conf binin32.conf binuin16.conf binuin32.conf - textfp32.conf - textfp64.conf - textin8.conf - textin16.conf - textin32.conf - textuin16.conf - textuin32.conf + txtfp32.conf + txtfp64.conf + txtin8.conf + txtin16.conf + txtin32.conf + txtuin16.conf + txtuin32.conf textpfe.conf - textstr.conf + txtstr.conf ) SET (HDF5_REFERENCE_TXT_FILES - fp1.txt - fp2.txt - in1.txt - in16.txt - in32.txt - in64.txt - str.txt + txtfp32.txt + txtfp64.txt + txtuin32.txt + txtin16.txt + txtin32.txt + textpfe64.txt + txtstr.txt ) SET (HDF5_REFERENCE_TEST_FILES - test1.h5 - test2.h5 - test3.h5 - test4.h5 - test5.h5 - test6.h5 - test7.h5 - test8.h5 - test9.h5 - test10.h5 - test11.h5 - test12.h5 - test13.h5 - test14.h5 - test15.h5 + binfp64.h5 + binin8.h5 + binin8w.h5 + binin16.h5 + binin32.h5 + binuin16.h5 + binuin32.h5 + txtfp32.h5 + txtfp64.h5 + txtin8.h5 + txtin16.h5 + txtin32.h5 + txtuin16.h5 + txtuin32.h5 + txtstr.h5 + textpfe.h5 ) FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") @@ -132,7 +133,7 @@ IF (BUILD_TESTING) SET (last_test "H5IMPORT-${testname}-clear-objects") ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER) - ADD_TEST (NAME H5IMPORT-${testname} COMMAND $ ${importfile} -c testfiles/${conffile} -o ${testfile}) + ADD_TEST (NAME H5IMPORT-${testname} COMMAND $ ${importfile} -c testfiles/${conffile} -o ${testfile}) IF (NOT "${last_test}" STREQUAL "") SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS ${last_test}) ENDIF (NOT "${last_test}" STREQUAL "") @@ -200,50 +201,53 @@ IF (BUILD_TESTING) ENDIF (NOT "${last_test}" STREQUAL "") SET (last_test "H5IMPORT-h5importtest") - # ----- TESTING "ASCII I32 rank 3 - Output BE " - ADD_H5_TEST (ASCII_I32 in32.txt textin32.conf test1.h5) + # ----- TESTING "ASCII I32 rank 3 - Output BE " ; + ADD_H5_TEST (ASCII_I32 txtin16.txt txtin32.conf txtin32.h5) # ----- TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" - ADD_H5_TEST (ASCII_I16 in16.txt textin16.conf test2.h5) + ADD_H5_TEST (ASCII_I16 txtin16.txt txtin16.conf txtin16.h5) # ----- TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed " - ADD_H5_TEST (ASCII_I8 in16.txt textin8.conf test3.h5) + ADD_H5_TEST (ASCII_I8 txtin16.txt txtin8.conf txtin8.h5) # ----- TESTING "ASCII UI32 - rank 3 - Output BE" - ADD_H5_TEST (ASCII_UI32 in1.txt textuin32.conf test4.h5) + ADD_H5_TEST (ASCII_UI32 txtuin32.txt txtuin32.conf txtuin32.h5) # ----- TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " - ADD_H5_TEST (ASCII_UI16 in1.txt textuin16.conf test5.h5) + ADD_H5_TEST (ASCII_UI16 txtuin32.txt txtuin16.conf txtuin16.h5) # ----- TESTING "ASCII F32 - rank 3 - Output LE " - ADD_H5_TEST (ASCII_F32 fp1.txt textfp32.conf test6.h5) + ADD_H5_TEST (ASCII_F32 txtfp32.txt txtfp32.conf txtfp32.h5) # ----- TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed " - ADD_H5_TEST (ASCII_F64 fp2.txt textfp64.conf test7.h5) + ADD_H5_TEST (ASCII_F64 txtfp64.txt txtfp64.conf txtfp64.h5) # ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " - ADD_H5_TEST (BINARY_F64 binfp64.bin binfp64.conf test8.h5) + ADD_H5_TEST (BINARY_F64 binfp64.bin binfp64.conf binfp64.h5) # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " - ADD_H5_TEST (BINARY_I16 binin16.bin binin16.conf test9.h5) + ADD_H5_TEST (BINARY_I16 binin16.bin binin16.conf binin16.h5) # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " - ADD_H5_TEST (BINARY_I8 binin8.bin binin8.conf test10.h5) + ADD_H5_TEST (BINARY_I8 binin8.bin binin8.conf binin8.h5) # ----- TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED " - ADD_H5_TEST (BINARY_I32 binin32.bin binin32.conf test11.h5) + ADD_H5_TEST (BINARY_I32 binin32.bin binin32.conf binin32.h5) # ----- TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED " - ADD_H5_TEST (BINARY_UI16 binuin16.bin binuin16.conf test12.h5) + ADD_H5_TEST (BINARY_UI16 binuin16.bin binuin16.conf binuin16.h5) # ----- TESTING "BINARY UI32 - rank 3 - Output LE + CHUNKED " - ADD_H5_TEST (BINARY_UI32 binuin32.bin binuin32.conf test13.h5) + ADD_H5_TEST (BINARY_UI32 binuin32.bin binuin32.conf binuin32.h5) # ----- TESTING "STR" - ADD_H5_TEST (STR str.txt textstr.conf test14.h5) + ADD_H5_TEST (STR txtstr.txt txtstr.conf txtstr.h5) + + # ----- TESTING "BINARY I8 CR LF EOF" + ADD_H5_TEST (BINARY_I8_EOF binin8w.bin binin8w.conf binin8w.h5) # ----- TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE " - ADD_H5_TEST (ASCII_F64_R1 in64.txt textpfe.conf test15.h5) + ADD_H5_TEST (ASCII_F64_R1 textpfe64.txt textpfe.conf textpfe.h5) ENDIF (BUILD_TESTING) diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index bbd8746..cfed58b 100755 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -25,6 +25,12 @@ /* Name of tool */ #define PROGRAMNAME "h5import" +#ifdef WIN32 +#define READ_OPEN_FLAGS "rb" +#else +#define READ_OPEN_FLAGS "r" +#endif + int main(int argc, char *argv[]) { struct Options opt; @@ -50,8 +56,8 @@ int main(int argc, char *argv[]) (void) HDsetvbuf(stderr, (char *) NULL, _IOLBF, 0); (void) HDsetvbuf(stdout, (char *) NULL, _IOLBF, 0); - if (argv[1] && (strcmp("-V", argv[1]) == 0)) { - print_version("h5import"); + if (argv[1] && (HDstrcmp("-V", argv[1]) == 0)) { + print_version(PROGRAMNAME); exit(EXIT_SUCCESS); } @@ -185,15 +191,15 @@ int main(int argc, char *argv[]) for (i = 0; i < opt.fcount; i++) { in = &(opt.infiles[i].in); if (in->sizeOfDimension) - free(in->sizeOfDimension); + HDfree(in->sizeOfDimension); if (in->sizeOfChunk) - free(in->sizeOfChunk); + HDfree(in->sizeOfChunk); if (in->maxsizeOfDimension) - free(in->maxsizeOfDimension); + HDfree(in->maxsizeOfDimension); if (in->externFilename) - free(in->externFilename); + HDfree(in->externFilename); if (in->data) - free(in->data); + HDfree(in->data); } return (EXIT_SUCCESS); @@ -202,15 +208,15 @@ err: for (i = 0; i < opt.fcount; i++) { in = &(opt.infiles[i].in); if (in->sizeOfDimension) - free(in->sizeOfDimension); + HDfree(in->sizeOfDimension); if (in->sizeOfChunk) - free(in->sizeOfChunk); + HDfree(in->sizeOfChunk); if (in->maxsizeOfDimension) - free(in->maxsizeOfDimension); + HDfree(in->maxsizeOfDimension); if (in->externFilename) - free(in->externFilename); + HDfree(in->externFilename); if (in->data) - free(in->data); + HDfree(in->data); } return (EXIT_FAILURE); } @@ -311,28 +317,17 @@ static int processDataFile(char *infile, struct Input *in, hid_t file_id) */ if (in->inputClass == 4 /* "IN" */|| in->inputClass == 3 /* "FP" */|| in->inputClass == 7 /* "UIN" */) { -#ifdef WIN32 - - if ((strm = fopen(infile, "rb")) == NULL) { - (void) fprintf(stderr, err1, infile); - return(-1); - } -#else - - if ((strm = fopen(infile, "r")) == NULL) { + if ((strm = HDfopen(infile, READ_OPEN_FLAGS)) == NULL) { (void) fprintf(stderr, err1, infile); return (-1); } - -#endif - } /*------------------------------------------------------------------------- * if the input class is not binary, just use "r" *------------------------------------------------------------------------- */ else { - if ((strm = fopen(infile, "r")) == NULL) { + if ((strm = HDfopen(infile, "r")) == NULL) { (void) fprintf(stderr, err1, infile); return (-1); } @@ -343,13 +338,13 @@ static int processDataFile(char *infile, struct Input *in, hid_t file_id) case 4: /* IN */ if (allocateIntegerStorage(in) == -1) { (void) fprintf(stderr, err2, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (readIntegerData(strm, in) == -1) { (void) fprintf(stderr, err4, infile); - fclose(strm); + HDfclose(strm); return (-1); } break; @@ -359,14 +354,14 @@ static int processDataFile(char *infile, struct Input *in, hid_t file_id) case 3: /* FP */ if (allocateFloatStorage(in) == -1) { (void) fprintf(stderr, err3, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (readFloatData(strm, in) == -1) { (void) fprintf(stderr, err5, infile); - fclose(strm); + HDfclose(strm); return (-1); } break; @@ -375,7 +370,7 @@ static int processDataFile(char *infile, struct Input *in, hid_t file_id) if (processStrData(strm, in, file_id) == -1) { (void) fprintf(stderr, err11, infile); - fclose(strm); + HDfclose(strm); return (-1); } @@ -385,22 +380,22 @@ static int processDataFile(char *infile, struct Input *in, hid_t file_id) case 7: /* UIN */ if (allocateUIntegerStorage(in) == -1) { (void) fprintf(stderr, err6, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (readUIntegerData(strm, in) == -1) { (void) fprintf(stderr, err7, infile); - fclose(strm); + HDfclose(strm); return (-1); } break; default: (void) fprintf(stderr, "%s", err10); - fclose(strm); + HDfclose(strm); return (-1); } - fclose(strm); + HDfclose(strm); return (0); } @@ -410,7 +405,7 @@ static int readIntegerData(FILE *strm, struct Input *in) H5DT_INT16 *in16; H5DT_INT16 temp; H5DT_INT32 *in32; -#ifndef WIN32 +#ifdef H5_SIZEOF_LONG_LONG H5DT_INT64 *in64; char buffer[256]; #endif @@ -442,7 +437,7 @@ static int readIntegerData(FILE *strm, struct Input *in) case 4: /* IN */ in08 = (H5DT_INT8 *) in->data; for (i = 0; i < len; i++, in08++) { - if (fread((char *) in08, sizeof(H5DT_INT8), 1, strm) != 1) { + if (HDfread((char *) in08, sizeof(H5DT_INT8), 1, strm) != 1) { (void) fprintf(stderr, "%s", err1); return (-1); } @@ -470,7 +465,7 @@ static int readIntegerData(FILE *strm, struct Input *in) case 4: /* IN */ for (i = 0; i < len; i++, in16++) { - if (fread((char *) in16, sizeof(H5DT_INT16), 1, strm) != 1) { + if (HDfread((char *) in16, sizeof(H5DT_INT16), 1, strm) != 1) { (void) fprintf(stderr, "%s", err1); return (-1); } @@ -497,7 +492,7 @@ static int readIntegerData(FILE *strm, struct Input *in) case 4: /* IN */ for (i = 0; i < len; i++, in32++) { - if (fread((char *) in32, sizeof(H5DT_INT32), 1, strm) != 1) { + if (HDfread((char *) in32, sizeof(H5DT_INT32), 1, strm) != 1) { (void) fprintf(stderr, "%s", err1); return (-1); } @@ -510,7 +505,7 @@ static int readIntegerData(FILE *strm, struct Input *in) } break; -#ifndef _WIN32 +#ifdef H5_SIZEOF_LONG_LONG case 64: in64 = (H5DT_INT64 *) in->data; switch (in->inputClass) { @@ -526,7 +521,7 @@ static int readIntegerData(FILE *strm, struct Input *in) case 4: /* IN */ for (i = 0; i < len; i++, in64++) { - if (fread((char *) in64, sizeof(H5DT_INT64), 1, strm) != 1) { + if (HDfread((char *) in64, sizeof(H5DT_INT64), 1, strm) != 1) { (void) fprintf(stderr, "%s", err1); return (-1); } @@ -538,7 +533,7 @@ static int readIntegerData(FILE *strm, struct Input *in) return (-1); } break; -#endif /* ifndef _WIN32 */ +#endif /* ifdef H5_SIZEOF_LONG_LONG */ default: (void) fprintf(stderr, "%s", err3); @@ -553,7 +548,7 @@ static int readUIntegerData(FILE *strm, struct Input *in) H5DT_UINT16 *in16; H5DT_UINT16 temp; H5DT_UINT32 *in32; -#ifndef _WIN32 +#ifdef H5_SIZEOF_LONG_LONG H5DT_UINT64 *in64; char buffer[256]; #endif @@ -584,7 +579,7 @@ static int readUIntegerData(FILE *strm, struct Input *in) case 7: /* UIN */ in08 = (H5DT_UINT8 *) in->data; for (i = 0; i < len; i++, in08++) { - if (fread((char *) in08, sizeof(H5DT_UINT8), 1, strm) != 1) { + if (HDfread((char *) in08, sizeof(H5DT_UINT8), 1, strm) != 1) { (void) fprintf(stderr, "%s", err1); return (-1); } @@ -611,7 +606,7 @@ static int readUIntegerData(FILE *strm, struct Input *in) case 7: /* UIN */ for (i = 0; i < len; i++, in16++) { - if (fread((char *) in16, sizeof(H5DT_UINT16), 1, strm) != 1) { + if (HDfread((char *) in16, sizeof(H5DT_UINT16), 1, strm) != 1) { (void) fprintf(stderr, "%s", err1); return (-1); } @@ -638,7 +633,7 @@ static int readUIntegerData(FILE *strm, struct Input *in) case 7: /* UIN */ for (i = 0; i < len; i++, in32++) { - if (fread((char *) in32, sizeof(H5DT_UINT32), 1, strm) != 1) { + if (HDfread((char *) in32, sizeof(H5DT_UINT32), 1, strm) != 1) { (void) fprintf(stderr, "%s", err1); return (-1); } @@ -651,7 +646,7 @@ static int readUIntegerData(FILE *strm, struct Input *in) } break; -#ifndef _WIN32 +#ifdef H5_SIZEOF_LONG_LONG case 64: in64 = (H5DT_UINT64 *) in->data; switch (in->inputClass) { @@ -667,7 +662,7 @@ static int readUIntegerData(FILE *strm, struct Input *in) case 7: /* UIN */ for (i = 0; i < len; i++, in64++) { - if (fread((char *) in64, sizeof(H5DT_UINT64), 1, strm) != 1) { + if (HDfread((char *) in64, sizeof(H5DT_UINT64), 1, strm) != 1) { (void) fprintf(stderr, "%s", err1); return (-1); } @@ -679,7 +674,7 @@ static int readUIntegerData(FILE *strm, struct Input *in) return (-1); } break; -#endif /* ifndef _WIN32 */ +#endif /* ifdef H5_SIZEOF_LONG_LONG */ default: (void) fprintf(stderr, "%s", err3); @@ -733,7 +728,7 @@ static int readFloatData(FILE *strm, struct Input *in) case 3: /* FP */ for (i = 0; i < len; i++, fp32++) { - if (fread((char *) fp32, sizeof(H5DT_FLOAT32), 1, strm) != 1) { + if (HDfread((char *) fp32, sizeof(H5DT_FLOAT32), 1, strm) != 1) { (void) fprintf(stderr, "%s", err1); return (-1); } @@ -775,7 +770,7 @@ static int readFloatData(FILE *strm, struct Input *in) case 3: /* FP */ for (i = 0; i < len; i++, fp64++) { - if (fread((char *) fp64, sizeof(H5DT_FLOAT64), 1, strm) != 1) { + if (HDfread((char *) fp64, sizeof(H5DT_FLOAT64), 1, strm) != 1) { (void) fprintf(stderr, "%s", err1); return (-1); } @@ -830,8 +825,8 @@ static int processStrData(FILE *strm, struct Input *in, hid_t file_id) *------------------------------------------------------------------------- */ - while (!feof(strm)) { - c = fgetc(strm); + while (!HDfeof(strm)) { + c = HDfgetc(strm); if (c == 10) { /* eol */ nlines++; @@ -845,7 +840,7 @@ static int processStrData(FILE *strm, struct Input *in, hid_t file_id) dims[0] = nlines; /* rewind */ - fseek(strm, 0L, 0); + HDfseek(strm, 0L, 0); /*------------------------------------------------------------------------- * read file again and generate an HDF5 dataset @@ -897,8 +892,8 @@ static int processStrData(FILE *strm, struct Input *in, hid_t file_id) line = 0; - while (!feof(strm)) { - c = fgetc(strm); + while (!HDfeof(strm)) { + c = HDfgetc(strm); str[i] = c; @@ -1120,7 +1115,7 @@ static int processConfigurationFile(char *infile, struct Input *in) process the output file according to the options */ - if ((strm = fopen(infile, "r")) == NULL) { + if ((strm = HDfopen(infile, "r")) == NULL) { (void) fprintf(stderr, err1, infile); return (-1); } @@ -1128,24 +1123,24 @@ static int processConfigurationFile(char *infile, struct Input *in) while (fscanf(strm, "%s", key) == 1) { if ((kindex = mapKeywordToIndex(key)) == -1) { (void) fprintf(stderr, err2, infile); - fclose(strm); + HDfclose(strm); return (-1); } switch (kindex) { case 0: /* PATH */ if (in->configOptionVector[PATH] == 1) { (void) fprintf(stderr, err3a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (fscanf(strm, "%s", temp) != 1) { (void) fprintf(stderr, "%s", err18); - fclose(strm); + HDfclose(strm); return (-1); } if (parsePathInfo(&in->path, temp) == -1) { (void) fprintf(stderr, err3b, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[PATH] = 1; @@ -1154,18 +1149,18 @@ static int processConfigurationFile(char *infile, struct Input *in) case 1: /* INPUT-CLASS */ if (in->configOptionVector[INPUT_CLASS] == 1) { (void) fprintf(stderr, err4a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (fscanf(strm, "%s", temp) != 1) { (void) fprintf(stderr, "%s", err18); - fclose(strm); + HDfclose(strm); return (-1); } if (getInputClass(in, temp) == -1) { (void) fprintf(stderr, err4b, infile); - fclose(strm); + HDfclose(strm); return (-1); } @@ -1186,17 +1181,17 @@ static int processConfigurationFile(char *infile, struct Input *in) case 2: /* INPUT-SIZE */ if (in->configOptionVector[INPUT_SIZE] == 1) { (void) fprintf(stderr, err5a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (fscanf(strm, "%d", (&ival)) != 1) { (void) fprintf(stderr, "%s", err19); - fclose(strm); + HDfclose(strm); return (-1); } if (getInputSize(in, ival) == -1) { (void) fprintf(stderr, err5b, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[INPUT_SIZE] = 1; @@ -1209,13 +1204,13 @@ static int processConfigurationFile(char *infile, struct Input *in) case 3: /* RANK */ if (in->configOptionVector[RANK] == 1) { (void) fprintf(stderr, err6a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (getRank(in, strm) == -1) { (void) fprintf(stderr, err6b, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[RANK] = 1; @@ -1224,18 +1219,18 @@ static int processConfigurationFile(char *infile, struct Input *in) case 4: /* DIMENSION-SIZES */ if (in->configOptionVector[DIM] == 1) { (void) fprintf(stderr, err7a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (in->configOptionVector[RANK] == 0) { (void) fprintf(stderr, err7b, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (getDimensionSizes(in, strm) == -1) { (void) fprintf(stderr, err7c, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[DIM] = 1; @@ -1244,13 +1239,13 @@ static int processConfigurationFile(char *infile, struct Input *in) case 5: /* OUTPUT-CLASS */ if (in->configOptionVector[OUTPUT_CLASS] == 1) { (void) fprintf(stderr, err8a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (getOutputClass(in, strm) == -1) { (void) fprintf(stderr, err8b, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[OUTPUT_CLASS] = 1; @@ -1259,13 +1254,13 @@ static int processConfigurationFile(char *infile, struct Input *in) case 6: /* OUTPUT-SIZE */ if (in->configOptionVector[OUTPUT_SIZE] == 1) { (void) fprintf(stderr, err9a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (getOutputSize(in, strm) == -1) { (void) fprintf(stderr, err9b, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[OUTPUT_SIZE] = 1; @@ -1274,13 +1269,13 @@ static int processConfigurationFile(char *infile, struct Input *in) case 7: /* OUTPUT-ARCHITECTURE */ if (in->configOptionVector[OUTPUT_ARCH] == 1) { (void) fprintf(stderr, err10a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (getOutputArchitecture(in, strm) == -1) { (void) fprintf(stderr, err10b, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[OUTPUT_ARCH] = 1; @@ -1289,13 +1284,13 @@ static int processConfigurationFile(char *infile, struct Input *in) case 8: /* OUTPUT-BYTE-ORDER */ if (in->configOptionVector[OUTPUT_B_ORDER] == 1) { (void) fprintf(stderr, err11a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (getOutputByteOrder(in, strm) == -1) { (void) fprintf(stderr, err11b, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[OUTPUT_B_ORDER] = 1; @@ -1304,19 +1299,19 @@ static int processConfigurationFile(char *infile, struct Input *in) case 9: /* CHUNKED-DIMENSION-SIZES */ if (in->configOptionVector[CHUNK] == 1) { (void) fprintf(stderr, err12a, infile); - fclose(strm); + HDfclose(strm); return (-1); } /* cant appear before dimension sizes have been provided */ if (in->configOptionVector[DIM] == 0) { (void) fprintf(stderr, err12b, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (getChunkedDimensionSizes(in, strm) == -1) { (void) fprintf(stderr, err12c, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[CHUNK] = 1; @@ -1325,13 +1320,13 @@ static int processConfigurationFile(char *infile, struct Input *in) case 10: /* COMPRESSION-TYPE */ if (in->configOptionVector[COMPRESS] == 1) { (void) fprintf(stderr, err13a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (getCompressionType(in, strm) == -1) { (void) fprintf(stderr, err13b, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[COMPRESS] = 1; @@ -1345,13 +1340,13 @@ static int processConfigurationFile(char *infile, struct Input *in) case 11: /* COMPRESSION-PARAM */ if (in->configOptionVector[COMPRESS_PARAM] == 1) { (void) fprintf(stderr, err14a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (getCompressionParameter(in, strm) == -1) { (void) fprintf(stderr, err14b, infile); - fclose(strm); + HDfclose(strm); return (-1); } @@ -1365,13 +1360,13 @@ static int processConfigurationFile(char *infile, struct Input *in) case 12: /* EXTERNAL-STORAGE */ if (in->configOptionVector[EXTERNAL] == 1) { (void) fprintf(stderr, err15a, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (getExternalFilename(in, strm) == -1) { (void) fprintf(stderr, err15b, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[EXTERNAL] = 1; @@ -1380,18 +1375,18 @@ static int processConfigurationFile(char *infile, struct Input *in) case 13: /* MAXIMUM-DIMENSIONS */ if (in->configOptionVector[EXTEND] == 1) { (void) fprintf(stderr, err16a, infile); - fclose(strm); + HDfclose(strm); return (-1); } /* cant appear before dimension sizes have been provided */ if (in->configOptionVector[DIM] == 0) { (void) fprintf(stderr, err16b, infile); - fclose(strm); + HDfclose(strm); return (-1); } if (getMaximumDimensionSizes(in, strm) == -1) { (void) fprintf(stderr, err16c, infile); - fclose(strm); + HDfclose(strm); return (-1); } in->configOptionVector[EXTEND] = 1; @@ -1408,11 +1403,11 @@ static int processConfigurationFile(char *infile, struct Input *in) if (validateConfigurationParameters(in) == -1) { (void) fprintf(stderr, err17, infile); - fclose(strm); + HDfclose(strm); return (-1); } - fclose(strm); + HDfclose(strm); return (0); } @@ -1424,7 +1419,7 @@ static int validateConfigurationParameters(struct Input *in) const char *err4a = "OUTPUT-ARCHITECTURE cannot be STD if OUTPUT-CLASS is floating point (FP).\n"; const char *err4b = "OUTPUT-ARCHITECTURE cannot be IEEE if OUTPUT-CLASS is integer (IN).\n"; const char *err5 = "For OUTPUT-CLASS FP, valid values for OUTPUT-SIZE are (32, 64) .\n"; -#ifdef _WIN32 +#ifndef H5_SIZEOF_LONG_LONG const char *err6 = "No support for reading 64-bit integer (INPUT-CLASS: IN, TEXTIN, UIN, TEXTUIN files\n"; #endif @@ -1471,7 +1466,7 @@ static int validateConfigurationParameters(struct Input *in) return (-1); } -#ifdef _WIN32 +#ifndef H5_SIZEOF_LONG_LONG if (in->inputSize == 64 && (in->inputClass == 0 || in->inputClass == 4 || in->inputClass == 6 || in->inputClass == 7) ) { (void) fprintf(stderr, "%s", err6); return -1; diff --git a/tools/h5import/h5importtest.c b/tools/h5import/h5importtest.c index 9c839a3..2869236 100755 --- a/tools/h5import/h5importtest.c +++ b/tools/h5import/h5importtest.c @@ -16,6 +16,12 @@ #include #include "H5private.h" +#ifdef WIN32 +#define OPEN_FLAGS "wb" +#else +#define OPEN_FLAGS "w" +#endif + /* * Name: * h5importtest @@ -42,7 +48,7 @@ main(void) int rowo4i = (int)11 , colo4i = (int)21 , plno4i = (int)51 ; int rowi4i = (int)1 , coli4i = (int)2 , plni4i = (int)5 ; -#ifndef WIN32 +#ifdef H5_SIZEOF_LONG_LONG long long row4i64[3], col4i64[4], pln4i64[5]; long long rowo4i64 = (long long)11 , colo4i64 = (long long)21 , plno4i64 = (long long)51 ; long long rowi4i64 = (long long)1 , coli4i64 = (long long)2 , plni4i64 = (long long)5 ; @@ -91,7 +97,7 @@ main(void) col4i[0] = colo4i; pln4i[0] = plno4i; -#ifndef WIN32 +#ifdef H5_SIZEOF_LONG_LONG row4i64[0] = rowo4i64; col4i64[0] = colo4i64; pln4i64[0] = plno4i64; @@ -110,7 +116,7 @@ main(void) row4[i] = row4[i - 1] + rowi4; row8[i] = row8[i - 1] + rowi8; row4i[i] = row4i[i - 1] + rowi4i; -#ifndef WIN32 +#ifdef H5_SIZEOF_LONG_LONG row4i64[i] = row4i64[i - 1] + rowi4i64; #endif row4i16[i] = row4i16[i - 1] + rowi4i16; @@ -122,7 +128,7 @@ main(void) col4[j] = col4[j - 1] + coli4; col8[j] = col8[j - 1] + coli8; col4i[j] = col4i[j - 1] + coli4i; -#ifndef WIN32 +#ifdef H5_SIZEOF_LONG_LONG col4i64[j] = col4i64[j - 1] + coli4i64; #endif col4i16[j] = col4i16[j - 1] + coli4i16; @@ -133,7 +139,7 @@ main(void) pln4[k] = pln4[k - 1] + plni4; pln8[k] = pln8[k - 1] + plni8; pln4i[k] = pln4i[k - 1] + plni4i; -#ifndef WIN32 +#ifdef H5_SIZEOF_LONG_LONG pln4i64[k] = pln4i64[k - 1] + plni4i64; #endif pln4i16[k] = pln4i16[k - 1] + plni4i16; @@ -165,7 +171,7 @@ main(void) */ - sp = fopen("txtin16.txt", "w"); + sp = HDfopen("txtin16.txt", "w"); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) @@ -175,14 +181,14 @@ main(void) (void) fprintf(sp, "\n"); } } - (void) fclose(sp); + (void) HDfclose(sp); /*------------------------------------------------------------------------- * TOOLTEST txtin32.txt -c $srcdir/testfiles/textin32.conf -o textin32.h5 *------------------------------------------------------------------------- */ - sp = fopen("txtin32.txt", "w"); + sp = HDfopen("txtin32.txt", "w"); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) @@ -192,51 +198,43 @@ main(void) (void) fprintf(sp, "\n"); } } - (void) fclose(sp); + (void) HDfclose(sp); /*------------------------------------------------------------------------- * TOOLTEST binin32.bin -c $srcdir/testfiles/binin32.conf -o binin32.h5 *------------------------------------------------------------------------- */ -#ifdef WIN32 - sp = fopen("binin32.bin", "wb"); -#else - sp = fopen("binin32.bin", "w"); -#endif + sp = HDfopen("binin32.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { - (void) fwrite((char *) &b32i3[k][i][j], sizeof(int), 1, sp); + (void) HDfwrite((char *) &b32i3[k][i][j], sizeof(int), 1, sp); } } } - (void) fclose(sp); + (void) HDfclose(sp); /*------------------------------------------------------------------------- * TOOLTEST binuin32.bin -c $srcdir/testfiles/binuin32.conf -o binuin32.h5 *------------------------------------------------------------------------- */ -#ifdef WIN32 - sp = fopen("binuin32.bin", "wb"); -#else - sp = fopen("binuin32.bin", "w"); -#endif + sp = HDfopen("binuin32.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { - (void) fwrite((char *) &b32i3[k][i][j], sizeof(unsigned int), 1, sp); + (void) HDfwrite((char *) &b32i3[k][i][j], sizeof(unsigned int), 1, sp); } } } - (void) fclose(sp); + (void) HDfclose(sp); @@ -246,43 +244,35 @@ main(void) *------------------------------------------------------------------------- */ -#ifdef WIN32 - sp = fopen("binin16.bin", "wb"); -#else - sp = fopen("binin16.bin", "w"); -#endif + sp = HDfopen("binin16.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { - (void) fwrite((char *) &b16i3[k][i][j], sizeof(short), 1, sp); + (void) HDfwrite((char *) &b16i3[k][i][j], sizeof(short), 1, sp); } } } - (void) fclose(sp); + (void) HDfclose(sp); /*------------------------------------------------------------------------- * TOOLTEST binuin16.bin -c $srcdir/testfiles/binuin16.conf -o binuin16.h5 *------------------------------------------------------------------------- */ -#ifdef WIN32 - sp = fopen("binuin16.bin", "wb"); -#else - sp = fopen("binuin16.bin", "w"); -#endif + sp = HDfopen("binuin16.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { - (void) fwrite((char *) &b16i3[k][i][j], sizeof(unsigned short), 1, sp); + (void) HDfwrite((char *) &b16i3[k][i][j], sizeof(unsigned short), 1, sp); } } } - (void) fclose(sp); + (void) HDfclose(sp); @@ -291,22 +281,18 @@ main(void) *------------------------------------------------------------------------- */ -#ifdef WIN32 - sp = fopen("binin8.bin", "wb"); -#else - sp = fopen("binin8.bin", "w"); -#endif + sp = HDfopen("binin8.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { - (void) fwrite((char *) &b8i3[k][i][j], sizeof(char), 1, sp); + (void) HDfwrite((char *) &b8i3[k][i][j], sizeof(char), 1, sp); } } } - (void) fclose(sp); + (void) HDfclose(sp); #endif /* UNICOS */ @@ -322,22 +308,18 @@ main(void) * binary 64-bit file - rank 2 & 3 */ -#ifdef WIN32 - sp = fopen("binfp64.bin", "wb"); -#else - sp = fopen("binfp64.bin", "w"); -#endif + sp = HDfopen("binfp64.bin", OPEN_FLAGS); for (k = 0; k < npln; k++) { for (i = 0; i < nrow; i++) { for (j = 0; j < ncol; j++) { - (void) fwrite((char *) &b64r3[k][i][j], sizeof(double), 1, sp); + (void) HDfwrite((char *) &b64r3[k][i][j], sizeof(double), 1, sp); } } } - (void) fclose(sp); + (void) HDfclose(sp); @@ -350,18 +332,14 @@ main(void) /* test CR+LF (13,10) and EOF (26) in windows */ char bin8w[4] = {13,10,26,0}; -#ifdef WIN32 - sp = fopen("binin8w.bin", "wb"); -#else - sp = fopen("binin8w.bin", "w"); -#endif + sp = HDfopen("binin8w.bin", OPEN_FLAGS); for (i = 0; i < 4; i++) { char c = bin8w[i]; - if ( fwrite( &c, sizeof(char), 1, sp) != 1 ) + if ( HDfwrite( &c, sizeof(char), 1, sp) != 1 ) printf("error writing file\n"); } - fclose(sp); + HDfclose(sp); } diff --git a/tools/h5import/h5importtestutil.sh b/tools/h5import/h5importtestutil.sh index 8a895f5..943b194 100755 --- a/tools/h5import/h5importtestutil.sh +++ b/tools/h5import/h5importtestutil.sh @@ -57,47 +57,48 @@ test -d $TESTDIR || mkdir $TESTDIR # Comment '#' without space can be used. # -------------------------------------------------------------------- LIST_HDF5_TEST_FILES=" -$SRC_H5IMPORT_TESTFILES/test1.h5 -$SRC_H5IMPORT_TESTFILES/test2.h5 -$SRC_H5IMPORT_TESTFILES/test3.h5 -$SRC_H5IMPORT_TESTFILES/test4.h5 -$SRC_H5IMPORT_TESTFILES/test5.h5 -$SRC_H5IMPORT_TESTFILES/test6.h5 -$SRC_H5IMPORT_TESTFILES/test7.h5 -$SRC_H5IMPORT_TESTFILES/test8.h5 -$SRC_H5IMPORT_TESTFILES/test9.h5 -$SRC_H5IMPORT_TESTFILES/test10.h5 -$SRC_H5IMPORT_TESTFILES/test11.h5 -$SRC_H5IMPORT_TESTFILES/test12.h5 -$SRC_H5IMPORT_TESTFILES/test13.h5 -$SRC_H5IMPORT_TESTFILES/test14.h5 -$SRC_H5IMPORT_TESTFILES/test15.h5 +$SRC_H5IMPORT_TESTFILES/binfp64.h5 +$SRC_H5IMPORT_TESTFILES/binin8.h5 +$SRC_H5IMPORT_TESTFILES/binin8w.h5 +$SRC_H5IMPORT_TESTFILES/binin16.h5 +$SRC_H5IMPORT_TESTFILES/binin32.h5 +$SRC_H5IMPORT_TESTFILES/binuin16.h5 +$SRC_H5IMPORT_TESTFILES/binuin32.h5 +$SRC_H5IMPORT_TESTFILES/txtfp32.h5 +$SRC_H5IMPORT_TESTFILES/txtfp64.h5 +$SRC_H5IMPORT_TESTFILES/txtin8.h5 +$SRC_H5IMPORT_TESTFILES/txtin16.h5 +$SRC_H5IMPORT_TESTFILES/txtin32.h5 +$SRC_H5IMPORT_TESTFILES/txtuin16.h5 +$SRC_H5IMPORT_TESTFILES/txtuin32.h5 +$SRC_H5IMPORT_TESTFILES/txtstr.h5 +$SRC_H5IMPORT_TESTFILES/textpfe.h5 " LIST_OTHER_TEST_FILES=" -$SRC_H5IMPORT_TESTFILES/binfp32.conf $SRC_H5IMPORT_TESTFILES/binfp64.conf $SRC_H5IMPORT_TESTFILES/binin8.conf +$SRC_H5IMPORT_TESTFILES/binin8w.conf $SRC_H5IMPORT_TESTFILES/binin16.conf $SRC_H5IMPORT_TESTFILES/binin32.conf $SRC_H5IMPORT_TESTFILES/binuin16.conf $SRC_H5IMPORT_TESTFILES/binuin32.conf -$SRC_H5IMPORT_TESTFILES/textfp32.conf -$SRC_H5IMPORT_TESTFILES/textfp64.conf -$SRC_H5IMPORT_TESTFILES/textin8.conf -$SRC_H5IMPORT_TESTFILES/textin16.conf -$SRC_H5IMPORT_TESTFILES/textin32.conf -$SRC_H5IMPORT_TESTFILES/textuin16.conf -$SRC_H5IMPORT_TESTFILES/textuin32.conf +$SRC_H5IMPORT_TESTFILES/txtfp32.conf +$SRC_H5IMPORT_TESTFILES/txtfp64.conf +$SRC_H5IMPORT_TESTFILES/txtin8.conf +$SRC_H5IMPORT_TESTFILES/txtin16.conf +$SRC_H5IMPORT_TESTFILES/txtin32.conf +$SRC_H5IMPORT_TESTFILES/txtuin16.conf +$SRC_H5IMPORT_TESTFILES/txtuin32.conf $SRC_H5IMPORT_TESTFILES/textpfe.conf -$SRC_H5IMPORT_TESTFILES/textstr.conf -$SRC_H5IMPORT_TESTFILES/fp1.txt -$SRC_H5IMPORT_TESTFILES/fp2.txt -$SRC_H5IMPORT_TESTFILES/in1.txt -$SRC_H5IMPORT_TESTFILES/in16.txt -$SRC_H5IMPORT_TESTFILES/in32.txt -$SRC_H5IMPORT_TESTFILES/in64.txt -$SRC_H5IMPORT_TESTFILES/str.txt +$SRC_H5IMPORT_TESTFILES/txtstr.conf +$SRC_H5IMPORT_TESTFILES/txtfp32.txt +$SRC_H5IMPORT_TESTFILES/txtfp64.txt +$SRC_H5IMPORT_TESTFILES/txtuin32.txt +$SRC_H5IMPORT_TESTFILES/txtin16.txt +$SRC_H5IMPORT_TESTFILES/txtin32.txt +$SRC_H5IMPORT_TESTFILES/textpfe64.txt +$SRC_H5IMPORT_TESTFILES/txtstr.txt " # @@ -164,64 +165,76 @@ rm -f output.h5 log1 tx* b* *.dat COPY_TESTFILES_TO_TESTDIR mkdir tmp_testfiles -cp $TESTDIR/*.h5 tmp_testfiles/ +$CP $TESTDIR/*.h5 ./tmp_testfiles/ $RUNSERIAL ./h5importtest ################################################ -### T H E T E S T S +### T H E T E S T S ################################################ TESTING "ASCII I32 rank 3 - Output BE " ; -TOOLTEST $TESTDIR/in32.txt -c $TESTDIR/textin32.conf -o test1.h5 +TOOLTEST $TESTDIR/txtin16.txt -c $TESTDIR/txtin32.conf -o txtin32.h5 TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended" -TOOLTEST $TESTDIR/in16.txt -c $TESTDIR/textin16.conf -o test2.h5 +TOOLTEST $TESTDIR/txtin16.txt -c $TESTDIR/txtin16.conf -o txtin16.h5 + TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed " -TOOLTEST $TESTDIR/in16.txt -c $TESTDIR/textin8.conf -o test3.h5 +TOOLTEST $TESTDIR/txtin16.txt -c $TESTDIR/txtin8.conf -o txtin8.h5 TESTING "ASCII UI32 - rank 3 - Output BE" -TOOLTEST $TESTDIR/in1.txt -c $TESTDIR/textuin32.conf -o test4.h5 +TOOLTEST $TESTDIR/txtuin32.txt -c $TESTDIR/txtuin32.conf -o txtuin32.h5 TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed " -TOOLTEST $TESTDIR/in1.txt -c $TESTDIR/textuin16.conf -o test5.h5 +TOOLTEST $TESTDIR/txtuin32.txt -c $TESTDIR/txtuin16.conf -o txtuin16.h5 TESTING "ASCII F32 - rank 3 - Output LE " -TOOLTEST $TESTDIR/fp1.txt -c $TESTDIR/textfp32.conf -o test6.h5 +TOOLTEST $TESTDIR/txtfp32.txt -c $TESTDIR/txtfp32.conf -o txtfp32.h5 + TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed " -TOOLTEST $TESTDIR/fp2.txt -c $TESTDIR/textfp64.conf -o test7.h5 +TOOLTEST $TESTDIR/txtfp64.txt -c $TESTDIR/txtfp64.conf -o txtfp64.h5 TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed " -TOOLTEST binfp64.bin -c $TESTDIR/binfp64.conf -o test8.h5 +TOOLTEST binfp64.bin -c $TESTDIR/binfp64.conf -o binfp64.h5 + TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended " -TOOLTEST binin16.bin -c $TESTDIR/binin16.conf -o test9.h5 +TOOLTEST binin16.bin -c $TESTDIR/binin16.conf -o binin16.h5 + TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed " -TOOLTEST binin8.bin -c $TESTDIR/binin8.conf -o test10.h5 +TOOLTEST binin8.bin -c $TESTDIR/binin8.conf -o binin8.h5 + TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED " -TOOLTEST binin32.bin -c $TESTDIR/binin32.conf -o test11.h5 +TOOLTEST binin32.bin -c $TESTDIR/binin32.conf -o binin32.h5 + TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED " -TOOLTEST binuin16.bin -c $TESTDIR/binuin16.conf -o test12.h5 +TOOLTEST binuin16.bin -c $TESTDIR/binuin16.conf -o binuin16.h5 TESTING "BINARY UI32 - rank 3 - Output LE + CHUNKED " -TOOLTEST binuin32.bin -c $TESTDIR/binuin32.conf -o test13.h5 +TOOLTEST binuin32.bin -c $TESTDIR/binuin32.conf -o binuin32.h5 + TESTING "STR" -TOOLTEST $TESTDIR/str.txt -c $TESTDIR/textstr.conf -o test14.h5 +TOOLTEST $TESTDIR/txtstr.txt -c $TESTDIR/txtstr.conf -o txtstr.h5 + +TESTING "BINARY I8 CR LF EOF" +TOOLTEST binin8w.bin -c $TESTDIR/binin8w.conf -o binin8w.h5 TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE " -TOOLTEST $TESTDIR/in64.txt -c $TESTDIR/textpfe.conf -o test15.h5 +TOOLTEST $TESTDIR/textpfe64.txt -c $TESTDIR/textpfe.conf -o textpfe.h5 + + rm -f txtin32.txt txtin16.txt *.bin *.h5 rm -rf tmp_testfiles else - echo "** h5import or h5importtest not available ***" - nerrors="` expr $nerrors + 1 `"; + echo "** h5import or h5importtest not available ***" + nerrors="` expr $nerrors + 1 `"; fi # diff --git a/tools/h5import/testfiles/binfp32.conf b/tools/h5import/testfiles/binfp32.conf deleted file mode 100755 index 66e6b35..0000000 --- a/tools/h5import/testfiles/binfp32.conf +++ /dev/null @@ -1,12 +0,0 @@ -PATH /fpbin/32-bit -INPUT-CLASS FP -INPUT-SIZE 32 -RANK 3 -DIMENSION-SIZES 5 3 4 -OUTPUT-ARCHITECTURE IEEE -OUTPUT-BYTE-ORDER BE -CHUNKED-DIMENSION-SIZES 2 2 2 -COMPRESSION-PARAM 2 - - - diff --git a/tools/h5import/testfiles/binfp64.h5 b/tools/h5import/testfiles/binfp64.h5 new file mode 100644 index 0000000..80e3a8a Binary files /dev/null and b/tools/h5import/testfiles/binfp64.h5 differ diff --git a/tools/h5import/testfiles/binin16.h5 b/tools/h5import/testfiles/binin16.h5 new file mode 100644 index 0000000..0825bbc Binary files /dev/null and b/tools/h5import/testfiles/binin16.h5 differ diff --git a/tools/h5import/testfiles/binin32.h5 b/tools/h5import/testfiles/binin32.h5 new file mode 100644 index 0000000..fd8faa9 Binary files /dev/null and b/tools/h5import/testfiles/binin32.h5 differ diff --git a/tools/h5import/testfiles/binin8.h5 b/tools/h5import/testfiles/binin8.h5 new file mode 100644 index 0000000..a1d1a37 Binary files /dev/null and b/tools/h5import/testfiles/binin8.h5 differ diff --git a/tools/h5import/testfiles/binin8w.conf b/tools/h5import/testfiles/binin8w.conf new file mode 100644 index 0000000..fccb4ac --- /dev/null +++ b/tools/h5import/testfiles/binin8w.conf @@ -0,0 +1,9 @@ + +INPUT-CLASS IN +INPUT-SIZE 8 +RANK 1 +DIMENSION-SIZES 4 +OUTPUT-BYTE-ORDER LE +OUTPUT-CLASS IN +OUTPUT-SIZE 8 +OUTPUT-ARCHITECTURE STD diff --git a/tools/h5import/testfiles/binin8w.h5 b/tools/h5import/testfiles/binin8w.h5 new file mode 100644 index 0000000..64acaed Binary files /dev/null and b/tools/h5import/testfiles/binin8w.h5 differ diff --git a/tools/h5import/testfiles/binuin16.h5 b/tools/h5import/testfiles/binuin16.h5 new file mode 100644 index 0000000..c486c89 Binary files /dev/null and b/tools/h5import/testfiles/binuin16.h5 differ diff --git a/tools/h5import/testfiles/binuin32.h5 b/tools/h5import/testfiles/binuin32.h5 new file mode 100644 index 0000000..41699d7 Binary files /dev/null and b/tools/h5import/testfiles/binuin32.h5 differ diff --git a/tools/h5import/testfiles/fp1.txt b/tools/h5import/testfiles/fp1.txt deleted file mode 100755 index 142c94f..0000000 --- a/tools/h5import/testfiles/fp1.txt +++ /dev/null @@ -1,9 +0,0 @@ -12.3 14.2 15.56 -26.782 27.22 28.44 -29.33 20.11 11.45 -22.31 23.3332 24.343 - -16.134 19.34 0.17 -4.5 8.9 91.8 -34.7 0.32 0.076 -22.2 88.31 77.83 \ No newline at end of file diff --git a/tools/h5import/testfiles/fp2.txt b/tools/h5import/testfiles/fp2.txt deleted file mode 100755 index 6c83dc3..0000000 --- a/tools/h5import/testfiles/fp2.txt +++ /dev/null @@ -1,19 +0,0 @@ -12.3 14.2 15.56 -26.782 27.22 28.44 -29.33 20.11 11.45 -22.31 23.3332 24.343 - -16.134 19.34 0.17 -4.5 8.9 91.8 -34.7 0.32 0.076 -22.2 88.31 77.83 - -216.134 139.34 101.17 -24.5 82.9 291.8 -334.7 0.232 10.076 -222.2 88.31 77.83 - -122.3 114.2 125.56 -226.782 27.222 128.44 -341.7 30.132 0.1076 -4.51 181.9 911.8 diff --git a/tools/h5import/testfiles/in1.txt b/tools/h5import/testfiles/in1.txt deleted file mode 100755 index 0688e9b..0000000 --- a/tools/h5import/testfiles/in1.txt +++ /dev/null @@ -1,15 +0,0 @@ - 83 85 87 89 - 84 86 88 90 - 85 87 89 91 - 88 90 92 94 - 89 91 93 95 - 90 92 94 96 - 93 95 97 99 - 94 96 98 100 - 95 97 99 101 - 98 100 102 104 - 99 101 103 105 - 100 102 104 106 - 103 105 107 109 - 104 106 108 110 - 105 107 109 111 diff --git a/tools/h5import/testfiles/in16.txt b/tools/h5import/testfiles/in16.txt deleted file mode 100644 index 0688e9b..0000000 --- a/tools/h5import/testfiles/in16.txt +++ /dev/null @@ -1,15 +0,0 @@ - 83 85 87 89 - 84 86 88 90 - 85 87 89 91 - 88 90 92 94 - 89 91 93 95 - 90 92 94 96 - 93 95 97 99 - 94 96 98 100 - 95 97 99 101 - 98 100 102 104 - 99 101 103 105 - 100 102 104 106 - 103 105 107 109 - 104 106 108 110 - 105 107 109 111 diff --git a/tools/h5import/testfiles/in32.txt b/tools/h5import/testfiles/in32.txt deleted file mode 100644 index 0688e9b..0000000 --- a/tools/h5import/testfiles/in32.txt +++ /dev/null @@ -1,15 +0,0 @@ - 83 85 87 89 - 84 86 88 90 - 85 87 89 91 - 88 90 92 94 - 89 91 93 95 - 90 92 94 96 - 93 95 97 99 - 94 96 98 100 - 95 97 99 101 - 98 100 102 104 - 99 101 103 105 - 100 102 104 106 - 103 105 107 109 - 104 106 108 110 - 105 107 109 111 diff --git a/tools/h5import/testfiles/in64.txt b/tools/h5import/testfiles/in64.txt deleted file mode 100644 index f6dd7f4..0000000 --- a/tools/h5import/testfiles/in64.txt +++ /dev/null @@ -1,2 +0,0 @@ -6.02E+24 -3.14159265E+00 diff --git a/tools/h5import/testfiles/str.txt b/tools/h5import/testfiles/str.txt deleted file mode 100644 index 25be0a6..0000000 --- a/tools/h5import/testfiles/str.txt +++ /dev/null @@ -1,2 +0,0 @@ - hello world - hello world again diff --git a/tools/h5import/testfiles/test1.h5 b/tools/h5import/testfiles/test1.h5 deleted file mode 100644 index 350333c..0000000 Binary files a/tools/h5import/testfiles/test1.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test10.h5 b/tools/h5import/testfiles/test10.h5 deleted file mode 100644 index a1d1a37..0000000 Binary files a/tools/h5import/testfiles/test10.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test11.h5 b/tools/h5import/testfiles/test11.h5 deleted file mode 100644 index fd8faa9..0000000 Binary files a/tools/h5import/testfiles/test11.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test12.h5 b/tools/h5import/testfiles/test12.h5 deleted file mode 100644 index c486c89..0000000 Binary files a/tools/h5import/testfiles/test12.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test13.h5 b/tools/h5import/testfiles/test13.h5 deleted file mode 100644 index 41699d7..0000000 Binary files a/tools/h5import/testfiles/test13.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test14.h5 b/tools/h5import/testfiles/test14.h5 deleted file mode 100644 index ceb0810..0000000 Binary files a/tools/h5import/testfiles/test14.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test15.h5 b/tools/h5import/testfiles/test15.h5 deleted file mode 100644 index 73a157c..0000000 Binary files a/tools/h5import/testfiles/test15.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test2.h5 b/tools/h5import/testfiles/test2.h5 deleted file mode 100644 index dc6c1ea..0000000 Binary files a/tools/h5import/testfiles/test2.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test3.h5 b/tools/h5import/testfiles/test3.h5 deleted file mode 100644 index 42e7727..0000000 Binary files a/tools/h5import/testfiles/test3.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test4.h5 b/tools/h5import/testfiles/test4.h5 deleted file mode 100644 index 1a4dda5..0000000 Binary files a/tools/h5import/testfiles/test4.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test5.h5 b/tools/h5import/testfiles/test5.h5 deleted file mode 100644 index 9ee166a..0000000 Binary files a/tools/h5import/testfiles/test5.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test6.h5 b/tools/h5import/testfiles/test6.h5 deleted file mode 100644 index f74e003..0000000 Binary files a/tools/h5import/testfiles/test6.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test7.h5 b/tools/h5import/testfiles/test7.h5 deleted file mode 100644 index b6ba4f5..0000000 Binary files a/tools/h5import/testfiles/test7.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test8.h5 b/tools/h5import/testfiles/test8.h5 deleted file mode 100644 index 80e3a8a..0000000 Binary files a/tools/h5import/testfiles/test8.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/test9.h5 b/tools/h5import/testfiles/test9.h5 deleted file mode 100644 index 0825bbc..0000000 Binary files a/tools/h5import/testfiles/test9.h5 and /dev/null differ diff --git a/tools/h5import/testfiles/textfp32.conf b/tools/h5import/testfiles/textfp32.conf deleted file mode 100755 index 9696a7f..0000000 --- a/tools/h5import/testfiles/textfp32.conf +++ /dev/null @@ -1,10 +0,0 @@ -PATH /fp/32-bit -INPUT-CLASS TEXTFP -INPUT-SIZE 32 -RANK 3 -DIMENSION-SIZES 2 4 3 -OUTPUT-ARCHITECTURE IEEE -OUTPUT-BYTE-ORDER LE - - - diff --git a/tools/h5import/testfiles/textfp64.conf b/tools/h5import/testfiles/textfp64.conf deleted file mode 100755 index fbab6a6..0000000 --- a/tools/h5import/testfiles/textfp64.conf +++ /dev/null @@ -1,13 +0,0 @@ -PATH /fp/64-bit -INPUT-CLASS TEXTFP -INPUT-SIZE 64 -RANK 3 -DIMENSION-SIZES 4 4 3 -OUTPUT-ARCHITECTURE IEEE -OUTPUT-BYTE-ORDER BE -CHUNKED-DIMENSION-SIZES 2 2 2 -COMPRESSION-PARAM 8 -MAXIMUM-DIMENSIONS -1 6 7 - - - diff --git a/tools/h5import/testfiles/textin16.conf b/tools/h5import/testfiles/textin16.conf deleted file mode 100755 index d2d11c3..0000000 --- a/tools/h5import/testfiles/textin16.conf +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/16-bit -INPUT-CLASS TEXTIN -INPUT-SIZE 16 -RANK 3 -DIMENSION-SIZES 2 4 3 -OUTPUT-BYTE-ORDER LE -CHUNKED-DIMENSION-SIZES 2 2 2 -MAXIMUM-DIMENSIONS -1 -1 8 -OUTPUT-ARCHITECTURE STD - - - diff --git a/tools/h5import/testfiles/textin32.conf b/tools/h5import/testfiles/textin32.conf deleted file mode 100755 index ca4802a..0000000 --- a/tools/h5import/testfiles/textin32.conf +++ /dev/null @@ -1,11 +0,0 @@ -PATH /int/32-bit -INPUT-CLASS TEXTIN -INPUT-SIZE 32 -RANK 3 -DIMENSION-SIZES 2 4 3 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER BE - - - - diff --git a/tools/h5import/testfiles/textin8.conf b/tools/h5import/testfiles/textin8.conf deleted file mode 100755 index 95fc5d8..0000000 --- a/tools/h5import/testfiles/textin8.conf +++ /dev/null @@ -1,17 +0,0 @@ -PATH /int/8-bit -INPUT-CLASS TEXTIN -INPUT-SIZE 8 -OUTPUT-CLASS IN -OUTPUT-SIZE 8 -OUTPUT-BYTE-ORDER LE -OUTPUT-ARCHITECTURE STD -RANK 3 -DIMENSION-SIZES 2 4 3 -CHUNKED-DIMENSION-SIZES 2 2 2 -MAXIMUM-DIMENSIONS -1 -1 -1 -COMPRESSION-PARAM 3 -COMPRESSION-TYPE GZIP - - - - diff --git a/tools/h5import/testfiles/textpfe.h5 b/tools/h5import/testfiles/textpfe.h5 new file mode 100644 index 0000000..213051d Binary files /dev/null and b/tools/h5import/testfiles/textpfe.h5 differ diff --git a/tools/h5import/testfiles/textpfe64.txt b/tools/h5import/testfiles/textpfe64.txt new file mode 100644 index 0000000..f6dd7f4 --- /dev/null +++ b/tools/h5import/testfiles/textpfe64.txt @@ -0,0 +1,2 @@ +6.02E+24 +3.14159265E+00 diff --git a/tools/h5import/testfiles/textstr.conf b/tools/h5import/testfiles/textstr.conf deleted file mode 100644 index 85079e0..0000000 --- a/tools/h5import/testfiles/textstr.conf +++ /dev/null @@ -1,6 +0,0 @@ -PATH /mytext/data -INPUT-CLASS STR - - - - diff --git a/tools/h5import/testfiles/textuin16.conf b/tools/h5import/testfiles/textuin16.conf deleted file mode 100755 index 753e6e8..0000000 --- a/tools/h5import/testfiles/textuin16.conf +++ /dev/null @@ -1,12 +0,0 @@ -PATH /int/uint/16-bit -INPUT-CLASS TEXTUIN -INPUT-SIZE 16 -RANK 2 -DIMENSION-SIZES 4 3 -COMPRESSION-PARAM 2 -CHUNKED-DIMENSION-SIZES 2 2 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER LE - - - diff --git a/tools/h5import/testfiles/textuin32.conf b/tools/h5import/testfiles/textuin32.conf deleted file mode 100755 index d61e1a1..0000000 --- a/tools/h5import/testfiles/textuin32.conf +++ /dev/null @@ -1,11 +0,0 @@ -PATH /int/uint/32-bit -INPUT-CLASS TEXTUIN -INPUT-SIZE 32 -RANK 3 -DIMENSION-SIZES 2 4 3 -OUTPUT-ARCHITECTURE STD -OUTPUT-BYTE-ORDER BE - - - - diff --git a/tools/h5import/testfiles/txtfp32.conf b/tools/h5import/testfiles/txtfp32.conf new file mode 100755 index 0000000..9696a7f --- /dev/null +++ b/tools/h5import/testfiles/txtfp32.conf @@ -0,0 +1,10 @@ +PATH /fp/32-bit +INPUT-CLASS TEXTFP +INPUT-SIZE 32 +RANK 3 +DIMENSION-SIZES 2 4 3 +OUTPUT-ARCHITECTURE IEEE +OUTPUT-BYTE-ORDER LE + + + diff --git a/tools/h5import/testfiles/txtfp32.h5 b/tools/h5import/testfiles/txtfp32.h5 new file mode 100644 index 0000000..f74e003 Binary files /dev/null and b/tools/h5import/testfiles/txtfp32.h5 differ diff --git a/tools/h5import/testfiles/txtfp32.txt b/tools/h5import/testfiles/txtfp32.txt new file mode 100755 index 0000000..142c94f --- /dev/null +++ b/tools/h5import/testfiles/txtfp32.txt @@ -0,0 +1,9 @@ +12.3 14.2 15.56 +26.782 27.22 28.44 +29.33 20.11 11.45 +22.31 23.3332 24.343 + +16.134 19.34 0.17 +4.5 8.9 91.8 +34.7 0.32 0.076 +22.2 88.31 77.83 \ No newline at end of file diff --git a/tools/h5import/testfiles/txtfp64.conf b/tools/h5import/testfiles/txtfp64.conf new file mode 100755 index 0000000..fbab6a6 --- /dev/null +++ b/tools/h5import/testfiles/txtfp64.conf @@ -0,0 +1,13 @@ +PATH /fp/64-bit +INPUT-CLASS TEXTFP +INPUT-SIZE 64 +RANK 3 +DIMENSION-SIZES 4 4 3 +OUTPUT-ARCHITECTURE IEEE +OUTPUT-BYTE-ORDER BE +CHUNKED-DIMENSION-SIZES 2 2 2 +COMPRESSION-PARAM 8 +MAXIMUM-DIMENSIONS -1 6 7 + + + diff --git a/tools/h5import/testfiles/txtfp64.h5 b/tools/h5import/testfiles/txtfp64.h5 new file mode 100644 index 0000000..b6ba4f5 Binary files /dev/null and b/tools/h5import/testfiles/txtfp64.h5 differ diff --git a/tools/h5import/testfiles/txtfp64.txt b/tools/h5import/testfiles/txtfp64.txt new file mode 100755 index 0000000..6c83dc3 --- /dev/null +++ b/tools/h5import/testfiles/txtfp64.txt @@ -0,0 +1,19 @@ +12.3 14.2 15.56 +26.782 27.22 28.44 +29.33 20.11 11.45 +22.31 23.3332 24.343 + +16.134 19.34 0.17 +4.5 8.9 91.8 +34.7 0.32 0.076 +22.2 88.31 77.83 + +216.134 139.34 101.17 +24.5 82.9 291.8 +334.7 0.232 10.076 +222.2 88.31 77.83 + +122.3 114.2 125.56 +226.782 27.222 128.44 +341.7 30.132 0.1076 +4.51 181.9 911.8 diff --git a/tools/h5import/testfiles/txtin16.conf b/tools/h5import/testfiles/txtin16.conf new file mode 100755 index 0000000..d2d11c3 --- /dev/null +++ b/tools/h5import/testfiles/txtin16.conf @@ -0,0 +1,12 @@ +PATH /int/16-bit +INPUT-CLASS TEXTIN +INPUT-SIZE 16 +RANK 3 +DIMENSION-SIZES 2 4 3 +OUTPUT-BYTE-ORDER LE +CHUNKED-DIMENSION-SIZES 2 2 2 +MAXIMUM-DIMENSIONS -1 -1 8 +OUTPUT-ARCHITECTURE STD + + + diff --git a/tools/h5import/testfiles/txtin16.h5 b/tools/h5import/testfiles/txtin16.h5 new file mode 100644 index 0000000..dc6c1ea Binary files /dev/null and b/tools/h5import/testfiles/txtin16.h5 differ diff --git a/tools/h5import/testfiles/txtin16.txt b/tools/h5import/testfiles/txtin16.txt new file mode 100644 index 0000000..0688e9b --- /dev/null +++ b/tools/h5import/testfiles/txtin16.txt @@ -0,0 +1,15 @@ + 83 85 87 89 + 84 86 88 90 + 85 87 89 91 + 88 90 92 94 + 89 91 93 95 + 90 92 94 96 + 93 95 97 99 + 94 96 98 100 + 95 97 99 101 + 98 100 102 104 + 99 101 103 105 + 100 102 104 106 + 103 105 107 109 + 104 106 108 110 + 105 107 109 111 diff --git a/tools/h5import/testfiles/txtin32.conf b/tools/h5import/testfiles/txtin32.conf new file mode 100755 index 0000000..ca4802a --- /dev/null +++ b/tools/h5import/testfiles/txtin32.conf @@ -0,0 +1,11 @@ +PATH /int/32-bit +INPUT-CLASS TEXTIN +INPUT-SIZE 32 +RANK 3 +DIMENSION-SIZES 2 4 3 +OUTPUT-ARCHITECTURE STD +OUTPUT-BYTE-ORDER BE + + + + diff --git a/tools/h5import/testfiles/txtin32.h5 b/tools/h5import/testfiles/txtin32.h5 new file mode 100644 index 0000000..350333c Binary files /dev/null and b/tools/h5import/testfiles/txtin32.h5 differ diff --git a/tools/h5import/testfiles/txtin32.txt b/tools/h5import/testfiles/txtin32.txt new file mode 100644 index 0000000..0688e9b --- /dev/null +++ b/tools/h5import/testfiles/txtin32.txt @@ -0,0 +1,15 @@ + 83 85 87 89 + 84 86 88 90 + 85 87 89 91 + 88 90 92 94 + 89 91 93 95 + 90 92 94 96 + 93 95 97 99 + 94 96 98 100 + 95 97 99 101 + 98 100 102 104 + 99 101 103 105 + 100 102 104 106 + 103 105 107 109 + 104 106 108 110 + 105 107 109 111 diff --git a/tools/h5import/testfiles/txtin8.conf b/tools/h5import/testfiles/txtin8.conf new file mode 100755 index 0000000..9dbfd2b --- /dev/null +++ b/tools/h5import/testfiles/txtin8.conf @@ -0,0 +1,18 @@ +PATH /int/8-bit +INPUT-CLASS TEXTIN +INPUT-SIZE 8 +OUTPUT-CLASS IN +OUTPUT-SIZE 8 +OUTPUT-BYTE-ORDER LE +OUTPUT-ARCHITECTURE STD +RANK 3 +DIMENSION-SIZES 2 4 3 +CHUNKED-DIMENSION-SIZES 2 2 2 +MAXIMUM-DIMENSIONS -1 -1 -1 +COMPRESSION-PARAM 3 +COMPRESSION-TYPE GZIP + + + + + diff --git a/tools/h5import/testfiles/txtin8.h5 b/tools/h5import/testfiles/txtin8.h5 new file mode 100644 index 0000000..42e7727 Binary files /dev/null and b/tools/h5import/testfiles/txtin8.h5 differ diff --git a/tools/h5import/testfiles/txtstr.conf b/tools/h5import/testfiles/txtstr.conf new file mode 100644 index 0000000..85079e0 --- /dev/null +++ b/tools/h5import/testfiles/txtstr.conf @@ -0,0 +1,6 @@ +PATH /mytext/data +INPUT-CLASS STR + + + + diff --git a/tools/h5import/testfiles/txtstr.h5 b/tools/h5import/testfiles/txtstr.h5 new file mode 100644 index 0000000..ceb0810 Binary files /dev/null and b/tools/h5import/testfiles/txtstr.h5 differ diff --git a/tools/h5import/testfiles/txtstr.txt b/tools/h5import/testfiles/txtstr.txt new file mode 100644 index 0000000..25be0a6 --- /dev/null +++ b/tools/h5import/testfiles/txtstr.txt @@ -0,0 +1,2 @@ + hello world + hello world again diff --git a/tools/h5import/testfiles/txtuin16.conf b/tools/h5import/testfiles/txtuin16.conf new file mode 100755 index 0000000..753e6e8 --- /dev/null +++ b/tools/h5import/testfiles/txtuin16.conf @@ -0,0 +1,12 @@ +PATH /int/uint/16-bit +INPUT-CLASS TEXTUIN +INPUT-SIZE 16 +RANK 2 +DIMENSION-SIZES 4 3 +COMPRESSION-PARAM 2 +CHUNKED-DIMENSION-SIZES 2 2 +OUTPUT-ARCHITECTURE STD +OUTPUT-BYTE-ORDER LE + + + diff --git a/tools/h5import/testfiles/txtuin16.h5 b/tools/h5import/testfiles/txtuin16.h5 new file mode 100644 index 0000000..9ee166a Binary files /dev/null and b/tools/h5import/testfiles/txtuin16.h5 differ diff --git a/tools/h5import/testfiles/txtuin32.conf b/tools/h5import/testfiles/txtuin32.conf new file mode 100755 index 0000000..d61e1a1 --- /dev/null +++ b/tools/h5import/testfiles/txtuin32.conf @@ -0,0 +1,11 @@ +PATH /int/uint/32-bit +INPUT-CLASS TEXTUIN +INPUT-SIZE 32 +RANK 3 +DIMENSION-SIZES 2 4 3 +OUTPUT-ARCHITECTURE STD +OUTPUT-BYTE-ORDER BE + + + + diff --git a/tools/h5import/testfiles/txtuin32.h5 b/tools/h5import/testfiles/txtuin32.h5 new file mode 100644 index 0000000..1a4dda5 Binary files /dev/null and b/tools/h5import/testfiles/txtuin32.h5 differ diff --git a/tools/h5import/testfiles/txtuin32.txt b/tools/h5import/testfiles/txtuin32.txt new file mode 100755 index 0000000..0688e9b --- /dev/null +++ b/tools/h5import/testfiles/txtuin32.txt @@ -0,0 +1,15 @@ + 83 85 87 89 + 84 86 88 90 + 85 87 89 91 + 88 90 92 94 + 89 91 93 95 + 90 92 94 96 + 93 95 97 99 + 94 96 98 100 + 95 97 99 101 + 98 100 102 104 + 99 101 103 105 + 100 102 104 106 + 103 105 107 109 + 104 106 108 110 + 105 107 109 111 -- cgit v0.12