summaryrefslogtreecommitdiffstats
path: root/src/H5Ddbg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-11 22:24:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-11 22:24:35 (GMT)
commit637fa77ea7e720eb7b5a932ceeb0d05beeefb978 (patch)
tree38eb85b7a0489fb9730d86bd042bf402c47bf897 /src/H5Ddbg.c
parente5413fa795c68dda46c11aee4a3615f52377b0df (diff)
downloadhdf5-637fa77ea7e720eb7b5a932ceeb0d05beeefb978.zip
hdf5-637fa77ea7e720eb7b5a932ceeb0d05beeefb978.tar.gz
hdf5-637fa77ea7e720eb7b5a932ceeb0d05beeefb978.tar.bz2
[svn-r14203] Description:
Break up H5D source file into H5D/H5Dint/H5Ddeprec Attempt fix for "szip noencoder" build failure. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'src/H5Ddbg.c')
-rw-r--r--src/H5Ddbg.c123
1 files changed, 123 insertions, 0 deletions
diff --git a/src/H5Ddbg.c b/src/H5Ddbg.c
new file mode 100644
index 0000000..4ca5b21
--- /dev/null
+++ b/src/H5Ddbg.c
@@ -0,0 +1,123 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/****************/
+/* Module Setup */
+/****************/
+
+#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5D_init_dbg_interface
+
+
+/***********/
+/* Headers */
+/***********/
+#include "H5private.h" /* Generic Functions */
+#include "H5Dpkg.h" /* Datasets */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+
+
+/****************/
+/* Local Macros */
+/****************/
+
+
+/******************/
+/* Local Typedefs */
+/******************/
+
+
+/********************/
+/* Local Prototypes */
+/********************/
+
+
+/*********************/
+/* Package Variables */
+/*********************/
+
+
+/*****************************/
+/* Library Private Variables */
+/*****************************/
+
+
+/*******************/
+/* Local Variables */
+/*******************/
+
+
+/*--------------------------------------------------------------------------
+NAME
+ H5D_init_dbg_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5D_init_dbg_interface()
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5D_init() currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5D_init_dbg_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_init_dbg_interface)
+
+ FUNC_LEAVE_NOAPI(H5D_init())
+} /* H5D_init_dbg_interface() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Ddebug
+ *
+ * Purpose: Prints various information about a dataset. This function is
+ * not to be documented in the API at this time.
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Wednesday, April 28, 1999
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Ddebug(hid_t dset_id)
+{
+ H5D_t *dset; /* Dataset to debug */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(H5Ddebug, FAIL)
+ H5TRACE1("e", "i", dset_id);
+
+ /* Check args */
+ if(NULL == (dset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset")
+
+ /* Print B-tree information */
+ if(H5D_CHUNKED == dset->shared->layout.type)
+ (void)H5D_istore_dump_btree(dset->oloc.file, H5AC_dxpl_id, stdout, dset->shared->layout.u.chunk.ndims, dset->shared->layout.u.chunk.addr);
+ else if(H5D_CONTIGUOUS == dset->shared->layout.type)
+ HDfprintf(stdout, " %-10s %a\n", "Address:", dset->shared->layout.u.contig.addr);
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Ddebug() */
+