summaryrefslogtreecommitdiffstats
path: root/tools/h5import
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-03-29 21:44:23 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-03-29 21:44:23 (GMT)
commitba2cfde1fda880bf9d4b18dd439100ee5c4680bb (patch)
treeb071863eb782a1ad32e161a60197f33e30cdf5be /tools/h5import
parent096aac122ed6b6e8d07a30330bd95992887cd2be (diff)
downloadhdf5-ba2cfde1fda880bf9d4b18dd439100ee5c4680bb.zip
hdf5-ba2cfde1fda880bf9d4b18dd439100ee5c4680bb.tar.gz
hdf5-ba2cfde1fda880bf9d4b18dd439100ee5c4680bb.tar.bz2
Merge/port changes from develop back to 1.8 for tools and cmake
Diffstat (limited to 'tools/h5import')
-rw-r--r--tools/h5import/CMakeTests.cmake12
-rw-r--r--tools/h5import/h5import.c28
2 files changed, 20 insertions, 20 deletions
diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake
index 4e6e171..bfc5ef8 100644
--- a/tools/h5import/CMakeTests.cmake
+++ b/tools/h5import/CMakeTests.cmake
@@ -80,7 +80,7 @@
### T H E T E S T S M A C R O S ###
##############################################################################
##############################################################################
- MACRO (ADD_H5_TEST testname importfile conffile testfile)
+ macro (ADD_H5_TEST testname importfile conffile testfile)
# If using memchecker skip macro based tests
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
@@ -126,9 +126,9 @@
)
set_tests_properties (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP)
endif ()
- ENDMACRO ()
+ endmacro ()
- MACRO (ADD_H5_DUMPTEST testname datasetname testfile)
+ macro (ADD_H5_DUMPTEST testname datasetname testfile)
# If using memchecker skip tests
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
@@ -194,16 +194,16 @@
)
set_tests_properties (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}")
endif ()
- ENDMACRO ()
+ endmacro ()
- MACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
+ macro (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5IMPORT-DUMP-${testname}-SKIPPED
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available"
)
endif ()
- ENDMACRO ()
+ endmacro ()
# --------------------------------------------------------------------
# Determine if filter is available for h5diff
diff --git a/tools/h5import/h5import.c b/tools/h5import/h5import.c
index 9617df3..d1aab0c 100644
--- a/tools/h5import/h5import.c
+++ b/tools/h5import/h5import.c
@@ -1439,7 +1439,7 @@ static int processConfigurationFile(char *infile, struct Input *in)
#endif
if (HDstrcmp("H5T_VARIABLE;", temp)) {
char *more = temp;
- ival = HDstrtol(more, &more, 10);
+ ival = (int)HDstrtol(more, &more, 10);
if (getInputSize(in, ival) == -1) {
(void) HDfprintf(stderr, err5b, infile);
goto error;
@@ -2279,13 +2279,13 @@ static int parseDimensions(struct Input *in, char *strm)
HDstrncpy(temp, strm, sizeof(temp));
temp[sizeof(temp) - 1] = '\0';
in->sizeOfDimension[i++]
- = HDstrtol(HDstrtok (temp, delimiter), NULL, BASE_10);
+ = HDstrtoull(HDstrtok (temp, delimiter), NULL, BASE_10);
while (1) {
token = HDstrtok (NULL, delimiter);
if (token == NULL)
break;
- in->sizeOfDimension[i++] = HDstrtol(token, NULL, BASE_10);
+ in->sizeOfDimension[i++] = HDstrtoull(token, NULL, BASE_10);
}
return (0);
}
@@ -3121,7 +3121,7 @@ static int getRank(struct Input *in, FILE *strm)
/* same as getChunkedDimensionSizes. But defined separately for extensibility */
static int getDimensionSizes(struct Input *in, FILE *strm)
{
- int ival;
+ unsigned long long ullval;
int i = 0;
const char *err1 = "Unable to allocate dynamic memory.\n";
@@ -3132,8 +3132,8 @@ static int getDimensionSizes(struct Input *in, FILE *strm)
return (-1);
}
- while (fscanf(strm, "%d", (&ival)) == 1)
- in->sizeOfDimension[i++] = ival;
+ while (fscanf(strm, "%llu", (&ullval)) == 1)
+ in->sizeOfDimension[i++] = ullval;
if (in->rank != i) {
(void) HDfprintf(stderr, "%s", err2);
@@ -3144,7 +3144,7 @@ static int getDimensionSizes(struct Input *in, FILE *strm)
/* same as getDimensionSizes. But defined separately for extensibility */
static int getChunkedDimensionSizes(struct Input *in, FILE *strm)
{
- int ival;
+ unsigned long long ullval;
int i = 0;
const char *err1 = "Unable to allocate dynamic memory.\n";
@@ -3156,8 +3156,8 @@ static int getChunkedDimensionSizes(struct Input *in, FILE *strm)
return (-1);
}
- while (fscanf(strm, "%d", (&ival)) == 1)
- in->sizeOfChunk[i++] = ival;
+ while (fscanf(strm, "%llu", (&ullval)) == 1)
+ in->sizeOfChunk[i++] = ullval;
if (in->rank != i) {
(void) HDfprintf(stderr, "%s", err2);
@@ -3174,7 +3174,7 @@ static int getChunkedDimensionSizes(struct Input *in, FILE *strm)
static int getMaximumDimensionSizes(struct Input *in, FILE *strm)
{
- int ival;
+ long long llval;
int i = 0;
const char *err1 = "Unable to allocate dynamic memory.\n";
@@ -3186,11 +3186,11 @@ static int getMaximumDimensionSizes(struct Input *in, FILE *strm)
return (-1);
}
- while (fscanf(strm, "%d", (&ival)) == 1) {
- if (ival == -1)
+ while (fscanf(strm, "%lld", (&llval)) == 1) {
+ if (llval == -1)
in->maxsizeOfDimension[i++] = H5S_UNLIMITED;
else
- in->maxsizeOfDimension[i++] = ival;
+ in->maxsizeOfDimension[i++] = (hsize_t)llval;
}
if (in->rank != i) {
@@ -3927,7 +3927,7 @@ static int process(struct Options *opt)
return (-1);
}
HDfclose(extfile);
- H5Pset_external(proplist, in->externFilename, (off_t) 0, numOfElements * in->inputSize / 8);
+ H5Pset_external(proplist, in->externFilename, (off_t)0, numOfElements * (hsize_t)in->inputSize / 8);
}
/* create dataspace */