From 843f369468f744db5db35cd112bf850a1cbb0e1a Mon Sep 17 00:00:00 2001 From: Pedro Vicente Nunes Date: Thu, 6 Apr 2006 13:49:36 -0500 Subject: [svn-r12206] Purpose: new feature Description: added some alignment for the printout of attributes, so that is formatted with the new printout of datasets compression Solution: Platforms tested: linux solaris AIX Misc. update: --- tools/h5repack/h5repack_copy.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index a385fa2..8c77240 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -24,7 +24,10 @@ per = (float)fabs(1-( (float)B / (float)A )); \ } -#define FORMAT_OBJ " %-21s %s\n" /* obj type, name */ +#define FORMAT_OBJ " %-21s %s\n" /* obj type, name */ +#define FORMAT_OBJ_ATTR " %-21s %s\n" /* obj type, name */ + + /*------------------------------------------------------------------------- * Function: print_dataset_info @@ -645,13 +648,13 @@ int copy_attr(hid_t loc_in, pack_opt_t *options ) { - hid_t attr_id=-1; /* attr ID */ - hid_t attr_out=-1; /* attr ID */ - hid_t space_id=-1; /* space ID */ - hid_t ftype_id=-1; /* file data type ID */ - hid_t mtype_id=-1; /* memory data type ID */ + hid_t attr_id; /* attr ID */ + hid_t attr_out; /* attr ID */ + hid_t space_id; /* space ID */ + hid_t ftype_id; /* file data type ID */ + hid_t mtype_id; /* memory data type ID */ size_t msize; /* memory size of type */ - void *buf=NULL; /* data buffer */ + void *buf=NULL; /* data buffer */ hsize_t nelmts; /* number of elements in dataset */ int rank; /* rank of dataset */ hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */ @@ -750,7 +753,7 @@ int copy_attr(hid_t loc_in, if (options->verbose) - printf(" %-13s %s\n", "attr", name); + printf(FORMAT_OBJ_ATTR, "attr", name); /*------------------------------------------------------------------------- * close -- cgit v0.12