From mboxrd@z Thu Jan 1 00:00:00 1970 From: "E. Robert Tisdale" To: cygwin@sourceware.cygnus.com Subject: Re: setmode (long) Date: Thu, 25 Feb 1999 12:12:00 -0000 Message-id: <36D5ADF0.C5FC769@netwood.net> References: <3.0.5.32.19990225144311.0084fc50@pop.ne.mediaone.net> X-SW-Source: 1999-02/msg00843.html Pierre A. Humblet wrote: > I had a second look (b20.1 on win95) at your problem > and it's not what I thought initially, > i.e. a basic problem with the cygwin layer in b20.1, > which tends to open too many files as binary. > > In your output, each time you look at test.out > the FIRST return of setmode is the same as the argument of setmode, > i.e. O_TEXT. Thus in all your runs the file was initially TEXT, > although the output appears to be binary. > At any rate setmode had no effect. > > Next I duplicated your experiments (standard g++ in b20.1 only). > I don't trust editors to look at CR in files and used "od -c test.out". > That shows an extra ^M on all lines compared to your output. > On a binary mounted system test.out is initially binary (as it should), > but the output is the same. Also setmode works for stdout. > > Next I wrote a similar test in C. There setmode works as expected. > > I am wondering what you see if you look at your files with od -c, > and if you agree that setmode works in a C program > (that would point to a C++ error (?)) I verified the results of `vi' (`vim' not `elvis') with the results of `od' before I sent the original message. I included the results from `vi' in my original message because they are easier to read. I thought it would be obvious from the `test.dos' and `test.cyg' output that `vi' accurately represented the actual contents of the file. Do `vi' and `od' give you different results on your system? E. Robert Tisdale -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: "E. Robert Tisdale" To: cygwin@sourceware.cygnus.com Subject: Re: setmode (long) Date: Sun, 28 Feb 1999 23:02:00 -0000 Message-ID: <36D5ADF0.C5FC769@netwood.net> References: <3.0.5.32.19990225144311.0084fc50@pop.ne.mediaone.net> X-SW-Source: 1999-02n/msg00843.html Message-ID: <19990228230200.DVk1r5-7UVSEmPP6_yu4xzkFF_y064-JvbXuMW7bnUw@z> Pierre A. Humblet wrote: > I had a second look (b20.1 on win95) at your problem > and it's not what I thought initially, > i.e. a basic problem with the cygwin layer in b20.1, > which tends to open too many files as binary. > > In your output, each time you look at test.out > the FIRST return of setmode is the same as the argument of setmode, > i.e. O_TEXT. Thus in all your runs the file was initially TEXT, > although the output appears to be binary. > At any rate setmode had no effect. > > Next I duplicated your experiments (standard g++ in b20.1 only). > I don't trust editors to look at CR in files and used "od -c test.out". > That shows an extra ^M on all lines compared to your output. > On a binary mounted system test.out is initially binary (as it should), > but the output is the same. Also setmode works for stdout. > > Next I wrote a similar test in C. There setmode works as expected. > > I am wondering what you see if you look at your files with od -c, > and if you agree that setmode works in a C program > (that would point to a C++ error (?)) I verified the results of `vi' (`vim' not `elvis') with the results of `od' before I sent the original message. I included the results from `vi' in my original message because they are easier to read. I thought it would be obvious from the `test.dos' and `test.cyg' output that `vi' accurately represented the actual contents of the file. Do `vi' and `od' give you different results on your system? E. Robert Tisdale -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com