diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-01-07 17:14:26 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-01-07 17:14:26 (GMT) |
commit | 159fa7a232e1961940b83f035f4c27338d26337e (patch) | |
tree | b7344e9cfaadbbec3bc3a0576df8c264debb8239 /src/H5Gent.c | |
parent | 1d17defdfc977c063c7ff20b5868bef9a76e5d9a (diff) | |
download | hdf5-159fa7a232e1961940b83f035f4c27338d26337e.zip hdf5-159fa7a232e1961940b83f035f4c27338d26337e.tar.gz hdf5-159fa7a232e1961940b83f035f4c27338d26337e.tar.bz2 |
[svn-r151] Changes since 19980105
----------------------
./config/freebsd2.2.1
./config/linux
Added -UH5O_DEBUG to the debug flags. Turn this on to get
lots of lines on stderr to show what objects are opened and
closed.
./src/H5C.o
./src/H5Cpublic.h
./test/dsets.c
./test/tfile.c
Split H5Cget_prop() and H5Cset_prop() into functions for each
property.
./src/H5D.c
./src/H5Dpublic.h
./src/H5Gstab.c
./src/H5O.c
./src/H5Ocont.c
./src/H5Ocstore.c
./src/H5Odtype.c
./src/H5Oefl.c
./src/H5Oistore.c
./src/H5Oname.c
./src/H5Onull.c
./src/H5Oprivate.h
./src/H5Osdspace.c
./src/H5Ostab.c
./src/H5P.c
./src/istore.c
./test/tohdr.c
Object header functions now understand constant
vs. non-constant messages.
./src/H5F.c
./src/H5Fprivate.h
The file OID can be closed before other OID's.
./src/H5Flow.c
H5F_addr_defined() is a macro in this file.
./src/H5G.c
./src/H5Gpublic.h
./test/tstab.c
A current working group cannot be deleted.
./src/H5Gent.c
./src/H5Gpkg.h
Removed unused functionality.
./src/H5public.h
Includes <sys/types.h> for size_t.
Diffstat (limited to 'src/H5Gent.c')
-rw-r--r-- | src/H5Gent.c | 103 |
1 files changed, 5 insertions, 98 deletions
diff --git a/src/H5Gent.c b/src/H5Gent.c index cc33d4c..8575dd8 100644 --- a/src/H5Gent.c +++ b/src/H5Gent.c @@ -34,77 +34,16 @@ static hbool_t interface_initialize_g = FALSE; *------------------------------------------------------------------------- */ H5G_entry_t * -H5G_ent_calloc (void) +H5G_ent_calloc (H5G_entry_t *init) { H5G_entry_t *ent; ent = H5MM_xcalloc (1, sizeof(H5G_entry_t)); - H5F_addr_undef (&(ent->header)); + if (init) *ent = *init; + else H5F_addr_undef (&(ent->header)); return ent; } - - -/*------------------------------------------------------------------------- - * Function: H5G_ent_invalidate - * - * Purpose: Invalidates the cache in a symbol table entry. - * - * Return: Success: SUCCEED - * - * Failure: FAIL - * - * Programmer: Robb Matzke - * Friday, September 19, 1997 - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -herr_t -H5G_ent_invalidate (H5G_entry_t *ent) -{ - FUNC_ENTER (H5G_ent_invalidate, FAIL); - - if (ent && H5G_NOTHING_CACHED!=ent->type) { - ent->dirty = TRUE; - ent->type = H5G_NOTHING_CACHED; - } - - FUNC_LEAVE (SUCCEED); -} - - - -/*------------------------------------------------------------------------- - * Function: H5G_ent_addr - * - * Purpose: Returns the header address associated with a symbol table - * entry. - * - * Return: Success: SUCCED with the address returned in the ADDR - * argument. - * - * Failure: FAIL - * - * Programmer: Robb Matzke - * Friday, September 19, 1997 - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -herr_t -H5G_ent_addr (H5G_entry_t *ent, haddr_t *addr/*out*/) -{ - FUNC_ENTER (H5G_ent_addr, FAIL); - - assert (ent); - *addr = ent->header; - - FUNC_LEAVE (SUCCEED); -} - /*------------------------------------------------------------------------- * Function: H5G_ent_cache @@ -248,6 +187,8 @@ H5G_ent_decode (H5F_t *f, const uint8 **pp, H5G_entry_t *ent) assert (pp); assert (ent); + ent->file = f; + /* decode header */ H5F_decode_length (f, *pp, ent->name_off); H5F_addr_decode (f, pp, &(ent->header)); @@ -258,15 +199,6 @@ H5G_ent_decode (H5F_t *f, const uint8 **pp, H5G_entry_t *ent) case H5G_NOTHING_CACHED: break; - case H5G_CACHED_SDSPACE: - assert (5*4 <= H5G_SIZEOF_SCRATCH); - UINT32DECODE (*pp, ent->cache.sdspace.ndim); - UINT32DECODE (*pp, ent->cache.sdspace.dim[0]); - UINT32DECODE (*pp, ent->cache.sdspace.dim[1]); - UINT32DECODE (*pp, ent->cache.sdspace.dim[2]); - UINT32DECODE (*pp, ent->cache.sdspace.dim[3]); - break; - case H5G_CACHED_STAB: assert (2*H5F_SIZEOF_ADDR (f) <= H5G_SIZEOF_SCRATCH); H5F_addr_decode (f, pp, &(ent->cache.stab.btree_addr)); @@ -376,15 +308,6 @@ H5G_ent_encode (H5F_t *f, uint8 **pp, H5G_entry_t *ent) case H5G_NOTHING_CACHED: break; - case H5G_CACHED_SDSPACE: - assert (5*4 <= H5G_SIZEOF_SCRATCH); - UINT32ENCODE (*pp, ent->cache.sdspace.ndim); - UINT32ENCODE (*pp, ent->cache.sdspace.dim[0]); - UINT32ENCODE (*pp, ent->cache.sdspace.dim[1]); - UINT32ENCODE (*pp, ent->cache.sdspace.dim[2]); - UINT32ENCODE (*pp, ent->cache.sdspace.dim[3]); - break; - case H5G_CACHED_STAB: assert (2*H5F_SIZEOF_ADDR (f) <= H5G_SIZEOF_SCRATCH); H5F_addr_encode (f, pp, &(ent->cache.stab.btree_addr)); @@ -433,9 +356,6 @@ herr_t H5G_ent_debug (H5F_t *f, H5G_entry_t *ent, FILE *stream, intn indent, intn fwidth) { - int i; - char buf[64]; - FUNC_ENTER (H5G_ent_debug, FAIL); fprintf (stream, "%*s%-*s %lu\n", indent, "", fwidth, @@ -457,19 +377,6 @@ H5G_ent_debug (H5F_t *f, H5G_entry_t *ent, FILE *stream, intn indent, fprintf (stream, "Nothing Cached\n"); break; - case H5G_CACHED_SDSPACE: - fprintf (stream, "Simple data space\n"); - fprintf (stream, "%*s%-*s %u\n", indent, "", fwidth, - "Dimensionality:", - (unsigned)(ent->cache.sdspace.ndim)); - for (i=0; i<ent->cache.sdspace.ndim && i<4; i++) { - sprintf (buf, "Dimension %d", i); - fprintf (stream, "%*s%-*s %u\n", indent, "", fwidth, - buf, - (unsigned)(ent->cache.sdspace.dim[i])); - } - break; - case H5G_CACHED_STAB: fprintf (stream, "Symbol Table\n"); |