From: marcus AT bighorn DOT dr DOT lucent DOT com Subject: Re: putc bug ? 23 Jun 1998 20:05:25 -0700 Message-ID: <199806231454.IAA01595.cygnus.gnu-win32@chorus.dr.lucent.com> To: john AT Talisker DOT demon DOT co DOT uk, gnu-win32 AT cygnus DOT com, earnie_boyd AT yahoo DOT com > It's the old text vs. binary file processing mode. Under UNIX the > default mode is binary, under WIN32 the default mode is text. Yep, but under Unix there really isn't a text/binary mode, since the representations are the same. It's only on WIN32 that there are distinct text and binary modes. Thus, Unix programs can be sloppy about specifying the type of file, since the Unix libraries ignore the specification anyhow. > Work-around: > > Specify the binary mode switch on the file open functions, append a > "b" to "r" or "w" for fopen and use _O_BINARY (defined in fcntl.h) for > the open function. That's not really a "work-around", as that is actually how ANSI C says that a properly written program should be written. But, certainly that is correct advise. marcus hall - 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".