8 char obuf
[99999], ibuf
[sizeof obuf
];
18 if (fputs ("line\n", f
) == EOF
)
24 memset (obuf
, 'z', sizeof obuf
);
25 memset (ibuf
, 'y', sizeof ibuf
);
27 if (fwrite (obuf
, sizeof obuf
, 1, f
) != 1)
37 if (getline (&line
, &linesz
, f
) != 5)
42 if (strcmp (line
, "line\n"))
44 puts ("Lines differ. Test FAILED!");
48 if (fread (ibuf
, sizeof ibuf
, 1, f
) != 1)
54 if (memcmp (ibuf
, obuf
, sizeof ibuf
))
56 puts ("Buffers differ. Test FAILED!");
61 GDB is free software and you are welcome to distribute copies of it\n\
62 under certain conditions; type \"show copying\" to see the conditions.\n\
63 There is absolutely no warranty for GDB; type \"show warranty\" for details.\n\
66 puts ("Test succeeded.");