diff options
author | Patrick Lu <ptlu@hawkwind.ncsa.uiuc.edu> | 1999-10-13 15:09:30 (GMT) |
---|---|---|
committer | Patrick Lu <ptlu@hawkwind.ncsa.uiuc.edu> | 1999-10-13 15:09:30 (GMT) |
commit | 478038d68d526d576f8338ec10475d5dd28f0e21 (patch) | |
tree | 069d985f70dacaccda59b6aba64f4e8a99a93fba | |
parent | d5db5d6991bc17b69da1f4debc3006e765b28984 (diff) | |
download | hdf5-478038d68d526d576f8338ec10475d5dd28f0e21.zip hdf5-478038d68d526d576f8338ec10475d5dd28f0e21.tar.gz hdf5-478038d68d526d576f8338ec10475d5dd28f0e21.tar.bz2 |
[svn-r1741] write 0f0f0f0f into the *a.raw and *b.raw files so if the os doesn't put 0's in
when it skips over part of the file the garbage is not left in there.
fixes problems with win 98
-rw-r--r-- | test/external.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/external.c b/test/external.c index 902bc76..52eb4af 100644 --- a/test/external.c +++ b/test/external.c @@ -582,6 +582,7 @@ test_2 (hid_t fapl) hid_t hs_space; /*hyperslab data space */ hssize_t hs_start = 30; /*hyperslab starting offset */ hsize_t hs_count = 25; /*hyperslab size */ + int temparray[10] = {0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f}; TESTING("read external dataset"); @@ -593,7 +594,8 @@ test_2 (hid_t fapl) sprintf (filename, "extern_%lua.raw", (unsigned long)i+1); fd = HDopen (filename, O_RDWR|O_CREAT|O_TRUNC, 0666); assert (fd>=0); - n = lseek (fd, (off_t)(i*10), SEEK_SET); +// n = lseek (fd, (off_t)(i*10), SEEK_SET); + n = write(fd,temparray,i*10); assert (n>=0 && (size_t)n==i*10); n = write (fd, part, sizeof(part)); assert (n==sizeof(part)); @@ -706,6 +708,7 @@ test_3 (hid_t fapl) hssize_t hs_start=100; /*hyperslab starting offset */ hsize_t hs_count=100; /*hyperslab size */ char filename[1024]; /*file name */ + int temparray[10] = {0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f,0x0f0f0f0f0f}; TESTING("write external dataset"); @@ -731,6 +734,8 @@ test_3 (hid_t fapl) printf(" cannot open %s: %s\n", filename, strerror(errno)); goto error; } + + write(fd, temparray, (i-1)*10); close (fd); } |