mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-12-27 08:01:04 +08:00
ea7f4421f9
Bug fix Description: In the h5dump_fixtype function, when users created a COMPOUND datatype, the alignment would be off somewhat. Solution: The alignment was being set after insertion. I changed this code: for (i = 0, offset = 0; i < nmembs; i++) { H5Tinsert_array(m_type, name[i], offset, ndims[i], dims + i * 4, NULL, memb[i]); for (j = 0, nelmts = 1; j < ndims[i]; j++) nelmts *= dims[i * 4 + j]; offset = ALIGN(offset, H5Tget_size(memb[i])) + nelmts * H5Tget_size(memb[i]); } to: for (i = 0, offset = 0; i < nmembs; i++) { if (offset) offset = ALIGN(offset, H5Tget_size(memb[i])); H5Tinsert_array(m_type, name[i], offset, ndims[i], dims + i * 4, NULL, memb[i]); for (j = 0, nelmts = 1; j < ndims[i]; j++) nelmts *= dims[i * 4 + j]; offset += nelmts * H5Tget_size(memb[i]); } The alignment is now calculated before the insertion. Platforms tested: Solaris, Linux |
||
---|---|---|
.. | ||
testfiles | ||
Dependencies | ||
h4toh5anno.c | ||
h4toh5image.c | ||
h4toh5main.c | ||
h4toh5main.h | ||
h4toh5pal.c | ||
h4toh5sds.c | ||
h4toh5util.c | ||
h4toh5util.h | ||
h4toh5vdata.c | ||
h4toh5vgroup.c | ||
h5debug.c | ||
h5dump.c | ||
h5dump.h | ||
h5dumptst.c | ||
h5import.c | ||
h5ls.c | ||
h5repart.c | ||
h5toh4.c | ||
h5toh4.h | ||
h5tools.c | ||
h5tools.h | ||
Makefile.in | ||
pdb2hdf.c | ||
testh4toh5 | ||
testh5dump.sh | ||
testh5toh4 |