From 3b8b18d16e7aeaee99b6ca7d45a5b0e28a86595b Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 31 Jan 2009 21:31:34 -0500 Subject: [svn-r16394] Description: Rename H5O_msg_read_real -> H5O_msg_read_oh, to be more consistent with other routines in library. Move H5O_msg_read_oh and H5O_msg_exists_oh from package to private header file, so other routines in library can use them. Tested on: FreeBSD/32 6.3 (duty) Too minor to require h5committest --- src/H5Aint.c | 2 +- src/H5Doh.c | 2 +- src/H5Goh.c | 4 ++-- src/H5O.c | 4 ++-- src/H5Omessage.c | 10 +++++----- src/H5Opkg.h | 3 --- src/H5Oprivate.h | 3 +++ 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/H5Aint.c b/src/H5Aint.c index a47c5c3..a2cc6ec 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -701,7 +701,7 @@ H5A_get_ainfo(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5O_ainfo_t *ainfo) HDassert(oh); /* Retrieve the "attribute info" structure */ - if((ret_value = (H5O_ainfo_t *)H5O_msg_read_real(f, dxpl_id, oh, H5O_AINFO_ID, ainfo))) { + if((ret_value = (H5O_ainfo_t *)H5O_msg_read_oh(f, dxpl_id, oh, H5O_AINFO_ID, ainfo))) { /* Check if we don't know how many attributes there are */ if(ret_value->nattrs == HSIZET_MAX) { /* Check if we are using "dense" attribute storage */ diff --git a/src/H5Doh.c b/src/H5Doh.c index be4c5bd..039f055 100644 --- a/src/H5Doh.c +++ b/src/H5Doh.c @@ -372,7 +372,7 @@ H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) HDassert(bh_info); /* Get the layout message from the object header */ - if(NULL == H5O_msg_read_real(f, dxpl_id, oh, H5O_LAYOUT_ID, &layout)) + if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LAYOUT_ID, &layout)) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find LAYOUT message") /* Check for chunked dataset storage */ diff --git a/src/H5Goh.c b/src/H5Goh.c index 497badb..2dab8aa 100644 --- a/src/H5Goh.c +++ b/src/H5Goh.c @@ -272,14 +272,14 @@ H5O_group_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) HDassert(bh_info); /* Check for "new style" group info */ - if(NULL == H5O_msg_read_real(f, dxpl_id, oh, H5O_LINFO_ID, &linfo)) { + if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_LINFO_ID, &linfo)) { H5O_stab_t stab; /* Info about symbol table */ /* Must be "old style" group, clear error stack */ H5E_clear_stack(NULL); /* Get symbol table message */ - if(NULL == H5O_msg_read_real(f, dxpl_id, oh, H5O_STAB_ID, &stab)) + if(NULL == H5O_msg_read_oh(f, dxpl_id, oh, H5O_STAB_ID, &stab)) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't find LINFO nor STAB messages") /* Get symbol table size info */ diff --git a/src/H5O.c b/src/H5O.c index 1d640fa..5dfca1b 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -2321,9 +2321,9 @@ H5O_get_info(H5O_loc_t *oloc, hid_t dxpl_id, hbool_t want_ih_info, H5O_info_t *o oinfo->btime = 0; /* Might be information for modification time */ - if(NULL == H5O_msg_read_real(oloc->file, dxpl_id, oh, H5O_MTIME_ID, &oinfo->ctime)) { + if(NULL == H5O_msg_read_oh(oloc->file, dxpl_id, oh, H5O_MTIME_ID, &oinfo->ctime)) { H5E_clear_stack(NULL); - if(NULL == H5O_msg_read_real(oloc->file, dxpl_id, oh, H5O_MTIME_NEW_ID, &oinfo->ctime)) { + if(NULL == H5O_msg_read_oh(oloc->file, dxpl_id, oh, H5O_MTIME_NEW_ID, &oinfo->ctime)) { H5E_clear_stack(NULL); oinfo->ctime = 0; } /* end if */ diff --git a/src/H5Omessage.c b/src/H5Omessage.c index 5a0577a..a63299a 100644 --- a/src/H5Omessage.c +++ b/src/H5Omessage.c @@ -488,7 +488,7 @@ H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg, HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "unable to load object header") /* Call the "real" read routine */ - if(NULL == (ret_value = H5O_msg_read_real(loc->file, dxpl_id, oh, type_id, mesg))) + if(NULL == (ret_value = H5O_msg_read_oh(loc->file, dxpl_id, oh, type_id, mesg))) HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to load object header") done: @@ -500,7 +500,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5O_msg_read_real + * Function: H5O_msg_read_oh * * Purpose: Reads a message from an object header and returns a pointer * to it. The caller will usually supply the memory through @@ -523,14 +523,14 @@ done: *------------------------------------------------------------------------- */ void * -H5O_msg_read_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id, +H5O_msg_read_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id, void *mesg) { const H5O_msg_class_t *type; /* Actual H5O class type for the ID */ unsigned idx; /* Message's index in object header */ void *ret_value = NULL; - FUNC_ENTER_NOAPI_NOINIT(H5O_msg_read_real) + FUNC_ENTER_NOAPI_NOINIT(H5O_msg_read_oh) /* check args */ HDassert(f); @@ -562,7 +562,7 @@ H5O_msg_read_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id, done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5O_msg_read_real() */ +} /* end H5O_msg_read_oh() */ /*------------------------------------------------------------------------- diff --git a/src/H5Opkg.h b/src/H5Opkg.h index b7d4202..fa69b93 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -487,12 +487,9 @@ H5_DLL herr_t H5O_msg_append_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_DLL herr_t H5O_msg_write_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *type, unsigned mesg_flags, unsigned update_flags, void *mesg); -H5_DLL void *H5O_msg_read_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, - unsigned type_id, void *mesg); H5_DLL void *H5O_msg_free_real(const H5O_msg_class_t *type, void *mesg); H5_DLL herr_t H5O_msg_free_mesg(H5O_mesg_t *mesg); H5_DLL unsigned H5O_msg_count_real(const H5O_t *oh, const H5O_msg_class_t *type); -H5_DLL htri_t H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id); H5_DLL herr_t H5O_msg_remove_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type, int sequence, H5O_operator_t op, void *op_data, hbool_t adj_link, hid_t dxpl_id); H5_DLL void *H5O_msg_copy_file(const H5O_msg_class_t *type, H5F_t *file_src, diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index cc88bdc..524f786 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -604,11 +604,14 @@ H5_DLL herr_t H5O_msg_write_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id, unsigned mesg_flags, unsigned update_flags, void *mesg); H5_DLL void *H5O_msg_read(const H5O_loc_t *loc, unsigned type_id, void *mesg, hid_t dxpl_id); +H5_DLL void *H5O_msg_read_oh(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned type_id, + void *mesg); H5_DLL herr_t H5O_msg_reset(unsigned type_id, void *native); H5_DLL void *H5O_msg_free(unsigned type_id, void *mesg); H5_DLL void *H5O_msg_copy(unsigned type_id, const void *mesg, void *dst); H5_DLL int H5O_msg_count(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id); H5_DLL htri_t H5O_msg_exists(const H5O_loc_t *loc, unsigned type_id, hid_t dxpl_id); +H5_DLL htri_t H5O_msg_exists_oh(const H5O_t *oh, unsigned type_id); H5_DLL herr_t H5O_msg_remove(const H5O_loc_t *loc, unsigned type_id, int sequence, hbool_t adj_link, hid_t dxpl_id); H5_DLL herr_t H5O_msg_remove_op(const H5O_loc_t *loc, unsigned type_id, int sequence, -- cgit v0.12