Subject: Re: MORE on O_TEXT/O_BINARY To: leisner AT sdsp DOT mc DOT xerox DOT com (Marty Leisner) Date: Tue, 21 Jun 1994 16:14:27 -0600 (CDT) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu From: mcastle AT umr DOT edu (Mike Castle) Amazingly enough Marty Leisner said: [deleted] > Recompiling the gnu fileutils, I needed to stick this > in the fileutils lib (or else have to change every open call > everywhere or change __fmode in each main...): [deleted] > I really think the default mode should be binary "unless you need to > do something special". I disagree. Default should be text unless you need to do something special. When I ported PBMPlus to DOS, I modified the startup code (crt0.s) to switch stdin/stdout to binary, and change default mode to binary. (Essentially, I added a function called FIXIO() to libc.a, and added a call to this function just before the call to main in the run time code). However, this approach wouldn't work for all programs, such as Eric Backus (I think) has pointed out, there are certain times when you want cat to use binary mode, and others when text is more appropriate. I think there were similar concerns with sort, but I'm not positive. mrc -- Mike Castle .-=NEXUS=-. Life is like a clock: You can work constantly mcastle AT cs DOT umr DOT edu and be right all the time, or not work at all mcastle AT umr DOT edu and be right at least twice a day. -- mrc We are all of us living in the shadow of Manhattan. -- Watchmen