> I am a new user of gcc-2.95.2 on a PC running Windows
> 98. Right away I discovered what seems to be a bug in
> the standard library routine fputc (and also fwrite):
> If one tries to write a single byte with integer value
> 10, fputc writes *two* bytes: 13,10. A simple test
> code (appended) illustrates this.
This is not a bug, but a platform independency feature. I expect
you will find it in almost every compiler that generates win32
It makes common unix-style "\n" writes output on win32 as:
-- bogus output file 1
-- bogus output file 2
ALWAYS open your file in binary mode if what you wish to output is
not exclusively plain ascii text.