summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_copy.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2007-05-24 19:09:36 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2007-05-24 19:09:36 (GMT)
commitbd2c3b52a8acf822d8cb97a365425b2c18dc0621 (patch)
tree9e17846904fd2eb2b64f3459f9aae789160b4626 /tools/h5repack/h5repack_copy.c
parentfa133cfb95c052f3b96b0a5089b98491b77628ef (diff)
downloadhdf5-bd2c3b52a8acf822d8cb97a365425b2c18dc0621.zip
hdf5-bd2c3b52a8acf822d8cb97a365425b2c18dc0621.tar.gz
hdf5-bd2c3b52a8acf822d8cb97a365425b2c18dc0621.tar.bz2
[svn-r13810]
Minor tunings to output verbose messages: 1)when there is not a filter request do not print a message saying the filter was not apllied when the dataset was too small 2) avoid printing the message that has a list of objects to modify when there is none Tested:linux
Diffstat (limited to 'tools/h5repack/h5repack_copy.c')
-rw-r--r--tools/h5repack/h5repack_copy.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 54e9dd2..bb9fea3 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -231,6 +231,7 @@ int do_copy_objects(hid_t fidin,
double per; /* percent utilization of storage */
void *buf=NULL; /* buffer for raw data */
void *sm_buf=NULL; /* buffer for raw data */
+ int has_filter; /* current object has a filter */
unsigned i;
int is_ref=0;
@@ -287,6 +288,8 @@ int do_copy_objects(hid_t fidin,
*/
case H5G_DATASET:
+ has_filter = 0;
+
/* early detection of references */
if ((dset_in=H5Dopen(fidin,travt->objs[i].name))<0)
goto error;
@@ -376,7 +379,7 @@ int do_copy_objects(hid_t fidin,
/* apply the filter */
if (apply_s){
- if (apply_filters(travt->objs[i].name,rank,dims,dcpl_out,options)<0)
+ if (apply_filters(travt->objs[i].name,rank,dims,dcpl_out,options,&has_filter)<0)
goto error;
}
@@ -529,16 +532,20 @@ int do_copy_objects(hid_t fidin,
}
else
print_dataset_info(dcpl_id,travt->objs[i].name,0.0);
- }
- if (apply_s==0 && options->verbose)
- printf(" <warning: filter not applied to %s. dataset smaller than %d bytes>\n",
- travt->objs[i].name,
- (int)options->threshold);
+ /* print a message that the filter was not applied
+ (in case there was a filter)
+ */
+ if ( has_filter && apply_s == 0 )
+ printf(" <warning: filter not applied to %s. dataset smaller than %d bytes>\n",
+ travt->objs[i].name,
+ (int)options->threshold);
- if (apply_f==0 && options->verbose)
- printf(" <warning: could not apply the filter to %s>\n",
- travt->objs[i].name);
+ if ( has_filter && apply_f == 0 )
+ printf(" <warning: could not apply the filter to %s>\n",
+ travt->objs[i].name);
+
+ } /* verbose */
/*-------------------------------------------------------------------------
* copy attrs