diff options
author | Patrick Lu <ptlu@hawkwind.ncsa.uiuc.edu> | 1999-09-15 20:12:50 (GMT) |
---|---|---|
committer | Patrick Lu <ptlu@hawkwind.ncsa.uiuc.edu> | 1999-09-15 20:12:50 (GMT) |
commit | b6903e910bc0f86075f870df1f24c403067315fe (patch) | |
tree | d0de88c869c81b4a9076d61c9dc1a8cbf19b4503 /tools/h5dump.c | |
parent | d6d756ef965762cb109e8d004dde3768f5bc567b (diff) | |
download | hdf5-b6903e910bc0f86075f870df1f24c403067315fe.zip hdf5-b6903e910bc0f86075f870df1f24c403067315fe.tar.gz hdf5-b6903e910bc0f86075f870df1f24c403067315fe.tar.bz2 |
[svn-r1636]
h5tools.h- added a define for OBJECTID-->"OBJECTID"
h5dump.c - added an option in there to print object id's
still needs some testing but I just wanted the changes to be put up there before i
forget
Diffstat (limited to 'tools/h5dump.c')
-rw-r--r-- | tools/h5dump.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/tools/h5dump.c b/tools/h5dump.c index c5528a2..c8e7fc5 100644 --- a/tools/h5dump.c +++ b/tools/h5dump.c @@ -52,7 +52,7 @@ usage(void) fprintf(stderr, "\nUsage of HDF5 Dumper:\n\n \ h5dump [-h] [-bb] [-header] [-a <names>] [-d <names>] [-g <names>]\n \ - [-l <names>] [-t <names>] [-w <number>] <file>\n\n\ + [-l <names>] [-t <names>] <file>\n\n\ -h Print information on this command.\n\ -bb Display the conent of the boot block. The default is not to display.\n\ -header Display header only; no data is displayed.\n\ @@ -61,10 +61,8 @@ h5dump [-h] [-bb] [-header] [-a <names>] [-d <names>] [-g <names>]\n \ -g <names> Display the specified group(s) and all the members.\n\ -l <names> Displays the value(s) of the specified soft link(s).\n\ -t <names> Display the specified named data type(s).\n\ - -w <number> Display the information with the specified maximum number of columns.\n\ \n\ - <names> is one or more appropriate object names.\n\ - <number> is an integer greater than 1.\n\n"); + <names> is one or more appropriate object names.\n\n"); } @@ -592,7 +590,7 @@ H5G_stat_t statbuf; if (display_data) dump_data(attr_id, ATTRIBUTE_DATA); H5Tclose(type); H5Sclose(space); - H5Aclose (attr_id); + H5Aclose (attr_id); end_obj(); } else { @@ -1280,7 +1278,7 @@ main(int argc, char *argv[]) { hid_t fid, gid, dsetid, typeid; hid_t plist=H5P_DEFAULT; const char *fname = NULL; -int i, index, curr_arg, display_bb=0, display_all=1, newwidth= 0; +int i, index, curr_arg, display_bb=0, display_all=1; int nopts=0, *opts; char *buf, name[128], name1[128]; H5G_stat_t statbuf; @@ -1322,13 +1320,6 @@ H5Eset_auto (NULL, NULL); display_data=0; - else if (!strcmp(argv[curr_arg],"-w")){ - /* - this way we know which arg was the -w - we know it won't be 0 since curr_arg starts at 1 - */ - newwidth = curr_arg; - } else if (strcmp(argv[curr_arg],"-a") && strcmp(argv[curr_arg],"-d") && strcmp(argv[curr_arg],"-g") && @@ -1373,7 +1364,7 @@ H5Eset_auto (NULL, NULL); if (argc - opts[nopts-1] == 2) { if (strcmp(argv[opts[i]], "-bb") && strcmp(argv[opts[i]], "-header") ) { - fprintf (stderr, "h5dump error: no <file> or no <names> or no <number> after option %s\n", argv[opts[i]]); + fprintf (stderr, "h5dump error: no <file> or no <names> after option %s\n", argv[opts[i]]); usage(); free(opts); exit(1); @@ -1416,13 +1407,8 @@ H5Eset_auto (NULL, NULL); /* start to dump */ begin_obj("HDF5", fname); - if (display_bb) dump_bb(); - - if (newwidth) { - sscanf(argv[newwidth + 1], "%d", &nCols); - } - + if (display_all) { if ((gid = H5Gopen (fid, "/")) < 0 ) { @@ -1587,7 +1573,7 @@ H5Eset_auto (NULL, NULL); if (H5Tclose(typeid) < 0) status = 1; } } - } + } } end_obj(); |