diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-04-14 05:03:26 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-04-14 05:03:26 (GMT) |
commit | aa1cedb4f8b57fa73ab385d6316073a497410244 (patch) | |
tree | f1070fa6203d1b5ed7d2f3056f1fe83c01c4a315 /src/H5Ostab.c | |
parent | 4e4bdd91633a24a39450a236cc88ab7a3b3a17d4 (diff) | |
download | hdf5-aa1cedb4f8b57fa73ab385d6316073a497410244.zip hdf5-aa1cedb4f8b57fa73ab385d6316073a497410244.tar.gz hdf5-aa1cedb4f8b57fa73ab385d6316073a497410244.tar.bz2 |
[svn-r6658] Purpose:
New feature
Description:
Track changes in the internal metadata API with clearing the metadata
dirty flag without flushing object.
Added ability to delete an object header in the file and restore all the
space referenced by various header messages.
Platforms tested:
FreeBSD 4.8 (sleipnir) w/C++
Linux 2.4 (burrwhite) w/FORTRAN
Solaris 2.7 (arabica) w/FORTRAN
IRIX64 6.5 (modi4) w/parallel & FORTRAN
(h5committest not run due to my ongoing difficulties with C++ on burrwhite).
Diffstat (limited to 'src/H5Ostab.c')
-rw-r--r-- | src/H5Ostab.c | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/src/H5Ostab.c b/src/H5Ostab.c index 3258964..17986c1 100644 --- a/src/H5Ostab.c +++ b/src/H5Ostab.c @@ -42,6 +42,7 @@ static herr_t H5O_stab_encode(H5F_t *f, uint8_t *p, const void *_mesg); static void *H5O_stab_copy(const void *_mesg, void *_dest); static size_t H5O_stab_size(H5F_t *f, const void *_mesg); static herr_t H5O_stab_free (void *_mesg); +static herr_t H5O_stab_delete(H5F_t *f, hid_t dxpl_id, const void *_mesg); static herr_t H5O_stab_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int indent, int fwidth); @@ -55,7 +56,8 @@ const H5O_class_t H5O_STAB[1] = {{ H5O_stab_copy, /*copy the native value */ H5O_stab_size, /*size of symbol table entry */ NULL, /*default reset method */ - H5O_stab_free, /* free method */ + H5O_stab_free, /* free method */ + H5O_stab_delete, /* file delete method */ NULL, /*get share method */ NULL, /*set share method */ H5O_stab_debug, /*debug the message */ @@ -313,6 +315,41 @@ done: /*------------------------------------------------------------------------- + * Function: H5O_stab_delete + * + * Purpose: Free file space referenced by message + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * Thursday, March 20, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static herr_t +H5O_stab_delete(H5F_t *f, hid_t dxpl_id, const void *_mesg) +{ + const H5O_stab_t *stab = (const H5O_stab_t *) _mesg; + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5O_stab_delete, FAIL); + + /* check args */ + assert(f); + assert(stab); + + /* Free the file space for the symbol table */ + if (H5G_stab_delete(f, dxpl_id, stab->btree_addr, stab->heap_addr)<0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTFREE, FAIL, "unable to free symbol table"); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} /* end H5O_stab_delete() */ + + +/*------------------------------------------------------------------------- * Function: H5O_stab_debug * * Purpose: Prints debugging info for a symbol table message. |