diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-09-30 14:27:10 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-09-30 14:27:10 (GMT) |
commit | b2d661b508a7fc7a2592c13bc6bdc175551f075d (patch) | |
tree | 13baeb0d83a7c2a4c6299993c182b1227c2f6114 /src/H5Fdbg.c | |
parent | 29ab58b58dce556639ea3154e262895773a8a8df (diff) | |
download | hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2 |
Clang-format of source files
Diffstat (limited to 'src/H5Fdbg.c')
-rw-r--r-- | src/H5Fdbg.c | 89 |
1 files changed, 41 insertions, 48 deletions
diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c index ff08242..8a7f114 100644 --- a/src/H5Fdbg.c +++ b/src/H5Fdbg.c @@ -17,18 +17,16 @@ * Purpose: File object debugging functions. */ -#include "H5Fmodule.h" /* This source code file is part of the H5F module */ -#define H5G_FRIEND /*suppress error about including H5Gpkg */ +#include "H5Fmodule.h" /* This source code file is part of the H5F module */ +#define H5G_FRIEND /*suppress error about including H5Gpkg */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* File access */ +#include "H5Gpkg.h" /* Groups */ +#include "H5Iprivate.h" /* ID Functions */ +#include "H5Pprivate.h" /* Property lists */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* File access */ -#include "H5Gpkg.h" /* Groups */ -#include "H5Iprivate.h" /* ID Functions */ -#include "H5Pprivate.h" /* Property lists */ - - /*------------------------------------------------------------------------- * Function: H5F_debug * @@ -46,9 +44,9 @@ herr_t H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth) { - H5P_genplist_t *plist; /* File creation property list */ - hsize_t userblock_size; /* Userblock size */ - herr_t ret_value = SUCCEED; /* Return value */ + H5P_genplist_t *plist; /* File creation property list */ + hsize_t userblock_size; /* Userblock size */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -59,73 +57,69 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth) HDassert(fwidth >= 0); /* Get property list */ - if(NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id))) + if (NULL == (plist = (H5P_genplist_t *)H5I_object(f->shared->fcpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") /* Retrieve file creation properties */ - if(H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size) < 0) + if (H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get userblock size") /* debug */ HDfprintf(stream, "%*sFile Super Block...\n", indent, ""); + HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "File name (as opened):", H5F_OPEN_NAME(f)); HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "File name (as opened):", H5F_OPEN_NAME(f)); - HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "File name (after resolving symlinks):", H5F_ACTUAL_NAME(f)); - HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, - "File access flags", f->shared->flags); - HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "File open reference count:", f->shared->nrefs); + "File name (after resolving symlinks):", H5F_ACTUAL_NAME(f)); + HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, "File access flags", f->shared->flags); + HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "File open reference count:", f->shared->nrefs); HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (abs)\n", indent, "", fwidth, - "Address of super block:", f->shared->sblock->base_addr); + "Address of super block:", f->shared->sblock->base_addr); HDfprintf(stream, "%*s%-*s %" PRIuHSIZE " bytes\n", indent, "", fwidth, - "Size of userblock:", userblock_size); + "Size of userblock:", userblock_size); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Superblock version number:", f->shared->sblock->super_vers); + "Superblock version number:", f->shared->sblock->super_vers); /* Hard-wired versions */ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION); + "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION); + "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION); + "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION); HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, - "Size of file offsets (haddr_t type):", (unsigned) f->shared->sizeof_addr); + "Size of file offsets (haddr_t type):", (unsigned)f->shared->sizeof_addr); HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, - "Size of file lengths (hsize_t type):", (unsigned) f->shared->sizeof_size); + "Size of file lengths (hsize_t type):", (unsigned)f->shared->sizeof_size); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Symbol table leaf node 1/2 rank:", f->shared->sblock->sym_leaf_k); + "Symbol table leaf node 1/2 rank:", f->shared->sblock->sym_leaf_k); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Symbol table internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_SNODE_ID]); + "Symbol table internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_SNODE_ID]); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Indexed storage internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_CHUNK_ID]); + "Indexed storage internal node 1/2 rank:", f->shared->sblock->btree_k[H5B_CHUNK_ID]); HDfprintf(stream, "%*s%-*s 0x%02x\n", indent, "", fwidth, - "File status flags:", (unsigned)(f->shared->sblock->status_flags)); + "File status flags:", (unsigned)(f->shared->sblock->status_flags)); HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, - "Superblock extension address:", f->shared->sblock->ext_addr); + "Superblock extension address:", f->shared->sblock->ext_addr); HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, - "Shared object header message table address:", f->shared->sohm_addr); + "Shared object header message table address:", f->shared->sohm_addr); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Shared object header message version number:", (unsigned) f->shared->sohm_vers); + "Shared object header message version number:", (unsigned)f->shared->sohm_vers); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Number of shared object header message indexes:", (unsigned) f->shared->sohm_nindexes); + "Number of shared object header message indexes:", (unsigned)f->shared->sohm_nindexes); HDfprintf(stream, "%*s%-*s %" PRIuHADDR " (rel)\n", indent, "", fwidth, - "Address of driver information block:", f->shared->sblock->driver_addr); + "Address of driver information block:", f->shared->sblock->driver_addr); HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "Root group symbol table entry:", - f->shared->root_grp ? "" : "(none)"); - if(f->shared->root_grp) { - if(f->shared->sblock->root_ent) /* Use real root group symbol table entry */ + "Root group symbol table entry:", f->shared->root_grp ? "" : "(none)"); + if (f->shared->root_grp) { + if (f->shared->sblock->root_ent) /* Use real root group symbol table entry */ H5G__ent_debug(f->shared->sblock->root_ent, stream, indent + 3, MAX(0, fwidth - 3), NULL); else { - H5O_loc_t *root_oloc; /* Root object location */ - H5G_entry_t root_ent; /* Constructed root symbol table entry */ + H5O_loc_t * root_oloc; /* Root object location */ + H5G_entry_t root_ent; /* Constructed root symbol table entry */ /* Reset the root group entry */ H5G__ent_reset(&root_ent); @@ -133,15 +127,14 @@ H5F_debug(H5F_t *f, FILE *stream, int indent, int fwidth) /* Build up a simulated root group symbol table entry */ root_oloc = H5G_oloc(f->shared->root_grp); HDassert(root_oloc); - root_ent.type = H5G_NOTHING_CACHED; + root_ent.type = H5G_NOTHING_CACHED; root_ent.header = root_oloc->addr; /* Display root group symbol table entry info */ H5G__ent_debug(&root_ent, stream, indent + 3, MAX(0, fwidth - 3), NULL); } /* end else */ - } /* end if */ + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_debug() */ - |