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
..
2000-09-28 15:53:04 -05:00
2000-09-19 12:04:46 -05:00
2000-09-28 15:51:45 -05:00
2000-09-28 15:51:45 -05:00
2000-09-28 15:51:45 -05:00
2000-09-28 15:51:45 -05:00
2000-09-28 15:51:45 -05:00
2000-09-28 15:51:45 -05:00
2000-09-28 15:51:45 -05:00
2000-09-28 15:51:45 -05:00
2000-09-28 15:51:45 -05:00
2000-09-28 15:51:45 -05:00
2000-10-02 13:06:20 -05:00
2000-09-29 22:31:08 -05:00
2000-09-19 16:08:15 -05:00
2000-03-06 18:02:40 -05:00
2000-10-05 11:56:30 -05:00
2000-09-30 12:27:18 -05:00
2000-09-28 15:46:31 -05:00
2000-05-18 11:40:20 -05:00
2000-10-04 11:57:04 -05:00
2000-10-04 11:57:04 -05:00