summaryrefslogtreecommitdiffstats
path: root/src/H5B.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-04-17 21:29:43 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-04-17 21:29:43 (GMT)
commit011457075e41d587c47f89250514b3393a78d329 (patch)
treed9b12f2ffc87b12575607102d207a60cd52214b9 /src/H5B.c
parentb59ab36893949af14c403ab46cbdb397f0a24f5b (diff)
downloadhdf5-011457075e41d587c47f89250514b3393a78d329.zip
hdf5-011457075e41d587c47f89250514b3393a78d329.tar.gz
hdf5-011457075e41d587c47f89250514b3393a78d329.tar.bz2
[svn-r353] Changes since 19980414
---------------------- ./html/Compression.html [NEW] ./html/Datasets.html ./html/H5.format.html ./html/H5.user.html Documented compression. A couple of the H5P functions aren't quite implemented yet but they're coming soon... ./src/H5Dprivate.h ./src/H5E.c ./src/H5Epublic.h ./src/H5Farray.c ./src/H5Fistore.c ./src/H5Fprivate.h ./src/H5MF.c ./src/H5MFprivate.h ./src/H5O.c ./src/H5Ocomp.c [NEW] ./src/H5Oprivate.h ./src/H5P.c ./src/H5Ppublic.h ./src/H5Sprivate.h ./src/H5Ssimp.c ./src/H5Z.c [NEW] ./src/H5Zprivate.h [NEW] ./src/H5Zpublic.h [NEW] ./src/Makefile.in ./src/hdf5.h ./test/dsets.c ./test/istore.c Compression is now mostly working. Don't try to open a compressed dataset though because the compression message won't be read. ./html/Datatypes.html ./html/H5.api.html ./src/H5.c ./src/H5private.h ./src/H5D.c ./src/H5T.c ./src/H5Tconv.c ./src/H5Tpkg.h ./src/H5Tprivate.h ./src/H5Tpublic.h Added timing support. When compiled with H5T_DEBUG defined the library will print conversion bandwidths when the library closes. The H5Tregister functions take a string as the first argument so the statistics output is meaningful. ./MANIFEST Added new files. ./configure.in ./src/H5config.h.in Check for getrusage(). Check for compress2() in libz.a and the zlib.h header file. Added `z' to the debug list. ./src/H5B.c ./src/H5Bprivate.h ./src/H5Gnode.c ./src/debug.c Cleaned up some indentation and added support to print istore B-trees. From the debugger, give the B-tree address and the dimensionality from the layout message of the object header. ./src/h5ls.c The oid is printed as w:x:y:z where w and x are the file ID and y and z are the OID within the file. You can give z or y*2^32+z as an argument to the debugger to print the object header for the object. ./src/H5AC.c Cleaned up statistics and made them match those reported by H5T and H5Z. ./src/H5MM.c ./src/H5MMprivate.h ./src/H5Fistore.c Finally got rid of a couple of long-standing const cast warnings.
Diffstat (limited to 'src/H5B.c')
-rw-r--r--src/H5B.c60
1 files changed, 31 insertions, 29 deletions
diff --git a/src/H5B.c b/src/H5B.c
index 62bb783..69b64cb1 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -1022,7 +1022,7 @@ H5B_insert_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
uint8 *lt_key, hbool_t *lt_key_changed,
uint8 *md_key, void *udata,
uint8 *rt_key, hbool_t *rt_key_changed,
- haddr_t *new_node /*out */ )
+ haddr_t *new_node/*out*/)
{
H5B_t *bt = NULL, *twin = NULL, *tmp_bt = NULL;
intn lt = 0, idx = -1, rt, cmp = -1;
@@ -1097,10 +1097,9 @@ H5B_insert_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
idx = 0;
if (type->follow_min) {
- if ((my_ins = (type->insert) (f, bt->child + idx,
- bt->key[idx].nkey, lt_key_changed,
- md_key, udata,
- bt->key[idx + 1].nkey, rt_key_changed,
+ if ((my_ins = (type->insert) (f, bt->child+idx, bt->key[idx].nkey,
+ lt_key_changed, md_key, udata,
+ bt->key[idx+1].nkey, rt_key_changed,
&child_addr/*out*/)) < 0) {
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR,
"unable to insert first leaf node");
@@ -1119,11 +1118,11 @@ H5B_insert_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, H5B_INS_ERROR,
"unable to decode key");
}
- if ((my_ins = H5B_insert_helper(f, bt->child + idx, type,
+ if ((my_ins = H5B_insert_helper(f, bt->child+idx, type,
bt->key[idx].nkey, lt_key_changed,
- md_key, udata,
- bt->key[idx + 1].nkey, rt_key_changed,
- &child_addr /*out */ )) < 0) {
+ md_key, udata, bt->key[idx+1].nkey,
+ rt_key_changed,
+ &child_addr/*out*/))<0) {
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR,
"can't insert minimum subtree");
}
@@ -1138,11 +1137,10 @@ H5B_insert_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, H5B_INS_ERROR,
"unable to decode key");
}
- if ((my_ins = (type->insert) (f, bt->child + idx,
- bt->key[idx].nkey, lt_key_changed,
- md_key, udata,
- bt->key[idx + 1].nkey, rt_key_changed,
- &child_addr /*out */ )) < 0) {
+ if ((my_ins = (type->insert) (f, bt->child+idx, bt->key[idx].nkey,
+ lt_key_changed, md_key, udata,
+ bt->key[idx+1].nkey, rt_key_changed,
+ &child_addr/*out*/)) < 0) {
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR,
"can't insert minimum leaf node");
}
@@ -1176,11 +1174,11 @@ H5B_insert_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, H5B_INS_ERROR,
"unable to decode key");
}
- if ((my_ins = H5B_insert_helper(f, bt->child + idx, type,
+ if ((my_ins = H5B_insert_helper(f, bt->child+idx, type,
bt->key[idx].nkey, lt_key_changed,
- md_key, udata,
- bt->key[idx + 1].nkey, rt_key_changed,
- &child_addr /*out */ )) < 0) {
+ md_key, udata, bt->key[idx+1].nkey,
+ rt_key_changed,
+ &child_addr/*out*/)) < 0) {
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR,
"can't insert maximum subtree");
}
@@ -1195,11 +1193,10 @@ H5B_insert_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
HGOTO_ERROR(H5E_BTREE, H5E_CANTDECODE, H5B_INS_ERROR,
"unable to decode key");
}
- if ((my_ins = (type->insert) (f, bt->child + idx,
- bt->key[idx].nkey, lt_key_changed,
- md_key, udata,
- bt->key[idx + 1].nkey, rt_key_changed,
- &child_addr /*out */ )) < 0) {
+ if ((my_ins = (type->insert) (f, bt->child+idx, bt->key[idx].nkey,
+ lt_key_changed, md_key, udata,
+ bt->key[idx+1].nkey, rt_key_changed,
+ &child_addr/*out*/)) < 0) {
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR,
"can't insert maximum leaf node");
}
@@ -1248,11 +1245,10 @@ H5B_insert_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
* Follow a branch out of this node to a leaf node of some other type.
*/
assert(idx >= 0 && idx < bt->nchildren);
- if ((my_ins = (type->insert) (f, bt->child + idx,
- bt->key[idx].nkey, lt_key_changed,
- md_key, udata,
- bt->key[idx + 1].nkey, rt_key_changed,
- &child_addr /*out */ )) < 0) {
+ if ((my_ins = (type->insert) (f, bt->child+idx, bt->key[idx].nkey,
+ lt_key_changed, md_key, udata,
+ bt->key[idx+1].nkey, rt_key_changed,
+ &child_addr/*out*/)) < 0) {
HGOTO_ERROR(H5E_BTREE, H5E_CANTINSERT, H5B_INS_ERROR,
"can't insert leaf node");
}
@@ -1531,7 +1527,7 @@ H5B_nodesize(H5F_t *f, const H5B_class_t *type,
*-------------------------------------------------------------------------
*/
herr_t
-H5B_debug(H5F_t *f, const haddr_t *addr, FILE * stream, intn indent,
+H5B_debug(H5F_t *f, const haddr_t *addr, FILE *stream, intn indent,
intn fwidth, const H5B_class_t *type, void *udata)
{
H5B_t *bt = NULL;
@@ -1599,6 +1595,12 @@ H5B_debug(H5F_t *f, const haddr_t *addr, FILE * stream, intn indent,
"Address:");
H5F_addr_print(stream, bt->child + i);
fprintf(stream, "\n");
+
+ H5B_decode_key(f, bt, i);
+ if (type->debug_key) {
+ (type->debug_key)(stream, indent+3, MAX (0, fwidth-3),
+ bt->key[i].nkey, udata);
+ }
}
FUNC_LEAVE(SUCCEED);