[svn-r21982] Correct HD prefix in tools for exit

Checked for HD support.
This commit is contained in:
Allen Byrne 2012-02-24 10:45:54 -05:00
parent cec338c647
commit 827cbbba31
13 changed files with 52 additions and 52 deletions

View File

@ -55,7 +55,7 @@ static void
leave(int ret)
{
h5tools_close();
exit(ret);
HDexit(ret);
}

View File

@ -210,7 +210,7 @@ leave(int ret)
{
h5tools_close();
exit(ret);
HDexit(ret);
}

View File

@ -58,7 +58,7 @@ int main(int argc, char *argv[])
if (argv[1] && (HDstrcmp("-V", argv[1]) == 0)) {
print_version(PROGRAMNAME);
exit(EXIT_SUCCESS);
HDexit(EXIT_SUCCESS);
}
/*
@ -119,7 +119,7 @@ int main(int argc, char *argv[])
case 6: /* -h found; help, then exit */
help(argv[0]);
exit(EXIT_SUCCESS);
HDexit(EXIT_SUCCESS);
break;
case 7: /* -d found; look for dimensions */

View File

@ -139,7 +139,7 @@ leave(int ret)
h5tools_close();
exit(ret);
HDexit(ret);
}
/*-------------------------------------------------------------------------

View File

@ -142,7 +142,7 @@ leave(int ret)
h5tools_close();
exit(ret);
HDexit(ret);
}
/*-------------------------------------------------------------------------
@ -199,7 +199,7 @@ parse_command_line(int argc, const char *argv[])
if (argc <= opt_ind+2) {
error_msg("missing file name\n");
usage(h5tools_getprogname());
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
*/
}

View File

@ -3460,7 +3460,7 @@ leave(int ret)
{
h5tools_close();
exit(ret);
HDexit(ret);
}

View File

@ -1002,7 +1002,7 @@ static const char* get_sfilter(H5Z_filter_t filtn)
return "SOFF";
else {
error_msg("input error in filter type\n");
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}

View File

@ -108,7 +108,7 @@ int main(int argc, const char **argv)
/* update hyperslab buffer size from H5TOOLS_BUFSIZE env if exist */
if ( h5tools_getenv_update_hyperslab_bufsize() < 0)
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
/* initialize options */
h5repack_init(&options, 0, 0, (hsize_t)0);
@ -128,7 +128,7 @@ int main(int argc, const char **argv)
{
error_msg("file names cannot be the same\n");
usage(h5tools_getprogname());
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
@ -137,7 +137,7 @@ int main(int argc, const char **argv)
{
error_msg("file names missing\n");
usage(h5tools_getprogname());
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
@ -320,10 +320,10 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
case 'h':
usage(h5tools_getprogname());
exit(EXIT_SUCCESS);
HDexit(EXIT_SUCCESS);
case 'V':
print_version(h5tools_getprogname());
exit(EXIT_SUCCESS);
HDexit(EXIT_SUCCESS);
case 'v':
options->verbose = 1;
break;
@ -333,7 +333,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
if (h5repack_addfilter( opt_arg, options)<0)
{
error_msg("in parsing filter\n");
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
break;
case 'l':
@ -342,7 +342,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
if (h5repack_addlayout( opt_arg, options)<0)
{
error_msg("in parsing layout\n");
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
break;
@ -353,7 +353,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
if ((int)options->min_comp<=0)
{
error_msg("invalid minimum compress size <%s>\n", opt_arg );
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
break;
@ -446,12 +446,12 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
if ( options->alignment < 1 )
{
error_msg("invalid alignment size\n", opt_arg );
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
break;
case 'S':
{
{
char strategy[MAX_NC_NAME];
HDstrcpy(strategy, opt_arg);
@ -465,7 +465,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
options->fs_strategy = H5F_FILE_SPACE_VFD;
else {
error_msg("invalid file space management strategy\n", opt_arg );
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
break;
}
@ -486,7 +486,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
{
error_msg("missing file names\n");
usage(h5tools_getprogname());
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
@ -519,7 +519,7 @@ void read_info(const char *filename,
if ((fp = fopen(filename, "r")) == (FILE *)NULL) {
error_msg("cannot open options file %s\n", filename);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
/* cycle until end of file reached */
@ -556,7 +556,7 @@ void read_info(const char *filename,
if (h5repack_addfilter(comp_info,options)==-1){
error_msg("could not add compression option\n");
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@ -586,7 +586,7 @@ void read_info(const char *filename,
if (h5repack_addlayout(comp_info,options)==-1){
error_msg("could not add chunck option\n");
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@ -595,7 +595,7 @@ void read_info(const char *filename,
*/
else {
error_msg("bad file format for %s", filename);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}

View File

@ -229,7 +229,7 @@ int options_add_layout( obj_list_t *obj_list,
if (table->objs[i].chunk.rank>0)
{
error_msg("chunk information already inserted for <%s>\n",obj_list[j].obj);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
/* insert the layout info */
else

View File

@ -115,7 +115,7 @@ obj_list_t* parse_filter(const char *str,
{
if (obj_list) HDfree(obj_list);
error_msg("input Error: Invalid compression type in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
@ -153,7 +153,7 @@ obj_list_t* parse_filter(const char *str,
if (!isdigit(c) && l==-1){
if (obj_list) HDfree(obj_list);
error_msg("compression parameter not digit in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
if (l==-1)
stype[m]=c;
@ -173,7 +173,7 @@ obj_list_t* parse_filter(const char *str,
else
{
error_msg("szip mask must be 'NN' or 'EC' \n");
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
@ -213,7 +213,7 @@ obj_list_t* parse_filter(const char *str,
if (!isdigit(c) && l==-1){
if (obj_list) HDfree(obj_list);
error_msg("compression parameter is not a digit in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
if (l==-1)
stype[m]=c;
@ -233,7 +233,7 @@ obj_list_t* parse_filter(const char *str,
else
{
error_msg("scale type must be 'IN' or 'DS' \n");
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
@ -257,7 +257,7 @@ obj_list_t* parse_filter(const char *str,
if (!isdigit(c)){
if (obj_list) HDfree(obj_list);
error_msg("compression parameter is not a digit in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
stype[m]=c;
} /* u */
@ -303,7 +303,7 @@ obj_list_t* parse_filter(const char *str,
{ /*no more parameters, GZIP must have parameter */
if (obj_list) HDfree(obj_list);
error_msg("missing compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
@ -319,7 +319,7 @@ obj_list_t* parse_filter(const char *str,
{ /*no more parameters, SZIP must have parameter */
if (obj_list) HDfree(obj_list);
error_msg("missing compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
@ -335,7 +335,7 @@ obj_list_t* parse_filter(const char *str,
{ /*shuffle does not have parameter */
if (obj_list) HDfree(obj_list);
error_msg("extra parameter in SHUF <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@ -350,7 +350,7 @@ obj_list_t* parse_filter(const char *str,
{ /*shuffle does not have parameter */
if (obj_list) HDfree(obj_list);
error_msg("extra parameter in FLET <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@ -365,7 +365,7 @@ obj_list_t* parse_filter(const char *str,
{ /*nbit does not have parameter */
if (obj_list) HDfree(obj_list);
error_msg("extra parameter in NBIT <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@ -380,13 +380,13 @@ obj_list_t* parse_filter(const char *str,
{ /*no more parameters, SOFF must have parameter */
if (obj_list) HDfree(obj_list);
error_msg("missing compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
else {
if (obj_list) HDfree(obj_list);
error_msg("invalid filter type in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
} /*i*/
@ -409,7 +409,7 @@ obj_list_t* parse_filter(const char *str,
{
if (obj_list) HDfree(obj_list);
error_msg("invalid compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
break;
@ -424,19 +424,19 @@ obj_list_t* parse_filter(const char *str,
{
if (obj_list) HDfree(obj_list);
error_msg("pixels_per_block is not even in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
if (pixels_per_block>H5_SZIP_MAX_PIXELS_PER_BLOCK)
{
if (obj_list) HDfree(obj_list);
error_msg("pixels_per_block is too large in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
if ( (HDstrcmp(smask,"NN")!=0) && (HDstrcmp(smask,"EC")!=0) )
{
if (obj_list) HDfree(obj_list);
error_msg("szip mask must be 'NN' or 'EC' \n");
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
break;
default:
@ -537,7 +537,7 @@ obj_list_t* parse_layout(const char *str,
{
if (obj_list) HDfree(obj_list);
error_msg("in parse layout, no characters after : in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
/* get layout info */
@ -554,7 +554,7 @@ obj_list_t* parse_layout(const char *str,
pack->layout=H5D_CHUNKED;
else {
error_msg("in parse layout, not a valid layout in <%s>\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
}
else
@ -578,7 +578,7 @@ obj_list_t* parse_layout(const char *str,
{
if (obj_list) HDfree(obj_list);
error_msg("in parse layout, <%s> Chunk dimensions missing\n",str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
for ( i=j, c_index=0; i<len; i++)
@ -593,7 +593,7 @@ obj_list_t* parse_layout(const char *str,
if (obj_list) HDfree(obj_list);
error_msg("in parse layout, <%s> Not a valid character in <%s>\n",
sdim,str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
if ( c=='x' || i==len-1)
@ -606,7 +606,7 @@ obj_list_t* parse_layout(const char *str,
if (obj_list) HDfree(obj_list);
error_msg("in parse layout, <%s> conversion to number in <%s>\n",
sdim,str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
c_index++;
}
@ -624,7 +624,7 @@ obj_list_t* parse_layout(const char *str,
if (obj_list) HDfree(obj_list);
error_msg("in parse layout, <%s> conversion to number in <%s>\n",
sdim,str);
exit(EXIT_FAILURE);
HDexit(EXIT_FAILURE);
}
pack->chunk.rank=c_index+1;
}

View File

@ -232,7 +232,7 @@ static void
leave(int ret)
{
h5tools_close();
exit(ret);
HDexit(ret);
}

View File

@ -389,7 +389,7 @@ indentation(int x)
}
else {
HDfprintf(stderr, "error: the indentation exceeds the number of cols.\n");
exit(1);
HDexit(1);
}
}

View File

@ -63,7 +63,7 @@ static void
leave(int ret)
{
h5tools_close();
exit(ret);
HDexit(ret);
} /* end leave() */