summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5repack/h5repack_main.c')
-rw-r--r--tools/h5repack/h5repack_main.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index e903435..2d48a04 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -265,11 +265,11 @@ int read_info(const char *filename, pack_opt_t *options) {
c = '0';
while (c != ' ') {
if(fscanf(fp, "%c", &c) < 0 && HDferror(fp)) {
- error_msg("fscanf error\n");
- h5tools_setstatus(EXIT_FAILURE);
- ret_value = EXIT_FAILURE;
- goto done;
- } /* end if */
+ error_msg("fscanf error\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ ret_value = EXIT_FAILURE;
+ goto done;
+ } /* end if */
if (HDfeof(fp))
break;
}
@@ -277,11 +277,11 @@ int read_info(const char *filename, pack_opt_t *options) {
/* go until end */
while (c != ' ') {
if(fscanf(fp, "%c", &c) < 0 && HDferror(fp)) {
- error_msg("fscanf error\n");
- h5tools_setstatus(EXIT_FAILURE);
- ret_value = EXIT_FAILURE;
- goto done;
- } /* end if */
+ error_msg("fscanf error\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ ret_value = EXIT_FAILURE;
+ goto done;
+ } /* end if */
comp_info[i] = c;
i++;
if (HDfeof(fp))
@@ -292,10 +292,10 @@ int read_info(const char *filename, pack_opt_t *options) {
comp_info[i - 1] = '\0'; /*cut the last " */
if (h5repack_addfilter(comp_info, options) == -1) {
- error_msg("could not add compression option\n");
- h5tools_setstatus(EXIT_FAILURE);
- ret_value = EXIT_FAILURE;
- goto done;
+ error_msg("could not add compression option\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ ret_value = EXIT_FAILURE;
+ goto done;
}
}
/*-------------------------------------------------------------------------
@@ -309,11 +309,11 @@ int read_info(const char *filename, pack_opt_t *options) {
c = '0';
while (c != ' ') {
if(fscanf(fp, "%c", &c) < 0 && HDferror(fp)) {
- error_msg("fscanf error\n");
- h5tools_setstatus(EXIT_FAILURE);
- ret_value = EXIT_FAILURE;
- goto done;
- } /* end if */
+ error_msg("fscanf error\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ ret_value = EXIT_FAILURE;
+ goto done;
+ } /* end if */
if (HDfeof(fp))
break;
}
@@ -321,11 +321,11 @@ int read_info(const char *filename, pack_opt_t *options) {
/* go until end */
while (c != ' ') {
if(fscanf(fp, "%c", &c) < 0 && HDferror(fp)) {
- error_msg("fscanf error\n");
- h5tools_setstatus(EXIT_FAILURE);
- ret_value = EXIT_FAILURE;
- goto done;
- } /* end if */
+ error_msg("fscanf error\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ ret_value = EXIT_FAILURE;
+ goto done;
+ } /* end if */
comp_info[i] = c;
i++;
if (HDfeof(fp))
@@ -336,10 +336,10 @@ int read_info(const char *filename, pack_opt_t *options) {
comp_info[i - 1] = '\0'; /*cut the last " */
if (h5repack_addlayout(comp_info, options) == -1) {
- error_msg("could not add chunck option\n");
- h5tools_setstatus(EXIT_FAILURE);
- ret_value = EXIT_FAILURE;
- goto done;
+ error_msg("could not add chunck option\n");
+ h5tools_setstatus(EXIT_FAILURE);
+ ret_value = EXIT_FAILURE;
+ goto done;
}
}
/*-------------------------------------------------------------------------
@@ -428,7 +428,7 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options) {
break;
case 'm':
- options->min_comp = HDatoi( opt_arg );
+ options->min_comp = HDstrtoull(opt_arg , NULL, 0);
if ((int) options->min_comp <= 0) {
error_msg("invalid minimum compress size <%s>\n", opt_arg);
h5tools_setstatus(EXIT_FAILURE);
@@ -515,7 +515,7 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options) {
break;
case 'a':
- options->alignment = HDatol( opt_arg );
+ options->alignment = HDstrtoull(opt_arg , NULL, 0);
if (options->alignment < 1) {
error_msg("invalid alignment size\n", opt_arg);
h5tools_setstatus(EXIT_FAILURE);