mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-06 14:56:51 +08:00
[svn-r1226] Purpose:
Bug fix Description: dumper repeated output after the 1st 4 rows. The bug was because the dumper was reading just a small slice a time from the file dataset but did not adjust the offset in the file-space. So, it just kept reading the same first slice. Solution: Stole the offset-adjustion code from the routine that h5ls uses. Platform Tested: O2K.
This commit is contained in:
parent
97496e9b60
commit
07ff900c26
@ -517,6 +517,7 @@ h5dump_simple(hid_t oid, hid_t p_type, int obj_data)
|
||||
hid_t f_space; /*file data space */
|
||||
int ndims; /*dimensionality */
|
||||
hsize_t elmtno, i; /*counters */
|
||||
int carry; /*counter carry value */
|
||||
hssize_t zero[8]; /*vector of zeros */
|
||||
|
||||
/* Print info */
|
||||
@ -645,6 +646,16 @@ h5dump_simple(hid_t oid, hid_t p_type, int obj_data)
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
/* Calculate the next hyperslab offset */
|
||||
for (i=ndims, carry=1; i>0 && carry; --i) {
|
||||
hs_offset[i-1] += hs_size[i-1];
|
||||
if (hs_offset[i-1]==(hssize_t)p_max_idx[i-1]) {
|
||||
hs_offset[i-1] = p_min_idx[i-1];
|
||||
} else {
|
||||
carry = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
H5Sclose(sm_space);
|
||||
|
Loading…
Reference in New Issue
Block a user