summaryrefslogtreecommitdiffstats
path: root/tools/h5repack
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-08-19 21:16:28 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-08-19 21:16:28 (GMT)
commit525caddd9e0460b2f39d043f04dabc7ab6a1bf3a (patch)
tree176f2be3724d8160e67de97df457988a27aa2257 /tools/h5repack
parentd221d97f992d66540d39b0dfdca80b37849a7dd6 (diff)
downloadhdf5-525caddd9e0460b2f39d043f04dabc7ab6a1bf3a.zip
hdf5-525caddd9e0460b2f39d043f04dabc7ab6a1bf3a.tar.gz
hdf5-525caddd9e0460b2f39d043f04dabc7ab6a1bf3a.tar.bz2
[svn-r19254] Description:
Bring r19252 & 19253 from trunk to 1.8 branch: Bring Coverity changes from branch to trunk: r19161: Fixed the part for matching the subset info with dataset r19189: BZ1646: h5dump does not check number of dimensions for subsetting parameters against the dataset Changed subset_t structure from holding hsize_t pointers to holding new subset_d pointers, which hold the original hsize_t pointer + len. this len is then checked against dataset ndims in the handle_dataset function of h5dump. Changed all references to use new data structure. Added tests for each subset parameter. r19190: Added new h5dump ddl files Tested on: Mac OS X/32 10.6.4 (amazon) w/debug & production (h5committested on Coverity branch)
Diffstat (limited to 'tools/h5repack')
-rw-r--r--tools/h5repack/h5repack.c28
-rw-r--r--tools/h5repack/h5repack_copy.c48
-rw-r--r--tools/h5repack/h5repack_main.c22
-rw-r--r--tools/h5repack/h5repack_opttable.c10
-rw-r--r--tools/h5repack/h5repack_parse.c50
-rw-r--r--tools/h5repack/h5repack_verify.c8
6 files changed, 83 insertions, 83 deletions
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c
index e1b2182..4a1f4d7 100644
--- a/tools/h5repack/h5repack.c
+++ b/tools/h5repack/h5repack.c
@@ -153,7 +153,7 @@ int h5repack_addfilter(const char* str,
if(options->n_filter_g > H5_REPACK_MAX_NFILTERS)
{
- error_msg(h5tools_getprogname(), "maximum number of filters exceeded for <%s>\n", str);
+ error_msg("maximum number of filters exceeded for <%s>\n", str);
free(obj_list);
return -1;
}
@@ -191,7 +191,7 @@ int h5repack_addlayout(const char* str,
init_packobject(&pack);
if (options->all_layout==1){
- error_msg(h5tools_getprogname(), "invalid layout input: 'all' option \
+ error_msg("invalid layout input: 'all' option \
is present with other objects <%s>\n",str);
return -1;
}
@@ -507,7 +507,7 @@ int copy_attr(hid_t loc_in,
buf = (void *)HDmalloc((size_t)(nelmts * msize));
if(buf == NULL)
{
- error_msg(h5tools_getprogname(), "cannot read into memory\n" );
+ error_msg("h5repack", "cannot read into memory\n" );
goto error;
}
if(H5Aread(attr_id, wtype_id, buf) < 0)
@@ -610,7 +610,7 @@ static int check_options(pack_opt_t *options)
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
- error_msg(h5tools_getprogname(), "invalid layout\n");
+ error_msg("invalid layout\n");
return -1;
default:
strcpy(slayout,"invalid layout\n");
@@ -651,7 +651,7 @@ static int check_options(pack_opt_t *options)
if (options->all_layout==1 && has_ck)
{
- error_msg(h5tools_getprogname(), "invalid chunking input: 'all' option\
+ error_msg("invalid chunking input: 'all' option\
is present with other objects\n");
return -1;
}
@@ -713,7 +713,7 @@ static int check_options(pack_opt_t *options)
if (options->all_filter==1 && has_cp)
{
- error_msg(h5tools_getprogname(), "invalid compression input: 'all' option\
+ error_msg("invalid compression input: 'all' option\
is present with other objects\n");
return -1;
}
@@ -725,24 +725,24 @@ static int check_options(pack_opt_t *options)
if (options->grp_compact < 0)
{
- error_msg(h5tools_getprogname(), "invalid maximum number of links to store as header messages\n");
+ error_msg("invalid maximum number of links to store as header messages\n");
return -1;
}
if (options->grp_indexed < 0)
{
- error_msg(h5tools_getprogname(), "invalid minimum number of links to store in the indexed format\n");
+ error_msg("invalid minimum number of links to store in the indexed format\n");
return -1;
}
if (options->grp_indexed > options->grp_compact)
{
- error_msg(h5tools_getprogname(), "minimum indexed size is greater than the maximum compact size\n");
+ error_msg("minimum indexed size is greater than the maximum compact size\n");
return -1;
}
for (i=0; i<8; i++)
{
if (options->msg_size[i]<0)
{
- error_msg(h5tools_getprogname(), "invalid shared message size\n");
+ error_msg("invalid shared message size\n");
return -1;
}
}
@@ -764,7 +764,7 @@ static int check_options(pack_opt_t *options)
if ( options->ublock_filename == NULL && options->ublock_size != 0 )
{
- error_msg(h5tools_getprogname(), "file name missing for user block\n",
+ error_msg("file name missing for user block\n",
options->ublock_filename);
return -1;
}
@@ -777,7 +777,7 @@ static int check_options(pack_opt_t *options)
if ( options->alignment == 0 && options->threshold != 0 )
{
- error_msg(h5tools_getprogname(), "alignment for H5Pset_alignment missing\n");
+ error_msg("alignment for H5Pset_alignment missing\n");
return -1;
}
@@ -849,7 +849,7 @@ static int check_objects(const char* fname,
/* the input object names are present in the file and are valid */
if(h5trav_getindext(name, travt) < 0)
{
- error_msg(h5tools_getprogname(), "%s Could not find <%s> in file <%s>. Exiting...\n",
+ error_msg("%s Could not find <%s> in file <%s>. Exiting...\n",
(options->verbose?"\n":""),name,fname);
goto out;
}
@@ -971,7 +971,7 @@ static const char* get_sfilter(H5Z_filter_t filtn)
else if (filtn==H5Z_FILTER_SCALEOFFSET)
return "SOFF";
else {
- error_msg(h5tools_getprogname(), "input error in filter type\n");
+ error_msg("input error in filter type\n");
exit(EXIT_FAILURE);
}
}
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index ece870f..6853297 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -89,7 +89,7 @@ int copy_objects(const char* fnamein,
*/
if((fidin = h5tools_fopen(fnamein, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, (size_t)0)) < 0)
{
- error_msg(h5tools_getprogname(), "<%s>: %s\n", fnamein, H5FOPENERROR );
+ error_msg("<%s>: %s\n", fnamein, H5FOPENERROR );
goto out;
}
@@ -99,19 +99,19 @@ int copy_objects(const char* fnamein,
if((fcpl_in = H5Fget_create_plist(fidin)) < 0)
{
- error_msg(h5tools_getprogname(), "failed to retrieve file creation property list\n");
+ error_msg("failed to retrieve file creation property list\n");
goto out;
}
if(H5Pget_userblock(fcpl_in, &ub_size) < 0)
{
- error_msg(h5tools_getprogname(), "failed to retrieve userblock size\n");
+ error_msg("failed to retrieve userblock size\n");
goto out;
}
if(H5Pclose(fcpl_in) < 0)
{
- error_msg(h5tools_getprogname(), "failed to close property list\n");
+ error_msg("failed to close property list\n");
goto out;
}
}
@@ -122,7 +122,7 @@ int copy_objects(const char* fnamein,
/* Create file creation property list */
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
{
- error_msg(h5tools_getprogname(), "fail to create a file creation property list\n");
+ error_msg("fail to create a file creation property list\n");
goto out;
}
@@ -130,7 +130,7 @@ int copy_objects(const char* fnamein,
{
if(H5Pset_userblock(fcpl, ub_size) < 0)
{
- error_msg(h5tools_getprogname(), "failed to set non-default userblock size\n");
+ error_msg("failed to set non-default userblock size\n");
goto out;
}
}
@@ -143,7 +143,7 @@ int copy_objects(const char* fnamein,
/* (So that it is created in "dense storage" form) */
if(H5Pset_link_phase_change(fcpl, (unsigned)options->grp_compact, (unsigned)options->grp_indexed) < 0)
{
- error_msg(h5tools_getprogname(), "fail to adjust group creation parameters for root group\n");
+ error_msg("fail to adjust group creation parameters for root group\n");
goto out;
}
@@ -185,7 +185,7 @@ int copy_objects(const char* fnamein,
{
if(H5Pset_shared_mesg_nindexes(fcpl, nindex) < 0)
{
- error_msg(h5tools_getprogname(), "fail to set the number of shared object header message indexes\n");
+ error_msg("fail to set the number of shared object header message indexes\n");
goto out;
}
@@ -193,7 +193,7 @@ int copy_objects(const char* fnamein,
for(i = 0; i < (nindex - 1); i++)
{
if(H5Pset_shared_mesg_index(fcpl, i, mesg_type_flags[i], min_mesg_sizes[i]) < 0) {
- error_msg(h5tools_getprogname(), "fail to configure the specified shared object header message index\n");
+ error_msg("fail to configure the specified shared object header message index\n");
goto out;
} /* end if */
} /* end for */
@@ -202,13 +202,13 @@ int copy_objects(const char* fnamein,
/* Create file access property list */
if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
{
- error_msg(h5tools_getprogname(), "Could not create file access property list\n");
+ error_msg("Could not create file access property list\n");
goto out;
} /* end if */
if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
{
- error_msg(h5tools_getprogname(), "Could not set property for using latest version of the format\n");
+ error_msg("Could not set property for using latest version of the format\n");
goto out;
} /* end if */
} /* end if */
@@ -235,7 +235,7 @@ int copy_objects(const char* fnamein,
/* set user block size */
if(H5Pset_userblock(fcpl, options->ublock_size) < 0)
{
- error_msg(h5tools_getprogname(), "failed to set userblock size\n");
+ error_msg("failed to set userblock size\n");
goto out;
}
@@ -247,14 +247,14 @@ int copy_objects(const char* fnamein,
/* create a file creation property list */
if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
{
- error_msg(h5tools_getprogname(), "fail to create a file creation property list\n");
+ error_msg("fail to create a file creation property list\n");
goto out;
}
/* set user block size */
if(H5Pset_userblock(fcpl, options->ublock_size) < 0)
{
- error_msg(h5tools_getprogname(), "failed to set userblock size\n");
+ error_msg("failed to set userblock size\n");
goto out;
}
@@ -279,7 +279,7 @@ int copy_objects(const char* fnamein,
if (H5Pset_alignment(fapl, options->threshold, options->alignment) < 0)
{
- error_msg(h5tools_getprogname(), "failed to set alignment\n");
+ error_msg("failed to set alignment\n");
goto out;
}
@@ -291,13 +291,13 @@ int copy_objects(const char* fnamein,
/* create a file access property list */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
{
- error_msg(h5tools_getprogname(), "Could not create file access property list\n");
+ error_msg("Could not create file access property list\n");
goto out;
}
if (H5Pset_alignment(fapl, options->threshold, options->alignment) < 0)
{
- error_msg(h5tools_getprogname(), "failed to set alignment\n");
+ error_msg("failed to set alignment\n");
goto out;
}
@@ -318,7 +318,7 @@ int copy_objects(const char* fnamein,
if((fidout = H5Fcreate(fnameout,H5F_ACC_TRUNC, fcpl, fapl)) < 0)
{
- error_msg(h5tools_getprogname(), "<%s>: Could not create file\n", fnameout );
+ error_msg("<%s>: Could not create file\n", fnameout );
goto out;
}
@@ -331,7 +331,7 @@ int copy_objects(const char* fnamein,
{
if ( copy_user_block( options->ublock_filename, fnameout, options->ublock_size) < 0 )
{
- error_msg(h5tools_getprogname(), "Could not copy user block. Exiting...\n");
+ error_msg("Could not copy user block. Exiting...\n");
goto out;
}
@@ -355,7 +355,7 @@ int copy_objects(const char* fnamein,
*/
if(do_copy_objects(fidin, fidout, travt, options) < 0)
{
- error_msg(h5tools_getprogname(), "<%s>: Could not copy data to: %s\n", fnamein, fnameout);
+ error_msg("<%s>: Could not copy data to: %s\n", fnamein, fnameout);
goto out;
} /* end if */
@@ -397,7 +397,7 @@ int copy_objects(const char* fnamein,
{
if ( copy_user_block(fnamein, fnameout, ub_size) < 0 )
{
- error_msg(h5tools_getprogname(), "Could not copy user block. Exiting...\n");
+ error_msg("Could not copy user block. Exiting...\n");
goto out;
}
@@ -1357,19 +1357,19 @@ void print_user_block(const char *filename, hid_t fid)
/* get user block size */
if(( fcpl = H5Fget_create_plist(fid)) < 0)
{
- error_msg(h5tools_getprogname(), "failed to retrieve file creation property list\n");
+ error_msg("failed to retrieve file creation property list\n");
goto done;
}
if(H5Pget_userblock(fcpl, &ub_size) < 0)
{
- error_msg(h5tools_getprogname(), "failed to retrieve userblock size\n");
+ error_msg("failed to retrieve userblock size\n");
goto done;
}
if(H5Pclose(fcpl) < 0)
{
- error_msg(h5tools_getprogname(), "failed to close property list\n");
+ error_msg("failed to close property list\n");
goto done;
}
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index aaabeac..3cc65d0 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -124,7 +124,7 @@ int main(int argc, const char **argv)
if ( strcmp( infile, outfile ) == 0 )
{
- error_msg(h5tools_getprogname(), "file names cannot be the same\n");
+ error_msg("file names cannot be the same\n");
usage(h5tools_getprogname());
exit(EXIT_FAILURE);
@@ -133,7 +133,7 @@ int main(int argc, const char **argv)
else
{
- error_msg(h5tools_getprogname(), "file names missing\n");
+ error_msg("file names missing\n");
usage(h5tools_getprogname());
exit(EXIT_FAILURE);
}
@@ -320,7 +320,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
/* parse the -f filter option */
if (h5repack_addfilter( opt_arg, options)<0)
{
- error_msg(h5tools_getprogname(), "in parsing filter\n");
+ error_msg("in parsing filter\n");
exit(EXIT_FAILURE);
}
break;
@@ -329,7 +329,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
/* parse the -l layout option */
if (h5repack_addlayout( opt_arg, options)<0)
{
- error_msg(h5tools_getprogname(), "in parsing layout\n");
+ error_msg("in parsing layout\n");
exit(EXIT_FAILURE);
}
break;
@@ -340,7 +340,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
options->min_comp = atoi( opt_arg );
if ((int)options->min_comp<=0)
{
- error_msg(h5tools_getprogname(), "invalid minimum compress size <%s>\n", opt_arg );
+ error_msg("invalid minimum compress size <%s>\n", opt_arg );
exit(EXIT_FAILURE);
}
break;
@@ -433,7 +433,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
options->alignment = atol( opt_arg );
if ( options->alignment < 1 )
{
- error_msg(h5tools_getprogname(), "invalid alignment size\n", opt_arg );
+ error_msg("invalid alignment size\n", opt_arg );
exit(EXIT_FAILURE);
}
break;
@@ -448,7 +448,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
/* check for file names to be processed */
if (argc <= opt_ind || argv[ opt_ind + 1 ] == NULL)
{
- error_msg(h5tools_getprogname(), "missing file names\n");
+ error_msg("missing file names\n");
usage(h5tools_getprogname());
exit(EXIT_FAILURE);
}
@@ -492,7 +492,7 @@ void read_info(const char *filename,
if ((fp = fopen(data_file, "r")) == (FILE *)NULL) {
- error_msg(h5tools_getprogname(), "cannot open options file %s\n", filename);
+ error_msg("cannot open options file %s\n", filename);
exit(EXIT_FAILURE);
}
@@ -529,7 +529,7 @@ void read_info(const char *filename,
comp_info[i-1]='\0'; /*cut the last " */
if (h5repack_addfilter(comp_info,options)==-1){
- error_msg(h5tools_getprogname(), "could not add compression option\n");
+ error_msg("could not add compression option\n");
exit(EXIT_FAILURE);
}
}
@@ -559,7 +559,7 @@ void read_info(const char *filename,
comp_info[i-1]='\0'; /*cut the last " */
if (h5repack_addlayout(comp_info,options)==-1){
- error_msg(h5tools_getprogname(), "could not add chunck option\n");
+ error_msg("could not add chunck option\n");
exit(EXIT_FAILURE);
}
}
@@ -568,7 +568,7 @@ void read_info(const char *filename,
*-------------------------------------------------------------------------
*/
else {
- error_msg(h5tools_getprogname(), "bad file format for %s", filename);
+ error_msg("bad file format for %s", filename);
exit(EXIT_FAILURE);
}
}
diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c
index d1cb97a..50f97bd 100644
--- a/tools/h5repack/h5repack_opttable.c
+++ b/tools/h5repack/h5repack_opttable.c
@@ -65,7 +65,7 @@ static void aux_tblinsert_filter(pack_opttbl_t *table,
}
else
{
- error_msg(h5tools_getprogname(), "cannot insert the filter in this object.\
+ error_msg("cannot insert the filter in this object.\
Maximum capacity exceeded\n");
}
}
@@ -124,7 +124,7 @@ static int aux_inctable(pack_opttbl_t *table, int n_objs )
table->size += n_objs;
table->objs = (pack_info_t*)realloc(table->objs, table->size * sizeof(pack_info_t));
if (table->objs==NULL) {
- error_msg(h5tools_getprogname(), "not enough memory for options table\n");
+ error_msg("not enough memory for options table\n");
return -1;
}
for (i = table->nelems; i < table->size; i++)
@@ -151,7 +151,7 @@ int options_table_init( pack_opttbl_t **tbl )
if(NULL == (table = (pack_opttbl_t *)malloc(sizeof(pack_opttbl_t))))
{
- error_msg(h5tools_getprogname(), "not enough memory for options table\n");
+ error_msg("not enough memory for options table\n");
return -1;
}
@@ -159,7 +159,7 @@ int options_table_init( pack_opttbl_t **tbl )
table->nelems = 0;
if(NULL == (table->objs = (pack_info_t*)malloc(table->size * sizeof(pack_info_t))))
{
- error_msg(h5tools_getprogname(), "not enough memory for options table\n");
+ error_msg("not enough memory for options table\n");
free(table);
return -1;
}
@@ -230,7 +230,7 @@ int options_add_layout( obj_list_t *obj_list,
/* already chunk info inserted for this one; exit */
if (table->objs[i].chunk.rank>0)
{
- error_msg(h5tools_getprogname(), "chunk information already inserted for <%s>\n",obj_list[j].obj);
+ error_msg("chunk information already inserted for <%s>\n",obj_list[j].obj);
exit(EXIT_FAILURE);
}
/* insert the layout info */
diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c
index b5753e6..d3a7419 100644
--- a/tools/h5repack/h5repack_parse.c
+++ b/tools/h5repack/h5repack_parse.c
@@ -96,7 +96,7 @@ obj_list_t* parse_filter(const char *str,
obj_list = (obj_list_t*) malloc(n*sizeof(obj_list_t));
if (obj_list==NULL)
{
- error_msg(h5tools_getprogname(), "could not allocate object list\n");
+ error_msg("could not allocate object list\n");
return NULL;
}
*n_objs=n;
@@ -119,7 +119,7 @@ obj_list_t* parse_filter(const char *str,
if (end_obj+1==(int)len)
{
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "input Error: Invalid compression type in <%s>\n",str);
+ error_msg("input Error: Invalid compression type in <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -157,7 +157,7 @@ obj_list_t* parse_filter(const char *str,
c = str[u];
if (!isdigit(c) && l==-1){
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "compression parameter not digit in <%s>\n",str);
+ error_msg("compression parameter not digit in <%s>\n",str);
exit(EXIT_FAILURE);
}
if (l==-1)
@@ -177,7 +177,7 @@ obj_list_t* parse_filter(const char *str,
filt->cd_values[j++]=H5_SZIP_EC_OPTION_MASK;
else
{
- error_msg(h5tools_getprogname(), "szip mask must be 'NN' or 'EC' \n");
+ error_msg("szip mask must be 'NN' or 'EC' \n");
exit(EXIT_FAILURE);
}
@@ -217,7 +217,7 @@ obj_list_t* parse_filter(const char *str,
c = str[u];
if (!isdigit(c) && l==-1){
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "compression parameter is not a digit in <%s>\n",str);
+ error_msg("compression parameter is not a digit in <%s>\n",str);
exit(EXIT_FAILURE);
}
if (l==-1)
@@ -237,7 +237,7 @@ obj_list_t* parse_filter(const char *str,
filt->cd_values[j++]=H5Z_SO_FLOAT_DSCALE;
else
{
- error_msg(h5tools_getprogname(), "scale type must be 'IN' or 'DS' \n");
+ error_msg("scale type must be 'IN' or 'DS' \n");
exit(EXIT_FAILURE);
}
@@ -261,7 +261,7 @@ obj_list_t* parse_filter(const char *str,
c = str[u];
if (!isdigit(c)){
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "compression parameter is not a digit in <%s>\n",str);
+ error_msg("compression parameter is not a digit in <%s>\n",str);
exit(EXIT_FAILURE);
}
stype[m]=c;
@@ -307,7 +307,7 @@ obj_list_t* parse_filter(const char *str,
if (no_param)
{ /*no more parameters, GZIP must have parameter */
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "missing compression parameter in <%s>\n",str);
+ error_msg("missing compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
}
}
@@ -323,7 +323,7 @@ obj_list_t* parse_filter(const char *str,
if (no_param)
{ /*no more parameters, SZIP must have parameter */
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "missing compression parameter in <%s>\n",str);
+ error_msg("missing compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
}
}
@@ -339,7 +339,7 @@ obj_list_t* parse_filter(const char *str,
if (m>0)
{ /*shuffle does not have parameter */
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "extra parameter in SHUF <%s>\n",str);
+ error_msg("extra parameter in SHUF <%s>\n",str);
exit(EXIT_FAILURE);
}
}
@@ -354,7 +354,7 @@ obj_list_t* parse_filter(const char *str,
if (m>0)
{ /*shuffle does not have parameter */
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "extra parameter in FLET <%s>\n",str);
+ error_msg("extra parameter in FLET <%s>\n",str);
exit(EXIT_FAILURE);
}
}
@@ -369,7 +369,7 @@ obj_list_t* parse_filter(const char *str,
if (m>0)
{ /*nbit does not have parameter */
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "extra parameter in NBIT <%s>\n",str);
+ error_msg("extra parameter in NBIT <%s>\n",str);
exit(EXIT_FAILURE);
}
}
@@ -384,13 +384,13 @@ obj_list_t* parse_filter(const char *str,
if (no_param)
{ /*no more parameters, SOFF must have parameter */
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "missing compression parameter in <%s>\n",str);
+ error_msg("missing compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
}
}
else {
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "invalid filter type in <%s>\n",str);
+ error_msg("invalid filter type in <%s>\n",str);
exit(EXIT_FAILURE);
}
}
@@ -413,7 +413,7 @@ obj_list_t* parse_filter(const char *str,
if (filt->cd_values[0]>9 )
{
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "invalid compression parameter in <%s>\n",str);
+ error_msg("invalid compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
}
break;
@@ -428,19 +428,19 @@ obj_list_t* parse_filter(const char *str,
if ((pixels_per_block%2)==1)
{
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "pixels_per_block is not even in <%s>\n",str);
+ error_msg("pixels_per_block is not even in <%s>\n",str);
exit(EXIT_FAILURE);
}
if (pixels_per_block>H5_SZIP_MAX_PIXELS_PER_BLOCK)
{
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "pixels_per_block is too large in <%s>\n",str);
+ error_msg("pixels_per_block is too large in <%s>\n",str);
exit(EXIT_FAILURE);
}
if ( (strcmp(smask,"NN")!=0) && (strcmp(smask,"EC")!=0) )
{
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "szip mask must be 'NN' or 'EC' \n");
+ error_msg("szip mask must be 'NN' or 'EC' \n");
exit(EXIT_FAILURE);
}
break;
@@ -517,7 +517,7 @@ obj_list_t* parse_layout(const char *str,
obj_list = (obj_list_t*) malloc(n*sizeof(obj_list_t));
if (obj_list==NULL)
{
- error_msg(h5tools_getprogname(), "could not allocate object list\n");
+ error_msg("could not allocate object list\n");
return NULL;
}
*n_objs=n;
@@ -541,7 +541,7 @@ obj_list_t* parse_layout(const char *str,
if (end_obj+1==(int)len)
{
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "in parse layout, no characters after : in <%s>\n",str);
+ error_msg("in parse layout, no characters after : in <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -558,7 +558,7 @@ obj_list_t* parse_layout(const char *str,
else if (strcmp(slayout,"CHUNK")==0)
pack->layout=H5D_CHUNKED;
else {
- error_msg(h5tools_getprogname(), "in parse layout, not a valid layout in <%s>\n",str);
+ error_msg("in parse layout, not a valid layout in <%s>\n",str);
exit(EXIT_FAILURE);
}
}
@@ -582,7 +582,7 @@ obj_list_t* parse_layout(const char *str,
if (j>(int)len)
{
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "in parse layout, <%s> Chunk dimensions missing\n",str);
+ error_msg("in parse layout, <%s> Chunk dimensions missing\n",str);
exit(EXIT_FAILURE);
}
@@ -596,7 +596,7 @@ obj_list_t* parse_layout(const char *str,
&& c!='N' && c!='O' && c!='N' && c!='E'
){
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "in parse layout, <%s> Not a valid character in <%s>\n",
+ error_msg("in parse layout, <%s> Not a valid character in <%s>\n",
sdim,str);
exit(EXIT_FAILURE);
}
@@ -609,7 +609,7 @@ obj_list_t* parse_layout(const char *str,
pack->chunk.chunk_lengths[c_index]=atoi(sdim);
if (pack->chunk.chunk_lengths[c_index]==0) {
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "in parse layout, <%s> conversion to number in <%s>\n",
+ error_msg("in parse layout, <%s> conversion to number in <%s>\n",
sdim,str);
exit(EXIT_FAILURE);
}
@@ -627,7 +627,7 @@ obj_list_t* parse_layout(const char *str,
pack->chunk.chunk_lengths[c_index]=atoi(sdim);
if (pack->chunk.chunk_lengths[c_index]==0){
if (obj_list) free(obj_list);
- error_msg(h5tools_getprogname(), "in parse layout, <%s> conversion to number in <%s>\n",
+ error_msg("in parse layout, <%s> conversion to number in <%s>\n",
sdim,str);
exit(EXIT_FAILURE);
}
diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c
index 90a3671..d83f23b 100644
--- a/tools/h5repack/h5repack_verify.c
+++ b/tools/h5repack/h5repack_verify.c
@@ -312,12 +312,12 @@ int h5repack_cmp_pl(const char *fname1,
/* Open the files */
if ((fid1=H5Fopen(fname1,H5F_ACC_RDONLY,H5P_DEFAULT)) < 0 )
{
- error_msg(h5tools_getprogname(), "<%s>: %s\n", fname1, H5FOPENERROR );
+ error_msg("<%s>: %s\n", fname1, H5FOPENERROR );
return -1;
}
if ((fid2=H5Fopen(fname2,H5F_ACC_RDONLY,H5P_DEFAULT)) < 0 )
{
- error_msg(h5tools_getprogname(), "<%s>: %s\n", fname2, H5FOPENERROR );
+ error_msg("<%s>: %s\n", fname2, H5FOPENERROR );
H5Fclose(fid1);
return -1;
}
@@ -366,7 +366,7 @@ int h5repack_cmp_pl(const char *fname1,
if ( crt_order_flag1 != crt_order_flag2 )
{
- error_msg(h5tools_getprogname(), "property lists for <%s> are different\n",trav->objs[i].name);
+ error_msg("property lists for <%s> are different\n",trav->objs[i].name);
goto error;
}
@@ -394,7 +394,7 @@ int h5repack_cmp_pl(const char *fname1,
if(ret == 0)
{
- error_msg(h5tools_getprogname(), "property lists for <%s> are different\n",trav->objs[i].name);
+ error_msg("property lists for <%s> are different\n",trav->objs[i].name);
goto error;
}