diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-10-05 14:35:40 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-10-05 14:35:40 (GMT) |
commit | 5df5ee8956c9613793908169676de0fb47582c71 (patch) | |
tree | a48346c4a0d1e6284ad916807030e288a6979577 /tools/h5repack/h5repack_refs.c | |
parent | 4d8a0f4c54b95c5b865ebdee6e82cf42c7b44c5a (diff) | |
download | hdf5-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_refs.c')
-rw-r--r-- | tools/h5repack/h5repack_refs.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c index 73fb2fc..1f7c2e9 100644 --- a/tools/h5repack/h5repack_refs.c +++ b/tools/h5repack/h5repack_refs.c @@ -12,13 +12,15 @@ * access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - #include <stdlib.h> #include <string.h> #include <stdio.h> #include "H5private.h" +#include "h5tools_utils.h" #include "h5repack.h" +extern char *progname; + static const char* MapIdToName(hid_t refobj_id, trav_table_t *travt); @@ -173,7 +175,7 @@ int do_copy_refobjs(hid_t fidin, { buf=(void *) HDmalloc((unsigned)(nelmts*msize)); if ( buf==NULL){ - printf( "cannot read into memory\n" ); + error_msg(progname, "cannot read into memory\n" ); goto error; } if (H5Dread(dset_in,mtype_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0) @@ -183,7 +185,7 @@ int do_copy_refobjs(hid_t fidin, goto error; refbuf=HDmalloc((unsigned)nelmts*msize); if ( refbuf==NULL){ - printf( "cannot allocate memory\n" ); + error_msg(progname, "cannot allocate memory\n" ); goto error; } for ( u=0; u<nelmts; u++) @@ -247,7 +249,7 @@ int do_copy_refobjs(hid_t fidin, { buf=(void *) HDmalloc((unsigned)(nelmts*msize)); if ( buf==NULL){ - printf( "cannot read into memory\n" ); + error_msg(progname, "cannot read into memory\n" ); goto error; } if (H5Dread(dset_in,mtype_id,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf)<0) @@ -262,7 +264,7 @@ int do_copy_refobjs(hid_t fidin, refbuf=HDcalloc(sizeof(hdset_reg_ref_t),(size_t)nelmts); /*init to zero */ if ( refbuf==NULL){ - printf( "cannot allocate memory\n" ); + error_msg(progname, "cannot allocate memory\n" ); goto error; } for ( u=0; u<nelmts; u++) @@ -549,7 +551,7 @@ static int copy_refs_attr(hid_t loc_in, { buf=(void *) HDmalloc((unsigned)(nelmts*msize)); if ( buf==NULL){ - printf( "cannot read into memory\n" ); + error_msg(progname, "cannot read into memory\n" ); goto error; } if (H5Aread(attr_id,mtype_id,buf)<0) @@ -559,7 +561,7 @@ static int copy_refs_attr(hid_t loc_in, goto error; refbuf=HDmalloc((unsigned)nelmts*msize); if ( refbuf==NULL){ - printf( "cannot allocate memory\n" ); + error_msg(progname, "cannot allocate memory\n" ); goto error; } for ( k=0; k<nelmts; k++) @@ -626,7 +628,7 @@ static int copy_refs_attr(hid_t loc_in, { buf=(void *) HDmalloc((unsigned)(nelmts*msize)); if ( buf==NULL){ - printf( "cannot read into memory\n" ); + error_msg(progname, "cannot read into memory\n" ); goto error; } if (H5Aread(attr_id,mtype_id,buf)<0) @@ -641,7 +643,7 @@ static int copy_refs_attr(hid_t loc_in, refbuf=HDcalloc(sizeof(hdset_reg_ref_t),(size_t)nelmts); /*init to zero */ if ( refbuf==NULL){ - printf( "cannot allocate memory\n" ); + error_msg(progname, "cannot allocate memory\n" ); goto error; } for ( k=0; k<nelmts; k++) |