From 478038d68d526d576f8338ec10475d5dd28f0e21 Mon Sep 17 00:00:00 2001 From: Patrick Lu Date: Wed, 13 Oct 1999 10:09:30 -0500 Subject: [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 --- test/external.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } -- cgit v0.12