Subject: Re: putc bug...oops
From: [email-masked] (John Gumb)

22 Jun 1998 22:47:27 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
To: [email-masked]

Hi,

Sorry - the behaviour of putc is quite correct. I should have opened
the file in binary mode to avoid <CR>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
[email-masked]
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".