From b6903e910bc0f86075f870df1f24c403067315fe Mon Sep 17 00:00:00 2001 From: Patrick Lu Date: Wed, 15 Sep 1999 15:12:50 -0500 Subject: [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 --- tools/h5dump.c | 28 +++++++--------------------- tools/h5tools.h | 1 + 2 files changed, 8 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 ] [-d ] [-g ]\n \ - [-l ] [-t ] [-w ] \n\n\ + [-l ] [-t ] \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 ] [-d ] [-g ]\n \ -g Display the specified group(s) and all the members.\n\ -l Displays the value(s) of the specified soft link(s).\n\ -t Display the specified named data type(s).\n\ - -w Display the information with the specified maximum number of columns.\n\ \n\ - is one or more appropriate object names.\n\ - is an integer greater than 1.\n\n"); + 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 or no or no after option %s\n", argv[opts[i]]); + fprintf (stderr, "h5dump error: no or no 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(); diff --git a/tools/h5tools.h b/tools/h5tools.h index 3de5bf1..da63be0 100644 --- a/tools/h5tools.h +++ b/tools/h5tools.h @@ -295,6 +295,7 @@ extern ProgType programtype; #define CTYPE "CTYPE" #define CONCATENATOR "//" #define DATASET "DATASET" +#define OBJECTID "OBJECTID" #define BEGIN "{" #define END "}" #endif -- cgit v0.12