diff options
author | Patrick Lu <ptlu@hawkwind.ncsa.uiuc.edu> | 2000-05-03 15:48:20 (GMT) |
---|---|---|
committer | Patrick Lu <ptlu@hawkwind.ncsa.uiuc.edu> | 2000-05-03 15:48:20 (GMT) |
commit | ae5c998516c2235ef1334c76718109506dcc480c (patch) | |
tree | 19b8caf1371f1a3e53e0809caf9b24cb3cd2d731 /tools/h5debug.c | |
parent | 043b7c4ec58fc06cc42cb62aec7741deb807c996 (diff) | |
download | hdf5-ae5c998516c2235ef1334c76718109506dcc480c.zip hdf5-ae5c998516c2235ef1334c76718109506dcc480c.tar.gz hdf5-ae5c998516c2235ef1334c76718109506dcc480c.tar.bz2 |
[svn-r2211] took the development branch code and moved it into the release. had to add some
conditional compile statements in the code to compile for the release.
defined a VERSION12 and VERSION13 macro. all changes were surrounded by these statements
Diffstat (limited to 'tools/h5debug.c')
-rw-r--r-- | tools/h5debug.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/tools/h5debug.c b/tools/h5debug.c index c2364a1..13826d5 100644 --- a/tools/h5debug.c +++ b/tools/h5debug.c @@ -23,10 +23,11 @@ #include <H5HGprivate.h> #include <H5HLprivate.h> #include <H5Oprivate.h> - +#include <h5tools.h> /* File drivers */ +#ifdef VERSION13 #include <H5FDfamily.h> - +#endif #define INDENT 3 #define VCOL 50 @@ -54,17 +55,30 @@ main(int argc, char *argv[]) { hid_t fid, plist=H5P_DEFAULT; H5F_t *f; +#if defined VERSION13 haddr_t addr=0, extra=0; +#elif defined VERSION12 + haddr_t *addr,*extra; +#endif uint8_t sig[16]; intn i, ndims; herr_t status = SUCCEED; +#if defined VERSION12 + addr = malloc(sizeof(haddr_t)); + extra = malloc(sizeof(haddr_t)); + addr->offset = 0; + extra->offset = 0; +#endif + /* * Open the file and get the file descriptor. */ if (strchr (argv[1], '%')) { plist = H5Pcreate (H5P_FILE_ACCESS); +#if defined VERSION13 H5Pset_fapl_family (plist, 0, H5P_DEFAULT); +#endif } if ((fid = H5Fopen(argv[1], H5F_ACC_RDONLY, plist)) < 0) { fprintf(stderr, "cannot open file\n"); @@ -80,15 +94,24 @@ main(int argc, char *argv[]) */ if (argc > 2) { printf("New address: %s\n", argv[2]); +#if defined VERSION13 addr = HDstrtoll(argv[2], NULL, 0); +#elif defined VERSION12 + addr->offset = HDstrtoll(argv[2], NULL, 0); +#endif } if (argc > 3) { +#if defined VERSION13 extra = HDstrtoll(argv[3], NULL, 0); +#elif defined VERSION12 + extra->offset = HDstrtoll(argv[3], NULL, 0); +#endif } /* * Read the signature at the specified file position. */ HDfprintf(stdout, "Reading signature at address %a (rel)\n", addr); + if (H5F_block_read(f, addr, (hsize_t)sizeof(sig), H5P_DEFAULT, sig)<0) { fprintf(stderr, "cannot read signature\n"); HDexit(3); |