4 char x[4096], z[4096], b[21], m[4096 * 4];
12 memset (x, 'x', 4096);
13 memset (z, 'z', 4096);
16 for (i = 0; i <= 5; i++)
18 fwrite (x, 4096, 1, f);
19 fwrite (z, 4096, 1, f);
23 fread (m, 4096 * 4 - 10, 1, f);
25 printf ("got %s (should be %s)\n", b, "zzzzzzzzzzxxxxxxxxxx");
26 if (strcmp (b, "zzzzzzzzzzxxxxxxxxxx"))
29 fseek (f, -40, SEEK_CUR);
31 printf ("got %s (should be %s)\n", b, "zzzzzzzzzzzzzzzzzzzz");
32 if (strcmp (b, "zzzzzzzzzzzzzzzzzzzz"))
36 printf ("got %s (should be %s)\n", b, "zzzzzzzzzzxxxxxxxxxx");
37 if (strcmp (b, "zzzzzzzzzzxxxxxxxxxx"))
41 printf ("got %s (should be %s)\n", b, "xxxxxxxxxxxxxxxxxxxx");
42 if (strcmp (b, "xxxxxxxxxxxxxxxxxxxx"))