Mail Archives: djgpp/1997/05/10/10:04:07
Stephan Weber wrote:
> . . . one of the characters in EPROM2 is a '0x0A'
> fputc/fprintf sends a '0x0D 0x0A' to the stream.
>
> I checked the field EPROM2[j] with a printf and
> there is really just the '0x0A' with no '0x0D'
> before it.
>
> How can I suppress this behavier of fputc/fprintf?
Open the file in binary mode. Add a `b' in the mode string sent to fopen.
> Are there any other hidden (DOS/ASCII) conversions?
This is complaint ANSI C. If you want to deal with the data itself,
always open it in binary mode.
--
Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
Alcyone Systems / web / http://www.alcyone.com/max/
San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W
\
"The future / is right there."
/ Bill Moyers
- Raw text -