summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README2
-rw-r--r--doc/html/H5.format.html33
-rw-r--r--src/H5F.c10
-rw-r--r--src/H5Gprivate.h2
-rw-r--r--src/H5Odtype.c45
5 files changed, 72 insertions, 20 deletions
diff --git a/README b/README
index 9b4cfd7..6bec113 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-This is hdf5-1.0.24a released on 1998-06-19 14:51 UTC
+This is hdf5-1.0.24a released on 1998-06-20 14:23 UTC
Please refer to the INSTALL file for installation instructions.
------------------------------------------------------------------------------
diff --git a/doc/html/H5.format.html b/doc/html/H5.format.html
index 0b4da0c..ce7e112 100644
--- a/doc/html/H5.format.html
+++ b/doc/html/H5.format.html
@@ -179,6 +179,10 @@
</tr>
<tr align=center>
+ <td colspan=4>Reserved Address</td>
+ </tr>
+
+ <tr align=center>
<td colspan=4><br>Root Group Symbol Table Entry<br><br></td>
</tr>
</table>
@@ -390,6 +394,13 @@
</tr>
<tr valign=top>
+ <td>Reserved Address</td>
+ <td>This address field is present for alignment purposes and
+ is always set to the undefined address value (all bits
+ set).</td>
+ </tr>
+
+ <tr valign=top>
<td>Root Group Symbol Table Entry</td>
<td>This symbol-table entry (described later in this
document) refers to the entry point into the group
@@ -705,7 +716,7 @@
</tr>
<tr align=center>
- <td colspan=4><br><br>Scratch-pad Space (24 bytes)<br><br><br></td>
+ <td colspan=4><br><br>Scratch-pad Space (16 bytes)<br><br><br></td>
</tr>
</table>
</center>
@@ -2142,36 +2153,40 @@
<tr align=center>
<td colspan=4><br><br>Name (null terminated, multiple of
- four bytes)<br><br><br></td>
+ eight bytes)<br><br><br></td>
</tr>
<tr align=center>
<td colspan=4>Byte Offset of Member in Compound Instance</td>
</tr>
- <tr>
+ <tr align=center>
<td>Dimensionality</td>
<td colspan=3>reserved</td>
</tr>
<tr align=center>
- <td colspan=4>Size of Dimension 0 (optional)</td>
+ <td colspan=4>Dimension Permutation</td>
</tr>
<tr align=center>
- <td colspan=4>Size of Dimension 1 (optional)</td>
+ <td colspan=4>Reserved</td>
</tr>
<tr align=center>
- <td colspan=4>Size of Dimension 2 (optional)</td>
+ <td colspan=4>Size of Dimension 0 (required)</td>
</tr>
<tr align=center>
- <td colspan=4>Size of Dimension 3 (optional)</td>
+ <td colspan=4>Size of Dimension 1 (required)</td>
</tr>
<tr align=center>
- <td colspan=4>Dimension Permutation</td>
+ <td colspan=4>Size of Dimension 2 (required)</td>
+ </tr>
+
+ <tr align=center>
+ <td colspan=4>Size of Dimension 3 (required)</td>
</tr>
<tr align=center>
@@ -3093,7 +3108,7 @@ data-type.
<address><a href="mailto:koziol@ncsa.uiuc.edu">Quincey Koziol</a></address>
<address><a href="mailto:matzke@llnl.gov">Robb Matzke</a></address>
<!-- hhmts start -->
-Last modified: Mon Jul 20 09:16:11 EDT 1998
+Last modified: Mon Jul 20 10:17:03 EDT 1998
<!-- hhmts end -->
</body>
</html>
diff --git a/src/H5F.c b/src/H5F.c
index e946b17..96fe5d6 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -742,6 +742,7 @@ H5F_open(const char *name, uintn flags,
haddr_t addr1, addr2; /*temporary address */
H5G_entry_t root_ent; /*root symbol table entry */
const H5F_low_class_t *type = NULL; /*low-level file driver */
+ haddr_t reserved_addr; /*reserved address */
FUNC_ENTER(H5F_open, NULL);
@@ -996,6 +997,7 @@ H5F_open(const char *name, uintn flags,
variable_size = H5F_SIZEOF_ADDR(f) + /*base address */
H5F_SIZEOF_ADDR(f) + /*global free list addr */
H5F_SIZEOF_ADDR(f) + /*logical file size */
+ H5F_SIZEOF_ADDR(f) + /*reserved address*/
H5G_SIZEOF_ENTRY(f);
assert(variable_size <= sizeof buf);
addr1 = f->shared->boot_addr;
@@ -1009,6 +1011,7 @@ H5F_open(const char *name, uintn flags,
H5F_addr_decode(f, &p, &(f->shared->base_addr));
H5F_addr_decode(f, &p, &(f->shared->freespace_addr));
H5F_addr_decode(f, &p, &(f->shared->hdf5_eof));
+ H5F_addr_decode(f, &p, &reserved_addr);
if (H5G_ent_decode(f, &p, &root_ent) < 0) {
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL,
"unable to read root symbol entry");
@@ -1311,8 +1314,9 @@ H5Fopen (const char *filename, unsigned flags, hid_t access_id)
static herr_t
H5F_flush(H5F_t *f, hbool_t invalidate)
{
- uint8 buf[2048], *p = buf;
-
+ uint8 buf[2048], *p = buf;
+ haddr_t reserved_addr;
+
FUNC_ENTER(H5F_flush, FAIL);
/*
@@ -1357,6 +1361,8 @@ H5F_flush(H5F_t *f, hbool_t invalidate)
H5F_addr_encode(f, &p, &(f->shared->base_addr));
H5F_addr_encode(f, &p, &(f->shared->freespace_addr));
H5F_addr_encode(f, &p, &(f->shared->hdf5_eof));
+ H5F_addr_undef(&reserved_addr);
+ H5F_addr_encode(f, &p, &reserved_addr);
H5G_ent_encode(f, &p, H5G_entof(f->shared->root_grp));
/* update file length if necessary */
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index 03f0348..0f8f773 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -38,7 +38,7 @@
/*
* The disk size for a symbol table entry...
*/
-#define H5G_SIZEOF_SCRATCH 24
+#define H5G_SIZEOF_SCRATCH 16
#define H5G_SIZEOF_ENTRY(F) \
(H5F_SIZEOF_SIZE(F) + /*offset of name into heap */ \
H5F_SIZEOF_ADDR(F) + /*address of object header */ \
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index aefa335..c890a03 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -174,15 +174,22 @@ H5O_dtype_decode_helper(const uint8 **pp, H5T_t *dt)
dt->u.compnd.memb[i].ndims = *(*pp)++;
assert(dt->u.compnd.memb[i].ndims <= 4);
*pp += 3; /*reserved bytes */
- for (j = 0; j < dt->u.compnd.memb[i].ndims; j++) {
- UINT32DECODE(*pp, dt->u.compnd.memb[i].dim[j]);
- }
+
+ /* Dimension permutation */
UINT32DECODE(*pp, perm_word);
dt->u.compnd.memb[i].perm[0] = (perm_word >> 0) & 0xff;
dt->u.compnd.memb[i].perm[1] = (perm_word >> 8) & 0xff;
dt->u.compnd.memb[i].perm[2] = (perm_word >> 16) & 0xff;
dt->u.compnd.memb[i].perm[3] = (perm_word >> 24) & 0xff;
dt->u.compnd.memb[i].type = H5MM_calloc (sizeof(H5T_t));
+
+ /* Reserved */
+ *pp += 4;
+
+ /* Dimension sizes */
+ for (j=0; j<4; j++) {
+ UINT32DECODE(*pp, dt->u.compnd.memb[i].dim[j]);
+ }
if (NULL==dt->u.compnd.memb[i].type) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
@@ -400,23 +407,42 @@ H5O_dtype_encode_helper(uint8 **pp, const H5T_t *dt)
*/
flags = dt->u.compnd.nmembs & 0xffff;
for (i = 0; i < dt->u.compnd.nmembs; i++) {
+ /* Name, multiple of eight bytes */
HDstrcpy ((char*)(*pp), dt->u.compnd.memb[i].name);
n = strlen(dt->u.compnd.memb[i].name);
for (z=n+1; z%8; z++) (*pp)[z] = '\0';
*pp += z;
+
+ /* Member offset */
UINT32ENCODE(*pp, dt->u.compnd.memb[i].offset);
+
+ /* Dimensionality */
*(*pp)++ = dt->u.compnd.memb[i].ndims;
assert(dt->u.compnd.memb[i].ndims <= 4);
+
+ /* Reserved */
*(*pp)++ = '\0';
*(*pp)++ = '\0';
*(*pp)++ = '\0';
- for (j = 0; j < dt->u.compnd.memb[i].ndims; j++) {
- UINT32ENCODE(*pp, dt->u.compnd.memb[i].dim[j]);
- }
+
+ /* Dimension permutation */
for (j = 0, perm_word = 0; j < dt->u.compnd.memb[i].ndims; j++) {
perm_word |= dt->u.compnd.memb[i].perm[j] << (8 * j);
}
UINT32ENCODE(*pp, perm_word);
+
+ /* Reserved */
+ UINT32ENCODE(*pp, 0);
+
+ /* Dimensions */
+ for (j=0; j<dt->u.compnd.memb[i].ndims; j++) {
+ UINT32ENCODE(*pp, dt->u.compnd.memb[i].dim[j]);
+ }
+ for (/*void*/; j<4; j++) {
+ UINT32ENCODE(*pp, 0);
+ }
+
+ /* Subtype */
if (H5O_dtype_encode_helper(pp, dt->u.compnd.memb[i].type)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL,
"can't encode member type");
@@ -597,7 +623,12 @@ H5O_dtype_size(H5F_t *f, const void *mesg)
case H5T_COMPOUND:
for (i = 0; i < dt->u.compnd.nmembs; i++) {
ret_value += ((HDstrlen(dt->u.compnd.memb[i].name) + 8) / 8) * 8;
- ret_value += 12 + dt->u.compnd.memb[i].ndims * 4;
+ ret_value += 4 + /*member offset*/
+ 1 + /*dimensionality*/
+ 3 + /*reserved*/
+ 4 + /*permutation*/
+ 4 + /*reserved*/
+ 16; /*dimensions*/
ret_value += H5O_dtype_size(f, dt->u.compnd.memb[i].type);
}
break;