| delorie.com/archives/browse.cgi | search |
| Date: | Fri, 3 Feb 95 15:11:46 EST |
| From: | peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock) |
| To: | brian AT godzilla DOT MicroUnity DOT com |
| Cc: | djgpp AT sun DOT soe DOT clarkson DOT edu |
| Subject: | Re: fwrite and dos files |
| Reply-To: | babcock AT cfa DOT harvard DOT edu |
> When I look at the output file with debug, I find that all of my 0xa (LF)
> have been replaced by 0x0d 0x0a (CR/LF).
>
> ofile = fopen("splat.out","w");
Try ofile = fopen("splat.out","wb"); to open in binary mode. By default,
you get text mode which translates LF to CR/LF on output.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |