summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-08 21:03:33 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-08 21:03:33 (GMT)
commit237258f771617ff9162a30fd8c97d417dd59a095 (patch)
tree0aa1220ce3cb9eb900eb658a54a959f5449fbda3
parentfb028f896de4c2f2e5ec9db2c1e6d31933faf153 (diff)
downloadhdf5-237258f771617ff9162a30fd8c97d417dd59a095.zip
hdf5-237258f771617ff9162a30fd8c97d417dd59a095.tar.gz
hdf5-237258f771617ff9162a30fd8c97d417dd59a095.tar.bz2
[svn-r11220] Purpose:
Code cleanup Description: Bring some of the cleanups from the external link coding (which isn't checked in yet) back into CVS as an intermediate checkin. Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
-rw-r--r--src/H5F.c85
-rw-r--r--src/H5Fprivate.h3
-rw-r--r--src/H5G.c125
-rw-r--r--src/H5Gent.c28
4 files changed, 100 insertions, 141 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 5d5094d..e320fea 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -62,21 +62,18 @@ typedef struct H5F_olist_t {
} H5F_olist_t;
/* PRIVATE PROTOTYPES */
-static H5F_t *H5F_open(const char *name, unsigned flags, hid_t fcpl_id,
- hid_t fapl_id, hid_t dxpl_id);
-
#ifdef NOT_YET
-static herr_t H5F_flush_all(hbool_t invalidate);
static int H5F_flush_all_cb(void *f, hid_t fid, void *_invalidate);
#endif /* NOT_YET */
-
-static herr_t H5F_close(H5F_t *f);
-static H5F_t *H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id);
-static herr_t H5F_dest(H5F_t *f, hid_t dxpl_id);
-static herr_t H5F_flush(H5F_t *f, hid_t dxpl_id, H5F_scope_t scope, unsigned flags);
static unsigned H5F_get_objects(const H5F_t *f, unsigned types, int max_objs, hid_t *obj_id_list);
static int H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key);
static herr_t H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void** file_handle);
+static H5F_t *H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id);
+static herr_t H5F_dest(H5F_t *f, hid_t dxpl_id);
+static H5F_t *H5F_open(const char *name, unsigned flags, hid_t fcpl_id,
+ hid_t fapl_id, hid_t dxpl_id);
+static herr_t H5F_flush(H5F_t *f, hid_t dxpl_id, H5F_scope_t scope, unsigned flags);
+static herr_t H5F_close(H5F_t *f);
/* Declare a free list to manage the H5F_t struct */
H5FL_DEFINE_STATIC(H5F_t);
@@ -610,7 +607,7 @@ H5F_flush_all_cb(void *_f, hid_t UNUSED fid, void *_invalidate)
H5F_t *f=(H5F_t *)_f;
unsigned invalidate = (*((hbool_t*)_invalidate);
- FUNC_ENTER_NOAPI_NOINIT(H5F_flush_all_cb)
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_flush_all_cb)
H5F_flush(f, H5F_SCOPE_LOCAL, (invalidate ? H5F_FLUSH_INVALIDATE : H5F_FLUSH_NONE));
@@ -1379,6 +1376,7 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id)
if (NULL==(f=H5FL_CALLOC(H5F_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ f->file_id = -1;
if (shared) {
f->shared = shared;
@@ -1526,10 +1524,9 @@ H5F_dest(H5F_t *f, hid_t dxpl_id)
if (1==f->shared->nrefs) {
/* Remove shared file struct from list of open files */
- if(H5F_sfile_remove(f->shared) < 0) {
- HERROR(H5E_FILE, H5E_CANTRELEASE, "problems closing file");
- ret_value = FAIL; /*but keep going*/
- } /* end if */
+ if(H5F_sfile_remove(f->shared) < 0)
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
/*
* Do not close the root group since we didn't count it, but free
@@ -1537,47 +1534,39 @@ H5F_dest(H5F_t *f, hid_t dxpl_id)
*/
if (f->shared->root_grp) {
/* Free the ID to name buffer */
- if(H5G_free_grp_name(f->shared->root_grp)<0) {
- HERROR(H5E_FILE, H5E_CANTRELEASE, "problems closing file");
- ret_value = FAIL; /*but keep going*/
- } /* end if */
+ if(H5G_free_grp_name(f->shared->root_grp)<0)
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
/* Free the memory for the root group */
- if(H5G_free(f->shared->root_grp)<0) {
- HERROR(H5E_FILE, H5E_CANTRELEASE, "problems closing file");
- ret_value = FAIL; /*but keep going*/
- } /* end if */
+ if(H5G_free(f->shared->root_grp)<0)
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
f->shared->root_grp=NULL;
}
- if (H5AC_dest(f, dxpl_id)) {
- HERROR(H5E_FILE, H5E_CANTRELEASE, "problems closing file");
- ret_value = FAIL; /*but keep going*/
- }
- if (H5FO_dest(f)<0) {
- HERROR(H5E_FILE, H5E_CANTRELEASE, "problems closing file");
- ret_value = FAIL; /*but keep going*/
- } /* end if */
+ if (H5AC_dest(f, dxpl_id))
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
+ if (H5FO_dest(f)<0)
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
f->shared->cwfs = H5MM_xfree (f->shared->cwfs);
- if (H5G_node_close(f)<0) {
- HERROR(H5E_FILE, H5E_CANTRELEASE, "problems closing file");
- ret_value = FAIL; /*but keep going*/
- } /* end if */
+ if (H5G_node_close(f)<0)
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "problems closing file")
/* Destroy file creation properties */
- if(H5I_GENPROP_LST != H5I_get_type(f->shared->fcpl_id)) {
- HERROR(H5E_PLIST, H5E_BADTYPE, "not a property list");
- ret_value = FAIL; /*but keep going*/
- } /* end if */
- if((ret_value=H5I_dec_ref(f->shared->fcpl_id)) < 0) {
- HERROR(H5E_PLIST, H5E_CANTFREE, "can't close property list");
- ret_value = FAIL; /*but keep going*/
- } /* end if */
+ if(H5I_GENPROP_LST != H5I_get_type(f->shared->fcpl_id))
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property list")
+ if((ret_value=H5I_dec_ref(f->shared->fcpl_id)) < 0)
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't close property list")
/* Close low-level file */
- if (H5FD_close(f->shared->lf)<0) {
- HERROR(H5E_FILE, H5E_CANTINIT, "problems closing file");
- ret_value = FAIL; /*but keep going*/
- }
+ if (H5FD_close(f->shared->lf)<0)
+ /* Push error, but keep going*/
+ HDONE_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "problems closing file")
/* Destroy shared file struct */
f->shared = H5FL_FREE(H5F_file_t,f->shared);
@@ -1694,7 +1683,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id, hid_t d
H5F_close_degree_t fc_degree; /*file close degree */
H5F_t *ret_value; /*actual return value */
- FUNC_ENTER_NOAPI(H5F_open, NULL)
+ FUNC_ENTER_NOAPI_NOINIT(H5F_open)
/*
* If the driver has a `cmp' method then the driver is capable of
@@ -2337,7 +2326,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-herr_t
+static herr_t
H5F_close(H5F_t *f)
{
herr_t ret_value = SUCCEED; /* Return value */
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index bc6b8d6..16edaa0 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -414,6 +414,9 @@ struct H5RC_t;
/* Private functions, not part of the publicly documented API */
H5_DLL herr_t H5F_init(void);
+#ifdef NOT_YET
+H5_DLL herr_t H5F_flush_all(hbool_t invalidate);
+#endif /* NOT_YET */
H5_DLL hid_t H5F_get_driver_id(const H5F_t *f);
H5_DLL unsigned H5F_get_intent(const H5F_t *f);
H5_DLL herr_t H5F_get_fileno(const H5F_t *f, unsigned long *filenum);
diff --git a/src/H5G.c b/src/H5G.c
index bc84caa..ce9db3c 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -164,34 +164,40 @@ H5FL_DEFINE(H5G_shared_t);
H5FL_BLK_EXTERN(str_buf);
/* Private prototypes */
+static herr_t H5G_register_type(int type, htri_t(*isa)(H5G_entry_t*, hid_t),
+ const char *desc);
+static const char * H5G_component(const char *name, size_t *size_p);
+static const char * H5G_basename(const char *name, size_t *size_p);
+static char * H5G_normalize(const char *name);
+static herr_t H5G_namei(const H5G_entry_t *loc_ent, const char *name,
+ const char **rest/*out*/, H5G_entry_t *grp_ent/*out*/, H5G_entry_t *obj_ent/*out*/,
+ unsigned target, int *nlinks/*out*/, H5G_namei_act_t action,
+ H5G_entry_t *ent, hid_t dxpl_id);
+static herr_t H5G_traverse_slink(H5G_entry_t *grp_ent/*in,out*/,
+ H5G_entry_t *obj_ent/*in,out*/, int *nlinks/*in,out*/, hid_t dxpl_id);
static H5G_t *H5G_create(H5G_entry_t *loc, const char *name, size_t size_hint, hid_t dxpl_id);
-#ifdef NOT_YET
-static H5G_t *H5G_reopen(H5G_t *grp);
-#endif /* NOT_YET */
static htri_t H5G_isa(H5G_entry_t *ent, hid_t dxpl_id);
static htri_t H5G_link_isa(H5G_entry_t *ent, hid_t dxpl_id);
+static H5G_t * H5G_open_oid(H5G_entry_t *ent, hid_t dxpl_id);
+static H5G_t *H5G_rootof(H5F_t *f);
static herr_t H5G_link(H5G_entry_t *cur_loc, const char *cur_name,
H5G_entry_t *new_loc, const char *new_name,
H5G_link_t type, unsigned namei_flags, hid_t dxpl_id);
-static herr_t H5G_linkval(H5G_entry_t *loc, const char *name, size_t size,
- char *buf/*out*/, hid_t dxpl_id);
-static herr_t H5G_move(H5G_entry_t *src_loc, const char *src_name,
- H5G_entry_t *dst_loc, const char *dst_name, hid_t dxpl_it);
-static H5G_t * H5G_open_oid(H5G_entry_t *ent, hid_t dxpl_id);
-static herr_t H5G_unlink(H5G_entry_t *loc, const char *name, hid_t dxpl_id);
static herr_t H5G_get_num_objs(H5G_entry_t *grp, hsize_t *num_objs, hid_t dxpl_id);
static ssize_t H5G_get_objname_by_idx(H5G_entry_t *loc, hsize_t idx, char* name, size_t size, hid_t dxpl_id);
static int H5G_get_objtype_by_idx(H5G_entry_t *loc, hsize_t idx, hid_t dxpl_id);
-static int H5G_replace_ent(void *obj_ptr, hid_t obj_id, void *key);
-static herr_t H5G_traverse_slink(H5G_entry_t *grp_ent/*in,out*/,
- H5G_entry_t *obj_ent/*in,out*/, int *nlinks/*in,out*/, hid_t dxpl_id);
+static herr_t H5G_linkval(H5G_entry_t *loc, const char *name, size_t size,
+ char *buf/*out*/, hid_t dxpl_id);
static herr_t H5G_set_comment(H5G_entry_t *loc, const char *name,
const char *buf, hid_t dxpl_id);
static int H5G_get_comment(H5G_entry_t *loc, const char *name,
size_t bufsize, char *buf, hid_t dxpl_id);
-static herr_t H5G_register_type(int type, htri_t(*isa)(H5G_entry_t*, hid_t),
- const char *desc);
-static H5G_t *H5G_rootof(H5F_t *f);
+static herr_t H5G_unlink(H5G_entry_t *loc, const char *name, hid_t dxpl_id);
+static herr_t H5G_move(H5G_entry_t *src_loc, const char *src_name,
+ H5G_entry_t *dst_loc, const char *dst_name, hid_t dxpl_it);
+static htri_t H5G_common_path(const H5RS_str_t *fullpath_r,
+ const H5RS_str_t *prefix_r);
+static int H5G_replace_ent(void *obj_ptr, hid_t obj_id, void *key);
/*-------------------------------------------------------------------------
@@ -1069,7 +1075,7 @@ H5G_register_type(int type, htri_t(*isa)(H5G_entry_t*, hid_t), const char *_desc
size_t i;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_register_type, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_register_type);
assert(type>=0);
assert(isa);
@@ -1631,7 +1637,7 @@ H5G_traverse_slink (H5G_entry_t *grp_ent/*in,out*/,
tmp_user_path_r=NULL;
obj_ent->canon_path_r = tmp_canon_path_r;
tmp_canon_path_r=NULL;
-
+
done:
/* Error cleanup */
if(tmp_user_path_r)
@@ -1773,7 +1779,7 @@ H5G_create(H5G_entry_t *loc, const char *name, size_t size_hint, hid_t dxpl_id)
unsigned stab_init=0; /* Flag to indicate that the symbol table was created successfully */
H5G_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_create, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_create);
/* check args */
assert(loc);
@@ -2005,7 +2011,7 @@ H5G_open_oid(H5G_entry_t *ent, hid_t dxpl_id)
H5G_t *ret_value = NULL;
H5O_stab_t mesg;
- FUNC_ENTER_NOAPI(H5G_open_oid, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_open_oid);
/* Check args */
assert(ent);
@@ -2040,44 +2046,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
}
-#ifdef NOT_YET
-
-/*-------------------------------------------------------------------------
- * Function: H5G_reopen
- *
- * Purpose: Reopens a group by incrementing the open count.
- *
- * Return: Success: The GRP argument.
- *
- * Failure: NULL
- *
- * Programmer: Robb Matzke
- * Monday, January 5, 1998
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-H5G_t *
-H5G_reopen(H5G_t *grp)
-{
- H5G_t *ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5G_reopen, NULL);
-
- assert(grp);
- assert(grp->nref > 0);
-
- grp->nref++;
-
- /* Set return value */
- ret_value=grp;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
-}
-#endif /* NOT_YET */
-
/*-------------------------------------------------------------------------
* Function: H5G_close
@@ -2196,17 +2164,12 @@ done:
static H5G_t *
H5G_rootof(H5F_t *f)
{
- H5G_t *ret_value; /* Return value */
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_rootof);
- FUNC_ENTER_NOAPI(H5G_rootof, NULL);
while (f->mtab.parent)
f = f->mtab.parent;
- /* Set return value */
- ret_value=f->shared->root_grp;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(f->shared->root_grp);
}
@@ -2484,7 +2447,7 @@ H5G_link (H5G_entry_t *cur_loc, const char *cur_name, H5G_entry_t *new_loc,
size_t offset; /*offset to sym-link value */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_link, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_link);
/* Check args */
assert (cur_loc);
@@ -2646,9 +2609,7 @@ herr_t
H5G_get_objinfo (H5G_entry_t *loc, const char *name, hbool_t follow_link,
H5G_stat_t *statbuf/*out*/, hid_t dxpl_id)
{
- H5O_stab_t stab_mesg;
H5G_entry_t grp_ent, obj_ent;
- const char *s = NULL;
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5G_get_objinfo, FAIL);
@@ -2669,7 +2630,9 @@ H5G_get_objinfo (H5G_entry_t *loc, const char *name, hbool_t follow_link,
*/
if (statbuf) {
if (H5G_CACHED_SLINK==obj_ent.type) {
- const H5HL_t *heap;
+ H5O_stab_t stab_mesg; /* Symbol table message info */
+ const H5HL_t *heap; /* Pointer to local heap for group */
+ const char *s; /* Pointer to link value */
/* Named object is a symbolic link */
if (NULL == H5O_read(&grp_ent, H5O_STAB_ID, 0, &stab_mesg, dxpl_id))
@@ -2684,10 +2647,9 @@ H5G_get_objinfo (H5G_entry_t *loc, const char *name, hbool_t follow_link,
if (H5HL_unprotect(grp_ent.file, dxpl_id, heap, stab_mesg.heap_addr) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read unprotect link value")
- statbuf->objno[0] = statbuf->objno[1] = 0;
- statbuf->nlink = 0;
+
+ /* Set object type */
statbuf->type = H5G_LINK;
- statbuf->mtime = 0;
} else {
/* Some other type of object */
statbuf->objno[0] = (unsigned long)(obj_ent.header);
@@ -2705,6 +2667,7 @@ H5G_get_objinfo (H5G_entry_t *loc, const char *name, hbool_t follow_link,
statbuf->mtime = 0;
}
}
+ /* Get object type */
statbuf->type =
#ifndef H5_WANT_H5_V1_4_COMPAT
(H5G_obj_t)
@@ -2755,7 +2718,7 @@ H5G_get_num_objs(H5G_entry_t *loc, hsize_t *num_objs, hid_t dxpl_id)
H5O_stab_t stab_mesg; /*info about B-tree */
herr_t ret_value;
- FUNC_ENTER_NOAPI(H5G_get_num_objs, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_get_num_objs);
/* Sanity check */
assert(loc);
@@ -2802,7 +2765,7 @@ H5G_get_objname_by_idx(H5G_entry_t *loc, hsize_t idx, char* name, size_t size, h
H5G_bt_ud3_t udata; /* Iteration information */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_get_objname_by_idx, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_get_objname_by_idx);
/* Sanity check */
assert(loc);
@@ -2868,7 +2831,7 @@ H5G_get_objtype_by_idx(H5G_entry_t *loc, hsize_t idx, hid_t dxpl_id)
H5G_bt_ud3_t udata; /* User data for B-tree callback */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5G_get_objtype_by_idx, H5G_UNKNOWN);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_get_objtype_by_idx);
/* Sanity check */
assert(loc);
@@ -2931,7 +2894,7 @@ H5G_linkval (H5G_entry_t *loc, const char *name, size_t size, char *buf/*out*/,
const H5HL_t *heap;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_linkval, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_linkval);
/*
* Get the symbol table entry for the link head and the symbol table
@@ -2995,7 +2958,7 @@ H5G_set_comment(H5G_entry_t *loc, const char *name, const char *buf, hid_t dxpl_
H5O_name_t comment;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_set_comment, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_set_comment);
/* Get the symbol table entry for the object */
if (H5G_namei(loc, name, NULL, NULL, &obj_ent/*out*/, H5G_TARGET_NORMAL,
@@ -3050,7 +3013,7 @@ H5G_get_comment(H5G_entry_t *loc, const char *name, size_t bufsize, char *buf, h
H5G_entry_t obj_ent;
int ret_value;
- FUNC_ENTER_NOAPI(H5G_get_comment, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_get_comment);
/* Get the symbol table entry for the object */
if (H5G_namei(loc, name, NULL, NULL, &obj_ent/*out*/, H5G_TARGET_NORMAL,
@@ -3106,7 +3069,9 @@ H5G_unlink(H5G_entry_t *loc, const char *name, hid_t dxpl_id)
H5RS_str_t *name_r; /* Ref-counted version of name */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_unlink, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_unlink);
+
+ /* Sanity check */
assert(loc);
assert(name && *name);
@@ -3187,7 +3152,9 @@ H5G_move(H5G_entry_t *src_loc, const char *src_name, H5G_entry_t *dst_loc,
H5RS_str_t *dst_name_r; /* Ref-counted version of dest name */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_move, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_move);
+
+ /* Sanity check */
assert(src_loc);
assert(dst_loc);
assert(src_name && *src_name);
diff --git a/src/H5Gent.c b/src/H5Gent.c
index cd03d49..5800aed 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -203,21 +203,21 @@ H5G_ent_decode(H5F_t *f, const uint8_t **pp, H5G_entry_t *ent)
/* decode scratch-pad */
switch (ent->type) {
- case H5G_NOTHING_CACHED:
- break;
+ case H5G_NOTHING_CACHED:
+ break;
- case H5G_CACHED_STAB:
- assert(2 * H5F_SIZEOF_ADDR(f) <= H5G_SIZEOF_SCRATCH);
- H5F_addr_decode(f, pp, &(ent->cache.stab.btree_addr));
- H5F_addr_decode(f, pp, &(ent->cache.stab.heap_addr));
- break;
+ case H5G_CACHED_STAB:
+ assert(2 * H5F_SIZEOF_ADDR(f) <= H5G_SIZEOF_SCRATCH);
+ H5F_addr_decode(f, pp, &(ent->cache.stab.btree_addr));
+ H5F_addr_decode(f, pp, &(ent->cache.stab.heap_addr));
+ break;
- case H5G_CACHED_SLINK:
- UINT32DECODE (*pp, ent->cache.slink.lval_offset);
- break;
+ case H5G_CACHED_SLINK:
+ UINT32DECODE (*pp, ent->cache.slink.lval_offset);
+ break;
- default:
- HDabort();
+ default:
+ HDabort();
}
*pp = p_ret + H5G_SIZEOF_ENTRY(f);
@@ -486,8 +486,8 @@ H5G_ent_debug(H5F_t UNUSED *f, hid_t dxpl_id, const H5G_entry_t *ent, FILE * str
case H5G_CACHED_SLINK:
HDfprintf (stream, "Symbolic Link\n");
- HDfprintf(stream, "%*s%-*s ", indent, "", fwidth,
- "Cached information:\n");
+ HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth,
+ "Cached information:");
HDfprintf (stream, "%*s%-*s %lu\n", nested_indent, "", nested_fwidth,
"Link value offset:",
(unsigned long)(ent->cache.slink.lval_offset));