diff options
author | Patrick Lu <ptlu@hawkwind.ncsa.uiuc.edu> | 1999-06-17 15:53:14 (GMT) |
---|---|---|
committer | Patrick Lu <ptlu@hawkwind.ncsa.uiuc.edu> | 1999-06-17 15:53:14 (GMT) |
commit | ca9f4c3888a5763b20b696ace5e213ab0f72f6e6 (patch) | |
tree | 85996a295d2b6cd1ef951e903d8a0daf313f15f9 /tools | |
parent | 99478cd128dc51cb9a2b09648d4e608243bd81fb (diff) | |
download | hdf5-ca9f4c3888a5763b20b696ace5e213ab0f72f6e6.zip hdf5-ca9f4c3888a5763b20b696ace5e213ab0f72f6e6.tar.gz hdf5-ca9f4c3888a5763b20b696ace5e213ab0f72f6e6.tar.bz2 |
[svn-r1361]
made the output for the dataset regions look like how Albert wanted it to
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5tools.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tools/h5tools.c b/tools/h5tools.c index 7b14edc..deed73b 100644 --- a/tools/h5tools.c +++ b/tools/h5tools.c @@ -519,13 +519,19 @@ h5dump_region(hid_t region, h5dump_str_t *str/*in,out*/) ptdata = malloc(nblocks*ndims*2*sizeof(ptdata[0])); H5Sget_select_hyper_blocklist(region, 0, nblocks, ptdata); for (i=0; i<nblocks; i++) { + if (programtype == H5DUMP) { + h5dump_str_append(str, "%s", + i?","OPTIONAL_LINE_BREAK" ":"", + (unsigned long)i); + } + else { h5dump_str_append(str, "%sBlk%lu: ", i?","OPTIONAL_LINE_BREAK" ":"", (unsigned long)i); - + } /* Start coordinates and opposite corner */ for (j=0; j<ndims; j++) { - h5dump_str_append(str, "%s%lu", j?",":"(", + h5dump_str_append(str, "%s%lu", j?",":"(", (unsigned long)(ptdata[i*2*ndims+j])); } for (j=0; j<ndims; j++) { @@ -542,9 +548,16 @@ h5dump_region(hid_t region, h5dump_str_t *str/*in,out*/) ptdata = malloc(npoints*ndims*sizeof(ptdata[0])); H5Sget_select_elem_pointlist(region, 0, npoints, ptdata); for (i=0; i<npoints; i++) { + if (programtype == H5DUMP){ + h5dump_str_append(str, "%s", + i?","OPTIONAL_LINE_BREAK" ":"", + (unsigned long)i); + } + else { h5dump_str_append(str, "%sPt%lu: ", i?","OPTIONAL_LINE_BREAK" ":"", (unsigned long)i); + } for (j=0; j<ndims; j++) { h5dump_str_append(str, "%s%lu", j?",":"(", (unsigned long)(ptdata[i*ndims+j])); @@ -870,9 +883,14 @@ h5dump_sprint(h5dump_str_t *str/*in,out*/, const h5dump_t *info, obj = H5Rdereference(container, H5R_DATASET_REGION, vp); region = H5Rget_region(container, H5R_DATASET_REGION, vp); H5Gget_objinfo(obj, ".", FALSE, &sb); + if (programtype == H5DUMP) { + h5dump_str_append(str, "%s-",DATASET); + } + else { h5dump_str_append(str, "DSET-%lu:%lu:%lu:%lu-", sb.fileno[1], sb.fileno[0], sb.objno[1], sb.objno[0]); + } h5dump_region(region, str); H5Sclose(region); H5Dclose(obj); |