diff options
Diffstat (limited to 'tools/h5repack/h5repack_parse.c')
-rw-r--r-- | tools/h5repack/h5repack_parse.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c index 154d6e5..15dc812 100644 --- a/tools/h5repack/h5repack_parse.c +++ b/tools/h5repack/h5repack_parse.c @@ -122,7 +122,7 @@ obj_list_t* parse_filter(const char *str, { if (obj_list) free(obj_list); error_msg(progname, "input Error: Invalid compression type in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } @@ -160,7 +160,7 @@ obj_list_t* parse_filter(const char *str, if (!isdigit(c) && l==-1){ if (obj_list) free(obj_list); error_msg(progname, "compression parameter not digit in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } if (l==-1) stype[m]=c; @@ -180,7 +180,7 @@ obj_list_t* parse_filter(const char *str, else { error_msg(progname, "szip mask must be 'NN' or 'EC' \n"); - exit(1); + exit(EXIT_FAILURE); } @@ -220,7 +220,7 @@ obj_list_t* parse_filter(const char *str, if (!isdigit(c) && l==-1){ if (obj_list) free(obj_list); error_msg(progname, "compression parameter is not a digit in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } if (l==-1) stype[m]=c; @@ -240,7 +240,7 @@ obj_list_t* parse_filter(const char *str, else { error_msg(progname, "scale type must be 'IN' or 'DS' \n"); - exit(1); + exit(EXIT_FAILURE); } } @@ -264,7 +264,7 @@ obj_list_t* parse_filter(const char *str, if (!isdigit(c)){ if (obj_list) free(obj_list); error_msg(progname, "compression parameter is not a digit in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } stype[m]=c; } /* u */ @@ -310,7 +310,7 @@ obj_list_t* parse_filter(const char *str, { /*no more parameters, GZIP must have parameter */ if (obj_list) free(obj_list); error_msg(progname, "missing compression parameter in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } } @@ -326,7 +326,7 @@ obj_list_t* parse_filter(const char *str, { /*no more parameters, SZIP must have parameter */ if (obj_list) free(obj_list); error_msg(progname, "missing compression parameter in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } } @@ -342,7 +342,7 @@ obj_list_t* parse_filter(const char *str, { /*shuffle does not have parameter */ if (obj_list) free(obj_list); error_msg(progname, "extra parameter in SHUF <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } } /*------------------------------------------------------------------------- @@ -357,7 +357,7 @@ obj_list_t* parse_filter(const char *str, { /*shuffle does not have parameter */ if (obj_list) free(obj_list); error_msg(progname, "extra parameter in FLET <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } } /*------------------------------------------------------------------------- @@ -372,7 +372,7 @@ obj_list_t* parse_filter(const char *str, { /*nbit does not have parameter */ if (obj_list) free(obj_list); error_msg(progname, "extra parameter in NBIT <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } } /*------------------------------------------------------------------------- @@ -387,13 +387,13 @@ obj_list_t* parse_filter(const char *str, { /*no more parameters, SOFF must have parameter */ if (obj_list) free(obj_list); error_msg(progname, "missing compression parameter in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } } else { if (obj_list) free(obj_list); error_msg(progname, "invalid filter type in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } } } /*i*/ @@ -416,7 +416,7 @@ obj_list_t* parse_filter(const char *str, { if (obj_list) free(obj_list); error_msg(progname, "invalid compression parameter in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } break; @@ -431,19 +431,19 @@ obj_list_t* parse_filter(const char *str, { if (obj_list) free(obj_list); error_msg(progname, "pixels_per_block is not even in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } if (pixels_per_block>H5_SZIP_MAX_PIXELS_PER_BLOCK) { if (obj_list) free(obj_list); error_msg(progname, "pixels_per_block is too large in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } if ( (strcmp(smask,"NN")!=0) && (strcmp(smask,"EC")!=0) ) { if (obj_list) free(obj_list); error_msg(progname, "szip mask must be 'NN' or 'EC' \n"); - exit(1); + exit(EXIT_FAILURE); } break; default: @@ -544,7 +544,7 @@ obj_list_t* parse_layout(const char *str, { if (obj_list) free(obj_list); error_msg(progname, "in parse layout, no characters after : in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } /* get layout info */ @@ -561,7 +561,7 @@ obj_list_t* parse_layout(const char *str, pack->layout=H5D_CHUNKED; else { error_msg(progname, "in parse layout, not a valid layout in <%s>\n",str); - exit(1); + exit(EXIT_FAILURE); } } else @@ -585,7 +585,7 @@ obj_list_t* parse_layout(const char *str, { if (obj_list) free(obj_list); error_msg(progname, "in parse layout, <%s> Chunk dimensions missing\n",str); - exit(1); + exit(EXIT_FAILURE); } for ( i=j, c_index=0; i<len; i++) @@ -600,7 +600,7 @@ obj_list_t* parse_layout(const char *str, if (obj_list) free(obj_list); error_msg(progname, "in parse layout, <%s> Not a valid character in <%s>\n", sdim,str); - exit(1); + exit(EXIT_FAILURE); } if ( c=='x' || i==len-1) @@ -613,7 +613,7 @@ obj_list_t* parse_layout(const char *str, if (obj_list) free(obj_list); error_msg(progname, "in parse layout, <%s> conversion to number in <%s>\n", sdim,str); - exit(1); + exit(EXIT_FAILURE); } c_index++; } @@ -631,7 +631,7 @@ obj_list_t* parse_layout(const char *str, if (obj_list) free(obj_list); error_msg(progname, "in parse layout, <%s> conversion to number in <%s>\n", sdim,str); - exit(1); + exit(EXIT_FAILURE); } pack->chunk.rank=c_index+1; } |