summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-12-16 21:08:26 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-12-16 21:08:26 (GMT)
commite615fc7a982c1817cf7d4c24adf9323604692310 (patch)
tree5dab77c6c1a4476ab5b5953c45f1ea6a1b5d994e /src/H5F.c
parentfaca6fbaa8c557b18d6b264841fc8717d1e73816 (diff)
downloadhdf5-e615fc7a982c1817cf7d4c24adf9323604692310.zip
hdf5-e615fc7a982c1817cf7d4c24adf9323604692310.tar.gz
hdf5-e615fc7a982c1817cf7d4c24adf9323604692310.tar.bz2
[svn-r146] ./src/H5.c
Changes to error handling. ./src/H5B.c Increased size of internal static buffers. ./src/H5C.c Fixed syntax error when NDEBUG is defined. ./src/H5E.c ./src/H5Eprivate.h ./src/H5Epublic.h Errors can now be printed with H5Eprint(). Other minor changes to names and arg types. ./src/H5F.c The base address is now stored in the boot block. The user block size and the base address are synonyms. ./src/H5Fstdio.c Fixed a bug with a return value from fseek(). ./src/H5H.c Added alignment constraints to get rid of unaligned access errors on the DEC alpha having to do with the heap free list. ./src/H5P.c ./src/H5Ppublic.h Changed some size arguments from int to size_t and fixed memory allocation calls. ./src/H5T.c ./src/H5Tpublic.h Changed the order of functions so all the public ones are at the top of the file. Other minor changes. ./src/H5detect.c Added a newline to a string constant.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/H5F.c b/src/H5F.c
index fff101c..af3892b 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -792,16 +792,6 @@ H5F_open (const H5F_low_class_t *type, const char *name, uintn flags,
}
/*
- * All addresses are relative to a base address. Eventually, the base
- * address will be able to be set independently of the boot block
- * address, but for now, all addresses are relative to the beginning of
- * the boot block. Anything before the base address is assumed to be
- * user-defined data.
- */
- f->shared->base_addr = f->shared->boot_addr;
- f->shared->create_parms.userblock_size=f->shared->base_addr.offset;
-
- /*
* Decode the fixed size part of the boot block. For each of the
* version parameters, check that the library is able to handle that
* version.
@@ -879,9 +869,10 @@ H5F_open (const H5F_low_class_t *type, const char *name, uintn flags,
assert (p-buf == fixed_size);
/* Read the variable length part of the boot block... */
- variable_size = H5F_SIZEOF_ADDR (f) + /*global small obj heap*/
+ variable_size = H5F_SIZEOF_ADDR (f) + /*base address*/
+ H5F_SIZEOF_ADDR (f) + /*global small obj heap*/
H5F_SIZEOF_ADDR (f) + /*global free list addr*/
- H5F_SIZEOF_SIZE (f) + /*logical file size*/
+ H5F_SIZEOF_ADDR (f) + /*logical file size*/
H5G_SIZEOF_ENTRY (f);
assert (variable_size <= sizeof buf);
addr1 = f->shared->boot_addr;
@@ -892,6 +883,7 @@ H5F_open (const H5F_low_class_t *type, const char *name, uintn flags,
}
p = buf;
+ H5F_addr_decode (f, &p, &(f->shared->base_addr));
H5F_addr_decode (f, &p, &(f->shared->smallobj_addr));
H5F_addr_decode (f, &p, &(f->shared->freespace_addr));
H5F_addr_decode (f, &p, &(f->shared->hdf5_eof));
@@ -899,6 +891,12 @@ H5F_open (const H5F_low_class_t *type, const char *name, uintn flags,
HGOTO_ERROR (H5E_FILE, H5E_CANTOPENFILE, NULL,
"can't read root symbol entry");
}
+
+ /*
+ * The userdefined data is the area of the file before the base
+ * address.
+ */
+ f->shared->create_parms.userblock_size=f->shared->base_addr.offset;
}
/*
@@ -1205,6 +1203,7 @@ H5F_flush (H5F_t *f, hbool_t invalidate)
UINT16ENCODE (p, f->shared->create_parms.sym_leaf_k);
UINT16ENCODE (p, f->shared->create_parms.btree_k[H5B_SNODE_ID]);
UINT32ENCODE (p, f->shared->consist_flags);
+ H5F_addr_encode (f, &p, &(f->shared->base_addr));
H5F_addr_encode (f, &p, &(f->shared->smallobj_addr));
H5F_addr_encode (f, &p, &(f->shared->freespace_addr));
H5F_addr_encode (f, &p, &(f->shared->hdf5_eof));