4 #include <support/xstdio.h>
6 char x
[4096], z
[4096], b
[21], m
[4096 * 4];
14 memset (x
, 'x', 4096);
15 memset (z
, 'z', 4096);
18 for (i
= 0; i
<= 5; i
++)
20 fwrite (x
, 4096, 1, f
);
21 fwrite (z
, 4096, 1, f
);
25 xfread (m
, 4096 * 4 - 10, 1, f
);
27 printf ("got %s (should be %s)\n", b
, "zzzzzzzzzzxxxxxxxxxx");
28 if (strcmp (b
, "zzzzzzzzzzxxxxxxxxxx"))
31 fseek (f
, -40, SEEK_CUR
);
33 printf ("got %s (should be %s)\n", b
, "zzzzzzzzzzzzzzzzzzzz");
34 if (strcmp (b
, "zzzzzzzzzzzzzzzzzzzz"))
38 printf ("got %s (should be %s)\n", b
, "zzzzzzzzzzxxxxxxxxxx");
39 if (strcmp (b
, "zzzzzzzzzzxxxxxxxxxx"))
43 printf ("got %s (should be %s)\n", b
, "xxxxxxxxxxxxxxxxxxxx");
44 if (strcmp (b
, "xxxxxxxxxxxxxxxxxxxx"))