Mail Archives: djgpp/1995/12/12/20:16:05
> f2 = fopen("out.2", "w");
^
First, just a "w" defaults to "wt" (text mode). In DOS new lines (0x0d)
are replaced with a carriage return/line feed combination (0x0d 0x0a).
In UNIX new lines are simply new lines (profound ain't it).
So, if you are indeed writing arbitrary bytes to the file open it
with mode "wb" (binary). This will work for both DOS and UNIX.
Regards,
Dave Montgomery
---
.--===========. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=.--=========.- Dave Montgomery
==.--=======.-- Versus Technologies Inc.
===.--=====.--- 181 Bay Street, Suite 3810
====.--===.---- Toronto, Ontario M5J 2T3
=====.--=.----- Ph 214-1960 x5773 Fax 864-3918
======.-.------ E-mail: dmont AT tradeit DOT com
=======.------- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
V E R S U S
- Raw text -