[svn-r6203]

Purpose:
bug fixed for windows
Description:
windows fopen functions by default opens a text mode file. It will fail for HDF5 file.
So to use HDopen HDread HDclose for test.
Solution:
Change from fopen, fread, fclose to HDopen, HDread, HDclose.
Platforms tested:
linux2.2.18smp, windows 2000
Misc. update:
    Update MANIFEST if you add or remove any file.
    Update release_docs/RELEASE for bug fixes, new features, etc.
    Update applicable document files too.
This commit is contained in:
MuQun Yang 2002-12-13 11:29:01 -05:00
parent 1c0e435421
commit 764a09dddf

View File

@ -329,7 +329,8 @@ test_userblock_offset(hid_t fapl)
hid_t file, fcpl, dataset, space;
int i, j, n;
hsize_t dims[2];
FILE *f;
/* FILE *f;*/
int f;
haddr_t offset;
int rdata[100][200];
@ -369,9 +370,9 @@ test_userblock_offset(hid_t fapl)
* compare it with the data written in.*/
if((offset=H5Dget_offset(dataset))==HADDR_UNDEF) goto error;
f = fopen(filename, "r");
fseek(f, (long int)offset, SEEK_SET);
fread(rdata, sizeof(int), 100*200, f);
f = HDopen(filename, O_RDONLY, 0);
HDlseek(f, (off_t)offset, SEEK_SET);
HDread(f, rdata, sizeof(int)*100*200);
/* Check that the values read are the same as the values written */
for (i = 0; i < 100; i++) {
@ -385,7 +386,7 @@ test_userblock_offset(hid_t fapl)
}
}
fclose(f);
HDclose(f);
H5Dclose(dataset);
H5Fclose(file);