summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2009-06-17 18:49:51 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2009-06-17 18:49:51 (GMT)
commitc75dd8fadc2b923d1a572d97c33c20c614dc4c4e (patch)
tree88a81867ae443191b2d4ceac2707838d355ecc6c
parent86fa22c385bb655afaed25e31dd8676b9f94024b (diff)
downloadhdf5-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
-rw-r--r--tools/h5dump/h5dump.c18
-rw-r--r--tools/testfiles/tnofilename.ddl4
2 files changed, 18 insertions, 4 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;
/*
diff --git a/tools/testfiles/tnofilename.ddl b/tools/testfiles/tnofilename.ddl
index 5b5854d..594b0c0 100644
--- a/tools/testfiles/tnofilename.ddl
+++ b/tools/testfiles/tnofilename.ddl
@@ -22,7 +22,9 @@ usage: h5dump [OPTIONS] file
-o F, --output=F Output raw data into file F
-b B, --binary=B Binary file output, of form B
-t P, --datatype=P Print the specified named datatype
- -w N, --width=N Set the number of columns of output
+ -w N, --width=N Set the number of columns of output. A value of 0 (zero)
+ sets the number of columns to the maximum (65535).
+ Default width is 80 columns.
-m T, --format=T Set the floating point output format
-q Q, --sort_by=Q Sort groups and attributes by index Q
-z Z, --sort_order=Z Sort groups and attributes by order Z