diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2009-06-17 18:49:51 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2009-06-17 18:49:51 (GMT) |
commit | c75dd8fadc2b923d1a572d97c33c20c614dc4c4e (patch) | |
tree | 88a81867ae443191b2d4ceac2707838d355ecc6c /tools/h5dump | |
parent | 86fa22c385bb655afaed25e31dd8676b9f94024b (diff) | |
download | hdf5-c75dd8fadc2b923d1a572d97c33c20c614dc4c4e.zip hdf5-c75dd8fadc2b923d1a572d97c33c20c614dc4c4e.tar.gz hdf5-c75dd8fadc2b923d1a572d97c33c20c614dc4c4e.tar.bz2 |
[svn-r17078] Implemented nowrap option (Bug 811) equivalent to h5ls tool. Also updated usage output.
Tested: linux
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/h5dump.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 5d3db21..a8b6832 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -649,7 +649,9 @@ usage(const char *prog) fprintf(stdout, " -o F, --output=F Output raw data into file F\n"); fprintf(stdout, " -b B, --binary=B Binary file output, of form B\n"); fprintf(stdout, " -t P, --datatype=P Print the specified named datatype\n"); - fprintf(stdout, " -w N, --width=N Set the number of columns of output\n"); + fprintf(stdout, " -w N, --width=N Set the number of columns of output. A value of 0 (zero)\n"); + fprintf(stdout, " sets the number of columns to the maximum (65535).\n"); + fprintf(stdout, " Default width is 80 columns.\n"); fprintf(stdout, " -m T, --format=T Set the floating point output format\n"); fprintf(stdout, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n"); fprintf(stdout, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n"); @@ -2377,7 +2379,12 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index) outputformat->fmt_float = fp_format; } - outputformat->line_ncols = nCols; + if (nCols==0) { + outputformat->line_ncols = 65535; + outputformat->line_per_line = 1; + } + else + outputformat->line_ncols = nCols; outputformat->do_escape=display_escape; /* print the matrix indices */ outputformat->pindex=display_index; @@ -5363,7 +5370,12 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU int depth; int stdindent = COL; /* should be 3 */ - outputformat->line_ncols = nCols; + if (nCols==0) { + outputformat->line_ncols = 65535; + outputformat->line_per_line = 1; + } + else + outputformat->line_ncols = nCols; indent += COL; /* |