hdf5/tools
Bill Wendling ea7f4421f9 [svn-r2634] Purpose:
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
2000-10-05 11:56:30 -05:00
..
testfiles [svn-r2616] 2000-09-28 15:53:04 -05:00
Dependencies [svn-r2573] Purpose: 2000-09-19 12:04:46 -05:00
h4toh5anno.c [svn-r2614] 2000-09-28 15:51:45 -05:00
h4toh5image.c [svn-r2614] 2000-09-28 15:51:45 -05:00
h4toh5main.c [svn-r2614] 2000-09-28 15:51:45 -05:00
h4toh5main.h [svn-r2614] 2000-09-28 15:51:45 -05:00
h4toh5pal.c [svn-r2614] 2000-09-28 15:51:45 -05:00
h4toh5sds.c [svn-r2614] 2000-09-28 15:51:45 -05:00
h4toh5util.c [svn-r2614] 2000-09-28 15:51:45 -05:00
h4toh5util.h [svn-r2614] 2000-09-28 15:51:45 -05:00
h4toh5vdata.c [svn-r2614] 2000-09-28 15:51:45 -05:00
h4toh5vgroup.c [svn-r2614] 2000-09-28 15:51:45 -05:00
h5debug.c [svn-r2549] Added usage message if the user doesn't specify a filename (i.e., no 2000-09-14 12:26:37 -05:00
h5dump.c [svn-r2627] Purpose: 2000-10-02 13:06:20 -05:00
h5dump.h [svn-r2623] Purpose: 2000-09-29 22:31:08 -05:00
h5dumptst.c [svn-r2579] Purpose: 2000-09-19 16:08:15 -05:00
h5import.c [svn-r2232] removed the conditional compile statements that we were going to use 2000-05-09 13:14:33 -05:00
h5ls.c [svn-r2412] Fixed a variety of problems with the new H5ToolsFopen() function. 2000-06-23 12:52:21 -05:00
h5repart.c [svn-r2232] removed the conditional compile statements that we were going to use 2000-05-09 13:14:33 -05:00
h5toh4.c [svn-r2001] Purpose: 2000-03-06 18:02:40 -05:00
h5toh4.h [svn-r2417] Include sys/stat.h in case it is not included in some platforms 2000-06-27 12:57:00 -05:00
h5tools.c [svn-r2634] Purpose: 2000-10-05 11:56:30 -05:00
h5tools.h [svn-r2626] Purpose: 2000-09-30 12:27:18 -05:00
Makefile.in [svn-r2613] 2000-09-28 15:46:31 -05:00
pdb2hdf.c [svn-r2262] * 2000-05-18 2000-05-18 11:40:20 -05:00
testh4toh5 [svn-r2632] Purpose: 2000-10-04 11:57:04 -05:00
testh5dump.sh [svn-r2046] added a test for the tnestedcomp.h5 test. 2000-03-21 12:59:28 -05:00
testh5toh4 [svn-r2632] Purpose: 2000-10-04 11:57:04 -05:00