Date: Tue, 12 Dec 1995 12:06:00 -0600 (CST) From: Aaron Ucko Subject: Re: Strange bug using 'fwrite' To: cbutler AT bnr DOT ca Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Organization: Rockhurst College; Kansas City, MO > f2 = fopen("out.2", "w"); ^^^ This should be "wb" if you want binary output. Otherwise, DJGPP's libc will convert \n into \r\n. The addition of the b should cause no portability problems--it's part of the ANSI C standard. -- Aaron Ucko (ucko AT vax1 DOT rockhurst DOT edu; finger for PGP public key) | httyp! "That's right," he said. "We're philosophers. We think, therefore we am." -- Terry Pratchett, _Small Gods_ | Geek Code 3.1 [for explanation, finger hayden AT mankato DOT msus DOT edu]: GCS/M/S/C d- s: a17 C++(+++)>++++ UL++>++++ P++ L++>+++++ E- W(-) N++(+) o+ K- w--- O M@ V-(--) PS++(+++) PE- Y(+) PGP(+) t(+) !5 X-- R(-) tv-@ b++(+++) DI+ !D-- G++(+++) e->+++++(*) h!>+ r-(--)>+++ y?