summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-03-24 23:18:34 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-03-24 23:18:34 (GMT)
commite987de2c42628f94e713111c5cbb09bbd3db4a68 (patch)
tree4baf097e2a0480c9cf24e2ce28749f969afb8fd8 /src/H5O.c
parent2ed9aa69f74cc2002fb9a03c8893056a1daea1db (diff)
downloadhdf5-e987de2c42628f94e713111c5cbb09bbd3db4a68.zip
hdf5-e987de2c42628f94e713111c5cbb09bbd3db4a68.tar.gz
hdf5-e987de2c42628f94e713111c5cbb09bbd3db4a68.tar.bz2
[svn-r329] Changes since 19980324
---------------------- ./src/H5D.c Zero element requests for H5Dread() and H5Dwrite() succeed. ./src/H5F.c ./src/H5Fprivate.h All files will have a root group. This greatly simplifies the library at the expense of ~1k extra bytes in files that have only one object. ./src/H5D.c ./src/H5Dprivate.h ./html/Groups.html Functions that used to take a file ID and an object name can now take a group ID instead of a file ID. This doesn't change the API, only it's documentation. ./src/H5G.c ./src/H5Gprivate.h ./src/H5O.c ./src/H5Oprivate.h Removed extra file arguments from some internal functions since the file pointer can be found from the group pointer or a symbol table entry (ent->file or H5G_fileof(group)). Besides, when we eventually implement mounting one file on another, H5G_namei() might return a different file than what you gave it, and that file is part of the returned symbol table entry. ./src/H5G.c Fixed bug with `.' appearing in a name. It used to hang the library. ./src/Makefile.in ./src/h5ls.c [NEW] ./MANIFEST Added `h5ls' a simple program that takes a file name and a directory and lists the contents of that directory using H5Giterate(). ./test/istore.c Changed an argument to H5G_create(). ./test/tstab.c Removed test_1 which was testing that files with a single object don't have a root group. This no longer applies.
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/H5O.c b/src/H5O.c
index af9ec82..bf60b09 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -147,6 +147,7 @@ H5O_create(H5F_t *f, size_t size_hint, H5G_entry_t *ent/*out*/)
/* allocate disk space for header and first chunk */
size = H5O_SIZEOF_HDR(f) + size_hint;
+ ent->file = f;
if (H5MF_alloc(f, H5MF_META, size, &(ent->header)/*out*/) < 0) {
HRETURN_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"unable to allocate file space for object header hdr");
@@ -190,12 +191,13 @@ H5O_create(H5F_t *f, size_t size_hint, H5G_entry_t *ent/*out*/)
}
/* open it */
- if (H5O_open(f, ent) < 0) {
+ if (H5O_open(ent) < 0) {
HRETURN_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL,
"unable to open object header");
}
FUNC_LEAVE(SUCCEED);
}
+
/*-------------------------------------------------------------------------
* Function: H5O_open
@@ -215,13 +217,13 @@ H5O_create(H5F_t *f, size_t size_hint, H5G_entry_t *ent/*out*/)
*-------------------------------------------------------------------------
*/
herr_t
-H5O_open(H5F_t *f, H5G_entry_t *obj_ent)
+H5O_open(H5G_entry_t *obj_ent)
{
FUNC_ENTER(H5O_open, FAIL);
/* Check args */
- assert(f);
assert(obj_ent);
+ assert(obj_ent->file);
#ifdef H5O_DEBUG
fprintf(stderr, ">");
@@ -230,10 +232,10 @@ H5O_open(H5F_t *f, H5G_entry_t *obj_ent)
#endif
/* Increment open-lock counters */
- obj_ent->file = f;
obj_ent->file->nopen++;
FUNC_LEAVE(SUCCEED);
}
+
/*-------------------------------------------------------------------------
* Function: H5O_close