From: john AT Talisker DOT demon DOT co DOT uk (John Gumb) Subject: Re: putc bug...oops 22 Jun 1998 22:47:27 -0700 Message-ID: <199806222225.XAA00222.cygnus.gnu-win32@Talisker.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: gnu-win32 AT cygnus DOT com Hi, Sorry - the behaviour of putc is quite correct. I should have opened the file in binary mode to avoid s being added to 0x0a characters under WIN32 thus: outfile = fopen("d.dat","wb"); From the Linux fopen man page.... The mode string can also include the letter ``b'' either as a third character or as a character between the charac- ters in any of the two-character strings described above. This is strictly for compatibility with ANSI C3.159-1989 (``ANSI C'') and has no effect; the ``b'' is ignored. My apologies for suggesting Cygwin might be at fault. I'm somewhat new to the WIN32 environment.... At least I now have a working gcc960 toolset under Linux and Cygwin. If anyone's curious, I managed to get something going under Linux by starting compiling as if building under hpux. This then seemed to translate well to Cygwin. My guess is being close to posix is the common factor here. Looking forward to the next trap to fall straight into, John Gumb john AT talisker DOT demon DOT co DOT uk - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".