summaryrefslogtreecommitdiffstats
path: root/src/H5B2dbg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-02-27 03:30:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-02-27 03:30:22 (GMT)
commit3e8948df52ce165edd3238a7e2ae3b047eac7836 (patch)
tree26cca419d73ec343bc6fefc3851949e60b07bebb /src/H5B2dbg.c
parentb2d288804d3f17e824383436d038976c159d0eda (diff)
downloadhdf5-3e8948df52ce165edd3238a7e2ae3b047eac7836.zip
hdf5-3e8948df52ce165edd3238a7e2ae3b047eac7836.tar.gz
hdf5-3e8948df52ce165edd3238a7e2ae3b047eac7836.tar.bz2
[svn-r11966] Purpose:
Code cleanup Description: Style fixes for consistency & other minor cleanups Platforms tested: FreeBSD 4.11 (sleipnir) Mac OSX (amazon) Linux 2.4
Diffstat (limited to 'src/H5B2dbg.c')
-rw-r--r--src/H5B2dbg.c95
1 files changed, 59 insertions, 36 deletions
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index 98abd60..687c731 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -23,14 +23,49 @@
*-------------------------------------------------------------------------
*/
+/****************/
+/* Module Setup */
+/****************/
+
#define H5B2_PACKAGE /*suppress error about including H5B2pkg */
-/* Private headers */
+/***********/
+/* Headers */
+/***********/
#include "H5private.h" /* Generic Functions */
#include "H5B2pkg.h" /* B-trees */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
/*-------------------------------------------------------------------------
* Function: H5B2_hdr_debug
@@ -43,50 +78,46 @@
* koziol@ncsa.uiuc.edu
* Feb 2 2005
*
- * Modifications:
- *
- * John Mainzer, 6/16/05
- * Modified the function to use the new dirtied parameter of
- * of H5AC_unprotect() instead of modifying the is_dirty
- * field of the cache info.
- *
*-------------------------------------------------------------------------
*/
herr_t
H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent, int fwidth,
const H5B2_class_t *type)
{
- H5B2_t *bt2 = NULL;
- H5B2_shared_t *shared; /* Shared B-tree information */
- herr_t ret_value=SUCCEED; /* Return value */
+ H5B2_t *bt2 = NULL; /* B-tree header info */
+ H5B2_shared_t *shared; /* Shared B-tree information */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5B2_hdr_debug, FAIL)
/*
* Check arguments.
*/
- assert(f);
- assert(H5F_addr_defined(addr));
- assert(stream);
- assert(indent >= 0);
- assert(fwidth >= 0);
+ HDassert(f);
+ HDassert(H5F_addr_defined(addr));
+ HDassert(stream);
+ HDassert(indent >= 0);
+ HDassert(fwidth >= 0);
/*
- * Load the b-tree header.
+ * Load the B-tree header.
*/
- if (NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
+ if(NULL == (bt2 = H5AC_protect(f, dxpl_id, H5AC_BT2_HDR, addr, type, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree header")
/* Get the pointer to the shared B-tree info */
- shared=H5RC_GET_OBJ(bt2->shared);
- assert(shared);
+ shared = H5RC_GET_OBJ(bt2->shared);
+ HDassert(shared);
+
+ /* Print opening message */
+ HDfprintf(stream, "%*sv2 B-tree Header...\n", indent, "");
/*
* Print the values.
*/
HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Tree type ID:",
- ((shared->type->id)==H5B2_TEST_ID ? "H5B2_TEST_ID" :
+ ((shared->type->id) == H5B2_TEST_ID ? "H5B2_TEST_ID" :
"Unknown!"));
HDfprintf(stream, "%*s%-*s %Zu\n", indent, "", fwidth,
"Size of node:",
@@ -135,7 +166,7 @@ H5B2_hdr_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
shared->merge_leaf_nrec);
done:
- if (bt2 && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, bt2, H5AC__NO_FLAGS_SET) < 0)
+ if(bt2 && H5AC_unprotect(f, dxpl_id, H5AC_BT2_HDR, addr, bt2, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree header")
FUNC_LEAVE_NOAPI(ret_value)
@@ -153,13 +184,6 @@ done:
* koziol@ncsa.uiuc.edu
* Feb 4 2005
*
- * Modifications:
- *
- * John Mainzer, 6/16/05
- * Modified the function to use the new dirtied parameter of
- * of H5AC_unprotect() instead of modifying the is_dirty
- * field of the cache info.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -205,6 +229,9 @@ H5B2_int_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree header")
bt2 = NULL;
+ /* Print opening message */
+ HDfprintf(stream, "%*sv2 B-tree Internal Node...\n", indent, "");
+
/*
* Print the values.
*/
@@ -271,13 +298,6 @@ done:
* koziol@ncsa.uiuc.edu
* Feb 7 2005
*
- * Modifications:
- *
- * John Mainzer, 6/16/05
- * Modified the function to use the new dirtied parameter of
- * of H5AC_unprotect() instead of modifying the is_dirty
- * field of the cache info.
- *
*-------------------------------------------------------------------------
*/
herr_t
@@ -323,6 +343,9 @@ H5B2_leaf_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int indent,
HDONE_ERROR(H5E_BTREE, H5E_PROTECT, FAIL, "unable to release B-tree header")
bt2 = NULL;
+ /* Print opening message */
+ HDfprintf(stream, "%*sv2 B-tree Leaf Node...\n", indent, "");
+
/*
* Print the values.
*/