diff options
author | Robb Matzke <matzke@llnl.gov> | 1997-08-28 16:37:58 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1997-08-28 16:37:58 (GMT) |
commit | 27078082978818bb1e284677639c1ebac45bf90a (patch) | |
tree | 187d2ceda4e7c15aeaa6fa9c8c05f50acbd58054 /src/H5Oprivate.h | |
parent | ae4e4231330459115827485b2896c992f904294d (diff) | |
download | hdf5-27078082978818bb1e284677639c1ebac45bf90a.zip hdf5-27078082978818bb1e284677639c1ebac45bf90a.tar.gz hdf5-27078082978818bb1e284677639c1ebac45bf90a.tar.bz2 |
[svn-r44] ./src/H5D.c
I commented out a bunch of code in H5D_flush() so I could
compile and link the test cases. If you commit your changes
to that file, whatever they may be, I'll change H5D_flush() to
use the new directory functions described below...
./src/H5G.c
H5G_namei()
-----------
Understands files without directories. The root object
(directory or not) can be found by asking for `/' (or any
equivalent absolute or relative name like `/.//.///' or
`.//.///' (if the cwd is the root)) or by name like `/foo' (or
any other equivalent absolute or relative name) if the object
has a name message with the value `foo'. This function is
used by most of the other H5G functions so they now understand
directory-less files too.
H5G_new()
---------
Creates the root directory implicitly if it doesn't already
exist, moving any previous non-directory root object into the
new root directory before creating the requested directory
within the root. The creation of the root directory happens
first, regardless of whether the requested directory creation
succeeds. Once the root directory is created it never
disappears even if the file later has only one object. This
"feature" can be used to force a file to have a root directory
by saying something like:
H5G_new (..., "/", ...);
H5ECLEAR; /*we don't care about the H5E_EXISTS failure*/
The H5G_new() in the previous example fails because the root
directory is created implicitly before we attempt to create
the requested "/" directory.
H5G_find()
----------
Understands files without directories. If there is no root
object then this function is guaranteed to fail even if the
request is for `/'. As mentioned for H5G_namei(), the root
object can be retrieved with `/' or `/foo' (or equivalent
absolute or relative names).
H5G_insert()
------------
Understands files without directories and attempts to create
such files when there is only one object. The root symbol
table is created implicitly when necessary.
A root object can be given a name message by the caller and
then inserted with the name `/' or it can be inserted with
the name `/foo' in which case H5G_insert() will set the name
message to `foo'.
H5G_modify()
------------
Understands files without directories.
./src/H5Fprivate.h
Removed the root_type field from hdf5_file_t.
./src/H5Fprivate.h
./src/H5F.c
Removed H5F_root_type()
./src/H5Fpublic.h
Removed H5F_root_symtype_t.
./src/H5Oprivate.h
./src/H5O.c
Added H5O_remove() which is currently a no-op.
Diffstat (limited to 'src/H5Oprivate.h')
-rw-r--r-- | src/H5Oprivate.h | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 34acff9..43aace9 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -28,6 +28,7 @@ #define H5O_NCHUNKS 8 /*initial number of chunks */ #define H5O_NEW_MESG (-1) /*new message */ #define H5O_NO_ADDR (-1) /*no disk address yet */ +#define H5O_ALL (-1) /*delete all messages of type */ #define H5O_VERSION 1 #define H5O_ALIGNMENT 4 @@ -90,13 +91,39 @@ typedef struct H5O_t { extern const H5O_class_t H5O_NULL[1]; /* + * Simple Dimensionality message. + */ +#define H5O_SIM_DIM_ID 0x0001 +extern const H5O_class_t H5O_SIM_DIM[1]; + +typedef struct { + uint32 rank; /* Number of dimensions */ + uint32 dim_flags; /* Dimension flags */ + uint32 *size; /* Dimension sizes */ + uint32 *max; /* Maximum dimension sizes */ + uint32 *perm; /* Dimension permutations */ +} H5O_sim_dim_t; + +/* + * Simple Datatype message. + */ +#define H5O_SIM_DTYPE_ID 0x0003 +extern const H5O_class_t H5O_SIM_DTYPE[1]; + +typedef struct { + uint8 length; /* Number of bytes */ + uint8 arch; /* Architecture format of the data */ + hatom_t type; /* Type of the data */ +} H5O_sim_dtype_t; + +/* * Object name message. */ #define H5O_NAME_ID 0x000d extern const H5O_class_t H5O_NAME[1]; typedef struct H5O_name_t { - char *s; /*ptr to malloc'd memory */ + const char *s; /*ptr to malloc'd memory */ } H5O_name_t; /* @@ -124,32 +151,6 @@ typedef struct H5O_stab_t { haddr_t heap; /*address of name heap */ } H5O_stab_t; -/* - * Simple Datatype message. - */ -#define H5O_SIM_DTYPE_ID 0x0003 -extern const H5O_class_t H5O_SIM_DTYPE[1]; - -typedef struct { - uint8 length; /* Number of bytes */ - uint8 arch; /* Architecture format of the data */ - hatom_t type; /* Type of the data */ -} H5O_sim_dtype_t; - -/* - * Simple Dimensionality message. - */ -#define H5O_SIM_DIM_ID 0x0001 -extern const H5O_class_t H5O_SIM_DIM[1]; - -typedef struct { - uint32 rank; /* Number of dimensions */ - uint32 dim_flags; /* Dimension flags */ - uint32 *size; /* Dimension sizes */ - uint32 *max; /* Maximum dimension sizes */ - uint32 *perm; /* Dimension permutations */ -} H5O_sim_dim_t; - haddr_t H5O_new (hdf5_file_t *f, intn nlink, size_t size_hint); @@ -161,6 +162,8 @@ const void *H5O_peek (hdf5_file_t *f, haddr_t addr, const H5O_class_t *type, intn H5O_modify (hdf5_file_t *f, haddr_t addr, H5G_entry_t *ent, hbool_t *ent_modified, const H5O_class_t *type, intn overwrite, const void *mesg); +herr_t H5O_remove (hdf5_file_t *f, haddr_t addr, H5G_entry_t *ent, + const H5O_class_t *type, intn sequence); herr_t H5O_reset (const H5O_class_t *type, void *native); herr_t H5O_debug (hdf5_file_t *f, haddr_t addr, FILE *stream, intn indent, intn fwidth); |