Re: [CODE] Ascii pfiles and autowiz

From: Daniel A. Koepke (
Date: 06/21/01

On Thu, 21 Jun 2001, Mike Stilson wrote:

> change fopen() mode from "rb" to "r" (not positive it's necessary but
> I always do it)

It should be done, yes.  It doesn't make a difference on Unix because it
doesn't have any special text file processing to do.  But on weirder
architectures, like Windows, that need to have the operating system sneak
around behind your back to process a text file (to, say, change \n to \r\n
or vice versa).  So while on Unix binary mode does nothing, on Windows it
indicates to send the data exactly as it is and not to do any special text
file processing.

For Windows users, I suspect this means, but have never personally tested,
that writing "hello\n" with the mode "w" and reading it back with the mode
"rb" and a function like, say, get_line() would give you "hello\r".
Which might be quite confusing... And maybe even undesirable.

Daniel A. Koepke (dak),
Caveat emptor: I say what I mean and mean what I say.  Listen well.
Caveat venditor: Say what you mean, mean what you say.  Say it well.

   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/05/01 PST