diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-07-06 18:13:32 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-07-06 18:13:32 (GMT) |
commit | 82a12612e389fc618163a6a6d16a4908600a5a05 (patch) | |
tree | bfbc661d5f1906930f2d15d60be50e055c7cb54e /tools/misc | |
parent | 00232105046ace63639557776c0e331b21cbe784 (diff) | |
download | hdf5-82a12612e389fc618163a6a6d16a4908600a5a05.zip hdf5-82a12612e389fc618163a6a6d16a4908600a5a05.tar.gz hdf5-82a12612e389fc618163a6a6d16a4908600a5a05.tar.bz2 |
[svn-r11031] Purpose:
New feature
Description:
Initial checkin of B+ Tree code.
Platforms tested:
FreeBSD 4.11 (sleipnir)
h5committest
Misc. update:
Diffstat (limited to 'tools/misc')
-rw-r--r-- | tools/misc/h5debug.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c index cc2aa3a..75004fc 100644 --- a/tools/misc/h5debug.c +++ b/tools/misc/h5debug.c @@ -28,12 +28,15 @@ #define H5O_PACKAGE /*suppress error about including H5Opkg */ #define H5B2_PACKAGE /*suppress error about including H5B2pkg */ #define H5B2_TESTING /*suppress warning about H5B2 testing funcs*/ +#define H5BP_PACKAGE /*suppress error about including H5BPpkg */ +#define H5BP_TESTING /*suppress warning about H5BP testing funcs*/ #define H5BT_PACKAGE /*suppress error about including H5BTpkg */ #define H5SH_PACKAGE /*suppress error about including H5SHpkg */ #include "H5private.h" /* Generic Functions */ #include "H5Bprivate.h" #include "H5B2pkg.h" /* B-trees */ +#include "H5BPpkg.h" /* B+ trees */ #include "H5BTpkg.h" /* Block tracker */ #include "H5Dprivate.h" #include "H5Fpkg.h" @@ -189,7 +192,7 @@ main(int argc, char *argv[]) * subclass. The subclass identifier is two bytes after the * B-tree signature. */ - H5B2_subid_t subtype = (H5B_subid_t)sig[H5B2_SIZEOF_MAGIC+1]; + H5B2_subid_t subtype = (H5B2_subid_t)sig[H5B2_SIZEOF_MAGIC+1]; switch (subtype) { case H5B2_TEST_ID: @@ -211,7 +214,7 @@ main(int argc, char *argv[]) * subclass. The subclass identifier is two bytes after the * B-tree signature. */ - H5B2_subid_t subtype = (H5B_subid_t)sig[H5B2_SIZEOF_MAGIC+1]; + H5B2_subid_t subtype = (H5B2_subid_t)sig[H5B2_SIZEOF_MAGIC+1]; switch (subtype) { case H5B2_TEST_ID: @@ -233,7 +236,7 @@ main(int argc, char *argv[]) * subclass. The subclass identifier is two bytes after the * B-tree signature. */ - H5B2_subid_t subtype = (H5B_subid_t)sig[H5B2_SIZEOF_MAGIC+1]; + H5B2_subid_t subtype = (H5B2_subid_t)sig[H5B2_SIZEOF_MAGIC+1]; switch (subtype) { case H5B2_TEST_ID: @@ -261,6 +264,24 @@ main(int argc, char *argv[]) */ status = H5SH_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL); + } else if (!HDmemcmp(sig, H5BP_HDR_MAGIC, H5BP_SIZEOF_MAGIC)) { + /* + * Debug a B+ tree. B+ trees are debugged through the B+ tree + * subclass. The subclass identifier is two bytes after the + * B+ tree signature. + */ + H5BP_subid_t subtype = (H5BP_subid_t)sig[H5BP_SIZEOF_MAGIC+1]; + + switch (subtype) { + case H5BP_TEST_ID: + status = H5BP_hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, H5BP_TEST); + break; + + default: + fprintf(stderr, "Unknown B+ tree subtype %u\n", (unsigned)(subtype)); + HDexit(4); + } /* end switch */ + } else if (sig[0] == H5O_VERSION) { /* * This could be an object header. Since they don't have a signature |