summaryrefslogtreecommitdiffstats
path: root/tools/h5dump.c
diff options
context:
space:
mode:
authorPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>2000-06-06 18:07:20 (GMT)
committerPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>2000-06-06 18:07:20 (GMT)
commit4d16bcfecbf51574e3f8bb8cd0e50373892fa462 (patch)
tree44e97bf287bc7fae2540e6c10211da44ee9517d8 /tools/h5dump.c
parent6ef640cb9934e6e6fd7b89e902ed974797b91b79 (diff)
downloadhdf5-4d16bcfecbf51574e3f8bb8cd0e50373892fa462.zip
hdf5-4d16bcfecbf51574e3f8bb8cd0e50373892fa462.tar.gz
hdf5-4d16bcfecbf51574e3f8bb8cd0e50373892fa462.tar.bz2
[svn-r2341] took the code out of h5ls to open files using different drivers and created a function in the tools
library for it(H5ToolsFopen-takes a filename and a char ptr if you want the name of the driver) added the function to h5tools.c, a header to h5tools.h and changed h5ls.c and h5dump.c to use the new functions
Diffstat (limited to 'tools/h5dump.c')
-rw-r--r--tools/h5dump.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/h5dump.c b/tools/h5dump.c
index b6cd255..07c4335 100644
--- a/tools/h5dump.c
+++ b/tools/h5dump.c
@@ -1307,8 +1307,8 @@ int
main(int argc, char *argv[])
{
hid_t fid, gid, dsetid, typeid;
- hid_t plist=H5P_DEFAULT;
- const char *fname = NULL;
+
+ char *fname = NULL;
int i, index, curr_arg, display_bb=0, display_all=1, newwidth= 0;
int nopts=0, *opts;
char *buf, name[128], name1[128];
@@ -1317,6 +1317,7 @@ main(int argc, char *argv[])
hid_t (*func)(void*);
find_objs_t *info = malloc(sizeof(find_objs_t));
+
dump_header_format = &standardformat;
/* Disable error reporting */
@@ -1430,11 +1431,12 @@ main(int argc, char *argv[])
if (argv[argc-1][0] == '\\') fname = &argv[argc-1][1];
else fname = argv[argc-1];
- if ((fid = H5Fopen (fname, H5F_ACC_RDONLY, plist)) < 0) {
+ fid = H5ToolsFopen(fname, NULL);
+ if (fid < 0) {
fprintf (stderr, "h5dump error: unable to open file %s \n", fname);
free(opts);
exit(1);
- }
+ }
/* allocate and initialize internal data structure */
init_table(&group_table);