summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack.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.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.c')
-rw-r--r--tools/h5repack/h5repack.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c
index 5ebd68b..2449c36 100644
--- a/tools/h5repack/h5repack.c
+++ b/tools/h5repack/h5repack.c
@@ -256,7 +256,7 @@ static int check_options(pack_opt_t *options)
* objects to layout
*-------------------------------------------------------------------------
*/
- if (options->verbose)
+ if (options->verbose && have_request(options) /* only print if requested */)
{
printf("Objects to modify layout are...\n");
if (options->all_layout==1) {
@@ -318,7 +318,7 @@ static int check_options(pack_opt_t *options)
*-------------------------------------------------------------------------
*/
- if (options->verbose)
+ if (options->verbose && have_request(options) /* only print if requested */)
{
printf("Objects to apply filter are...\n");
if (options->all_filter==1)
@@ -407,7 +407,7 @@ void read_info(const char *filename,
if ((fp = fopen(data_file, "r")) == (FILE *)NULL) {
- error_msg(progname, "cannot open options file %s", filename);
+ error_msg(progname, "cannot open options file %s\n", filename);
exit(1);
}
@@ -493,3 +493,23 @@ void read_info(const char *filename,
}
+/*-------------------------------------------------------------------------
+ * Function: have_request
+ *
+ * Purpose: check if a filter or layout was requested
+ *
+ * Return: 1 yes, 0 no
+ *
+ * Date: May, 24, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+int have_request(pack_opt_t *options)
+{
+
+ if (options->all_filter || options->all_layout || options->op_tbl->nelems)
+ return 1;
+
+ return 0;
+
+} \ No newline at end of file