summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_opttable.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-10-05 14:35:40 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-10-05 14:35:40 (GMT)
commit5df5ee8956c9613793908169676de0fb47582c71 (patch)
treea48346c4a0d1e6284ad916807030e288a6979577 /tools/h5repack/h5repack_opttable.c
parent4d8a0f4c54b95c5b865ebdee6e82cf42c7b44c5a (diff)
downloadhdf5-5df5ee8956c9613793908169676de0fb47582c71.zip
hdf5-5df5ee8956c9613793908169676de0fb47582c71.tar.gz
hdf5-5df5ee8956c9613793908169676de0fb47582c71.tar.bz2
[svn-r12720]
added output of error messages using the tools library function error_msg, that prints the program name and error on the message tested: kagiso
Diffstat (limited to 'tools/h5repack/h5repack_opttable.c')
-rw-r--r--tools/h5repack/h5repack_opttable.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c
index 17e8f2c..a0b1698 100644
--- a/tools/h5repack/h5repack_opttable.c
+++ b/tools/h5repack/h5repack_opttable.c
@@ -12,11 +12,12 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
#include <stdlib.h>
#include <string.h>
+#include "h5tools_utils.h"
#include "h5repack.h"
+extern char *progname;
/*-------------------------------------------------------------------------
* Function: init_packobject
@@ -67,7 +68,7 @@ static void aux_tblinsert_filter(pack_opttbl_t *table,
}
else
{
- printf("Cannot insert the filter in this object.\
+ error_msg(progname, "cannot insert the filter in this object.\
Maximum capacity exceeded\n");
}
}
@@ -126,7 +127,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) {
- printf("Error: not enough memory for options table\n");
+ error_msg(progname, "not enough memory for options table\n");
return -1;
}
for (i = table->nelems; i < table->size; i++)
@@ -151,7 +152,7 @@ int options_table_init( pack_opttbl_t **tbl )
int i;
pack_opttbl_t* table = (pack_opttbl_t*) malloc(sizeof(pack_opttbl_t));
if (table==NULL) {
- printf("Error: not enough memory for options table\n");
+ error_msg(progname, "not enough memory for options table\n");
return -1;
}
@@ -159,7 +160,7 @@ int options_table_init( pack_opttbl_t **tbl )
table->nelems = 0;
table->objs = (pack_info_t*) malloc(table->size * sizeof(pack_info_t));
if (table->objs==NULL) {
- printf("Error: not enough memory for options table\n");
+ error_msg(progname, "not enough memory for options table\n");
return -1;
}
@@ -229,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)
{
- printf("Input Error: chunk information already inserted for <%s>\n",obj_list[j].obj);
+ error_msg(progname, "chunk information already inserted for <%s>\n",obj_list[j].obj);
exit(1);
}
/* insert the layout info */