diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2009-06-17 18:25:34 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2009-06-17 18:25:34 (GMT) |
commit | 2a876ea0867f15972d58720836c56dbdb4857619 (patch) | |
tree | 21453c15ab898cf054184a9ec6f45081eec45fae /tools/h5dump/h5dump.c | |
parent | e05933f2454b16a4ce8148c2a0ebcee790d4d8c0 (diff) | |
download | hdf5-2a876ea0867f15972d58720836c56dbdb4857619.zip hdf5-2a876ea0867f15972d58720836c56dbdb4857619.tar.gz hdf5-2a876ea0867f15972d58720836c56dbdb4857619.tar.bz2 |
[svn-r17075] Implemented nowrap option (Bug 811) equivalent to h5ls tool. Also updated usage output.
Tested: linux
Diffstat (limited to 'tools/h5dump/h5dump.c')
-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; /* |