Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <9B501B3774931C469BCCCC021BE5372277AD58@remailnt2-re01.westat.com> From: Francis Harvey To: "'cygwin AT cygwin DOT com'" Cc: "'pechtcha AT cs DOT nyu DOT edu'" Subject: RE: Install 1.3.22-1 problem - default text file type - DOS Date: Tue, 5 Aug 2003 14:43:18 -0400 MIME-Version: 1.0 Content-Type: text/plain Greetings Igor, Thanks. I have now replaced \n with \r\n every place I used \n in a character string. I have made sure not to switch the single character when used separately from a string. Everything appears to work fine now. Francis R. Harvey III WB303, x3952 harveyf1 AT westat DOT com VB programmers know the wisdom of Nothing > -----Original Message----- > From: Igor Pechtchanski [mailto:pechtcha AT cs DOT nyu DOT edu] > Sent: Tuesday, August 05, 2003 12:55 PM > To: Francis Harvey > Cc: cygwin AT cygwin DOT com > Subject: Re: Install 1.3.22-1 problem - default text file type - DOS > > > I think you misunderstood what the "text" (or DOS) mode > means. Mounting > in the "text" mode allows the files *on disk* to have the > "\r\n" newline > sequence which will be translated to "\n" upon reading the > file in default > mode (i.e., make the default mode "text"), and the reverse translation > would happen on writing. Mounting in binary mode does not perform any > character translation for default open()s, so you'll actually > see the "\r" > characters in your program. Of course, you can always override this > setting with "rt" for text and "rb" for binary... > > What your program is doing is something completely different. The C > language specification says that the '\n' character > represents the ASCII > value of NL, or 10. The '\r' character represents the ASCII > value of CR, > or 13. This won't ever be changed by the mount mode (or the "binmode" > setting in the CYGWIN variable). The mount mode only affects > interaction > with disk files (just like "binmode" affects interaction with pipes). > Igor -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/