summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-04-06 18:49:36 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-04-06 18:49:36 (GMT)
commit843f369468f744db5db35cd112bf850a1cbb0e1a (patch)
tree28236537297b1251d53045568ad377e8c20b215c /tools
parent9d01b26a9302bdff93e20f1a6e55cb473a79d174 (diff)
downloadhdf5-843f369468f744db5db35cd112bf850a1cbb0e1a.zip
hdf5-843f369468f744db5db35cd112bf850a1cbb0e1a.tar.gz
hdf5-843f369468f744db5db35cd112bf850a1cbb0e1a.tar.bz2
[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:
Diffstat (limited to 'tools')
-rw-r--r--tools/h5repack/h5repack_copy.c19
1 files 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