diff options
Diffstat (limited to 'tools/h5import/h5import.c')
-rwxr-xr-x | tools/h5import/h5import.c | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c index 6352c52..89d14f9 100755 --- a/tools/h5import/h5import.c +++ b/tools/h5import/h5import.c @@ -764,8 +764,20 @@ readFloatData(FILE **strm, struct Input *in) fp32 = (H5DT_FLOAT32 *) in->data; break; + /* same as TEXTFP */ case 2: /*TEXTFPE */ - break; + + for (i = 0; i < len; i++, fp32++) + { + if (fscanf(*strm, "%f", fp32) != 1) + { + (void) fprintf(stderr, err1); + return (-1); + } + } + + fp32 = (H5DT_FLOAT32 *) in->data; + break; case 3: /* FP */ for (i = 0; i < len; i++, fp32++) @@ -801,8 +813,20 @@ readFloatData(FILE **strm, struct Input *in) fp64 = (H5DT_FLOAT64 *) in->data; break; + /* same as TEXTFP */ case 2: /*TEXTFPE */ - break; + + for (i = 0; i < len; i++, fp64++) + { + if (fscanf(*strm, "%lf", fp64) != 1) + { + (void) fprintf(stderr, err1); + return (-1); + } + } + + fp64 = (H5DT_FLOAT64 *) in->data; + break; case 3: /* FP */ for (i = 0; i < len; i++, fp64++) @@ -2733,7 +2757,7 @@ help(char *name) (void) fprintf(stdout, "\t to be created.\n\n"); (void) fprintf(stdout, "\t INPUT-CLASS:\n"); (void) fprintf(stdout, "\t String denoting the type of input data.\n"); - (void) fprintf(stdout, "\t (\"TEXTIN\", \"TEXTFP\", \"TEXTFPE\", \"FP\", \"IN\", \n"); + (void) fprintf(stdout, "\t (\"TEXTIN\", \"TEXTFP\", \"FP\", \"IN\", \n"); (void) fprintf(stdout, "\t \"STR\", \"TEXTUIN\", \"UIN\"). \n"); (void) fprintf(stdout, "\t INPUT-CLASS \"TEXTIN\" denotes an ASCII text \n"); (void) fprintf(stdout, "\t file with signed integer data in ASCII form,\n"); @@ -2742,9 +2766,6 @@ help(char *name) (void) fprintf(stdout, "\t \"TEXTFP\" denotes an ASCII text file containing\n"); (void) fprintf(stdout, "\t floating point data in the fixed notation\n"); (void) fprintf(stdout, "\t (325.34),\n"); - (void) fprintf(stdout, "\t \"TEXTFPE\" denotes an ASCII text file containing\n"); - (void) fprintf(stdout, "\t floating point data in the scientific notation\n"); - (void) fprintf(stdout, "\t (3.2534E+02),\n"); (void) fprintf(stdout, "\t \"FP\" denotes a floating point binary file,\n"); (void) fprintf(stdout, "\t \"IN\" denotes a signed integer binary file,\n"); (void) fprintf(stdout, "\t \"UIN\" denotes an unsigned integer binary file,\n"); |