From: earnie_boyd AT yahoo DOT com (Earnie Boyd) Subject: Re: Which of cygwin32's design goals does ascii file conversion fulfil? 25 Oct 1998 09:57:57 -0800 Message-ID: <19981025021958.1014.rocketmail.cygnus.gnu-win32@send1e.yahoomail.com> Reply-To: earnie_boyd AT yahoo DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: David Fox , gnu-win32 AT cygnus DOT com ---David Fox wrote: > > As I have noted before, there are two types of cygwin32 users, those > who are trying to make their Windows box feel more Unixy, and those > who are porting Unix code to Windows. It seems to me that neither of > these groups has any need for DOS ``text mode'' conversion (where > lines are terminated by CR-LF.) Why not make binary mode the one and > only default once and for all? > > There's probably a good reason that I'm not aware of... The reason is that Win32 filesystem default is to have \r\n or text mode files. The idea for having text mode as the default is that it is the default for the native platform. You could set everything to binary but you would still have to _PORT_ the program to handle the \r when it reads it and not choke on it. Setting the default processing mode to binary only creates a different set of problems. There seem to more problems related to having binary mode set than not having binary mode set. By having text mode mounts I never have to worry about a \r getting in the way. My shell scripts work all of the time. I don't have to worry whether my program source files contain \r\n. I don't have to worry about MS's programs (like notepad) not being able to properly display the file. If I were to change this to binary mode, I'd have a lot to worry about now wouldn't I. Let me state this again: For portability: files that are known to carry binary data specify that it is binary data and files that are supposed to be read as ascii text files _specify_ that it is _text_ data. DO NOT _ASSUME_ THAT THE DEFAULTS FOR ANY OPTION OR PARAMETER FOR ANY FUNCTION ARE GOING TO REMAIN CONSTANT. If programs are _properly_ported_ then the user/administrator doesn't need to be concerned with the data that is read by a program. This will keep them happy and make you more productive with problems of real concern. When I'm taking care of users needs I don't want to be bothered with things like a \r in a file causing a program to abort and other administrators and maintainers of systems don't want to be bothered with it either. So to conclude, the best advice I can give on this matter is to PROPERLY PORT the programs so that a \r doesn't cause _you_ or _anyone_else_ to have to stop being productive to wait on a filter to remove \r's from the files. If you don't do this then you will have the same problem over and over again. Want proof, read the archives of this list. == - \\||// -------------o0O0--Earnie--0O0o-------------- -- earnie_boyd AT yahoo DOT com -- -- http://www.freeyellow.com/members5/gw32 -- ----------------ooo0O--O0ooo----------------- PS: Newbie's, you should visit my page. _________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com - 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".