diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/src/h5repack/h5repack_copy.c | 62 |
1 files changed, 36 insertions, 26 deletions
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index a3f4047..42c393b 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -665,15 +665,17 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti *------------------------------------------------------------------------- */ - if (options->verbose == 2) { - HDprintf("-----------------------------------------------------------------\n"); - HDprintf(" Type Filter (Compression) Timing read/write Name\n"); - HDprintf("-----------------------------------------------------------------\n"); - } - else { - HDprintf("-----------------------------------------\n"); - HDprintf(" Type Filter (Compression) Name\n"); - HDprintf("-----------------------------------------\n"); + if (options->verbose > 0) { + if (options->verbose == 2) { + HDprintf("-----------------------------------------------------------------\n"); + HDprintf(" Type Filter (Compression) Timing read/write Name\n"); + HDprintf("-----------------------------------------------------------------\n"); + } + else { + HDprintf("-----------------------------------------\n"); + HDprintf(" Type Filter (Compression) Name\n"); + HDprintf("-----------------------------------------\n"); + } } if (travt->objs) { @@ -691,10 +693,12 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti *------------------------------------------------------------------------- */ case H5TRAV_TYPE_GROUP: - if (options->verbose == 2) - HDprintf(FORMAT_OBJ_NOTIME, "group", travt->objs[i].name); - else - HDprintf(FORMAT_OBJ, "group", travt->objs[i].name); + if (options->verbose > 0) { + if (options->verbose == 2) + HDprintf(FORMAT_OBJ_NOTIME, "group", travt->objs[i].name); + else + HDprintf(FORMAT_OBJ, "group", travt->objs[i].name); + } /* open input group */ if ((grp_in = H5Gopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0) @@ -1198,7 +1202,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti if (options->verbose > 0) { double ratio = 0; - /* only print the compression ration if there was a filter request */ + /* only print the compression ratio if there was a filter request */ if (apply_s && apply_f && req_filter) { /* get the storage size of the output dataset */ dsize_out = H5Dget_storage_size(dset_out); @@ -1304,10 +1308,12 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti if (H5Dclose(dset_out) < 0) H5TOOLS_GOTO_ERROR((-1), "H5Dclose failed"); - if (options->verbose == 2) - HDprintf(FORMAT_OBJ_TIME, "dset", 0.0, write_time, travt->objs[i].name); - else - HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name); + if (options->verbose > 0) { + if (options->verbose == 2) + HDprintf(FORMAT_OBJ_TIME, "dset", 0.0, write_time, travt->objs[i].name); + else + HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name); + } } /* end whether we have request for filter/chunking */ @@ -1319,10 +1325,12 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti *------------------------------------------------------------------------- */ case H5TRAV_TYPE_NAMED_DATATYPE: - if (options->verbose == 2) - HDprintf(FORMAT_OBJ_NOTIME, "type", travt->objs[i].name); - else - HDprintf(FORMAT_OBJ, "type", travt->objs[i].name); + if (options->verbose > 0) { + if (options->verbose == 2) + HDprintf(FORMAT_OBJ_NOTIME, "type", travt->objs[i].name); + else + HDprintf(FORMAT_OBJ, "type", travt->objs[i].name); + } if ((type_in = H5Topen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0) H5TOOLS_GOTO_ERROR((-1), "H5Topen2 failed"); @@ -1361,10 +1369,12 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti */ case H5TRAV_TYPE_LINK: case H5TRAV_TYPE_UDLINK: - if (options->verbose == 2) - HDprintf(FORMAT_OBJ_NOTIME, "link", travt->objs[i].name); - else - HDprintf(FORMAT_OBJ, "link", travt->objs[i].name); + if (options->verbose > 0) { + if (options->verbose == 2) + HDprintf(FORMAT_OBJ_NOTIME, "link", travt->objs[i].name); + else + HDprintf(FORMAT_OBJ, "link", travt->objs[i].name); + } /* Check -X option. */ if (options->merge) { |