[svn-r4508] Purpose:

Document bug fix.
Description:
    When reading or writing to chunked datasets and the data needed datatype
    conversion, and the amount of data was more than one conversion buffer,
    data in the conversion buffer was getting corrupted.
Solution:
    Corrected error in advancing buffer pointer where it was being advanced
    by the number of elements instead of the number of bytes.
Platforms tested:
    FreeBSD 4.4 (hawkwind)
This commit is contained in:
Quincey Koziol 2001-10-02 11:57:56 -05:00
parent 3f844d7ba1
commit d808a5b53a
3 changed files with 31 additions and 16 deletions

View File

@ -2049,13 +2049,13 @@ printf("%s: check 2.0, src_type_size=%d, dst_type_size=%d, target_size=%d\n",FUN
#ifdef QAK
{
int i;
int *b;
float *b;
/* if(qak_debug) { */
b=tconv_buf;
printf("\ntconv_buf:");
for (i=0; i<smine_nelmts; i++,b++) {
printf("(%d)%d ",i,(int)*b);
b=(float*)(tconv_buf+sizeof(float)*(32770-8));
for (i=(32770-8); i<32770; i++,b++) {
printf("(%d)%f ",i,(float)*b);
}
printf("\n");
/* } */
@ -2097,6 +2097,21 @@ printf("%s: check 2.0, src_type_size=%d, dst_type_size=%d, target_size=%d\n",FUN
#ifdef QAK
printf("%s: check 8.0\n",FUNC);
#ifdef QAK
{
int i;
double *b;
/* if(qak_debug) { */
printf("\ntconv_buf:");
b=(double*)(tconv_buf+sizeof(double)*(32770-8));
for (i=(32770-8); i<32770; i++,b++) {
printf("(%d)%f ",i,(double)*b);
}
printf("\n");
/* } */
}
#endif /* QAK */
#endif
/*

View File

@ -340,7 +340,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(unsigned char *)buf+partial_size;
buf=(unsigned char *)buf+(partial_size*elmt_size);
/* Decrement the length of the sequence to read */
seq_len-=partial_size;
@ -400,7 +400,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(unsigned char *)buf+full_size;
buf=(unsigned char *)buf+(full_size*elmt_size);
/* Decrement the sequence length left */
seq_len-=full_size;
@ -447,7 +447,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(unsigned char *)buf+partial_size;
buf=(unsigned char *)buf+(partial_size*elmt_size);
/* Decrement the length of the sequence to read */
seq_len-=partial_size;
@ -723,7 +723,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(const unsigned char *)buf+partial_size;
buf=(const unsigned char *)buf+(partial_size*elmt_size);
/* Decrement the length of the sequence to read */
seq_len-=partial_size;
@ -783,7 +783,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(const unsigned char *)buf+full_size;
buf=(const unsigned char *)buf+(full_size*elmt_size);
/* Decrement the sequence length left */
seq_len-=full_size;
@ -830,7 +830,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(const unsigned char *)buf+partial_size;
buf=(const unsigned char *)buf+(partial_size*elmt_size);
/* Decrement the length of the sequence to read */
seq_len-=partial_size;

View File

@ -340,7 +340,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(unsigned char *)buf+partial_size;
buf=(unsigned char *)buf+(partial_size*elmt_size);
/* Decrement the length of the sequence to read */
seq_len-=partial_size;
@ -400,7 +400,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(unsigned char *)buf+full_size;
buf=(unsigned char *)buf+(full_size*elmt_size);
/* Decrement the sequence length left */
seq_len-=full_size;
@ -447,7 +447,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(unsigned char *)buf+partial_size;
buf=(unsigned char *)buf+(partial_size*elmt_size);
/* Decrement the length of the sequence to read */
seq_len-=partial_size;
@ -723,7 +723,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(const unsigned char *)buf+partial_size;
buf=(const unsigned char *)buf+(partial_size*elmt_size);
/* Decrement the length of the sequence to read */
seq_len-=partial_size;
@ -783,7 +783,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(const unsigned char *)buf+full_size;
buf=(const unsigned char *)buf+(full_size*elmt_size);
/* Decrement the sequence length left */
seq_len-=full_size;
@ -830,7 +830,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout,
}
/* Increment the buffer offset */
buf=(const unsigned char *)buf+partial_size;
buf=(const unsigned char *)buf+(partial_size*elmt_size);
/* Decrement the length of the sequence to read */
seq_len-=partial_size;