Re: Remove trailing \r when reading...

2003-01-08 Thread Lars Gullik Bjønnes
"Claus Hentschel" <[EMAIL PROTECTED]> writes: | > | > ios::text? No. It is a non-standard flag. | > | > ... | > | > ios::binary otoh is a standard flag and should work everywhere. | > | | > | So there seems not to be another way then removong those trailing \r's | the | > | way I'v done. We do nee

Re: Remove trailing \r when reading...

2003-01-08 Thread Claus Hentschel
> | > ios::text? No. It is a non-standard flag. > | > ... > | > ios::binary otoh is a standard flag and should work everywhere. > | > | So there seems not to be another way then removong those trailing \r's the > | way I'v done. We do need that in all cases where text read from a (binary) > | opene

Re: Remove trailing \r when reading...

2003-01-08 Thread Lars Gullik Bjønnes
"Claus Hentschel" <[EMAIL PROTECTED]> writes: | > | > Of course it could be done easier with | > | > ifstream ifs(tmp.c_str(), ios::in | ios::text); | > | > Maybe we should include that instead ;-) And we can rewrite all calls | to | > | > open a file for both reading and writing. | > | | > |

Re: Remove trailing \r when reading...

2003-01-08 Thread Claus Hentschel
> | > Of course it could be done easier with > | > ifstream ifs(tmp.c_str(), ios::in | ios::text); > | > Maybe we should include that instead ;-) And we can rewrite all calls to > | > open a file for both reading and writing. > | > | Does that work? No, not with gcc, because gcc is conform wit

Re: Remove trailing \r when reading...

2003-01-08 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Wed, Jan 08, 2003 at 09:55:18AM +0100, Claus Hentschel wrote: | > Lyx should run independent from the mode a drive is mounted. Therefore we | > need binary mode in some cases and text mode in some other cases whereas in | > most cases it doesn't matte

Re: Remove trailing \r when reading...

2003-01-08 Thread Andre Poenitz
On Wed, Jan 08, 2003 at 09:55:18AM +0100, Claus Hentschel wrote: > Lyx should run independent from the mode a drive is mounted. Therefore we > need binary mode in some cases and text mode in some other cases whereas in > most cases it doesn't matter. > > Of course it could be done easier with >

Re: Remove trailing \r when reading...

2003-01-08 Thread Claus Hentschel
> > Not with Win32! Have a look into src/support/os_win32.C. There > > os::read:mode() does return "rb" for Win32! > > I think this has nothing to do with the \r in LaTeX.C. There an ordinary > ifstream is used without giving the std::ios_base::binary flag, so this > should read in text mode. > > W

Re: Remove trailing \r when reading...

2003-01-07 Thread Andre Poenitz
On Tue, Jan 07, 2003 at 06:13:36PM +0100, Claus Hentschel wrote: > > > That's the reason! In Lyx we do open *all* files the same way, i.e. in > > > binary mode by default. > > > > No, the default mode is text. > > Not with Win32! Have a look into src/support/os_win32.C. There > os::read:mode() doe

Re: Remove trailing \r when reading...

2003-01-07 Thread Claus Hentschel
> > That's the reason! In Lyx we do open *all* files the same way, i.e. in > > binary mode by default. > > No, the default mode is text. Not with Win32! Have a look into src/support/os_win32.C. There os::read:mode() does return "rb" for Win32! > > To distinguish between text/binary mode we should

Re: Remove trailing \r when reading...

2003-01-07 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Tue, Jan 07, 2003 at 05:42:53PM +0100, Lars Gullik Bjønnes wrote: >> | That's the reason! In Lyx we do open *all* files the same way, i.e. in >> | binary mode by default. >> >> On a win box text mode is default... > | To be precise: text mode is ever

Re: Remove trailing \r when reading...

2003-01-07 Thread Andre Poenitz
On Tue, Jan 07, 2003 at 05:42:53PM +0100, Lars Gullik Bjønnes wrote: > | That's the reason! In Lyx we do open *all* files the same way, i.e. in > | binary mode by default. > > On a win box text mode is default... To be precise: text mode is everywhere default. But there is no difference between t

Re: Remove trailing \r when reading...

2003-01-07 Thread Lars Gullik Bjønnes
"Claus Hentschel" <[EMAIL PROTECTED]> writes: | > Lars> Andre Poenitz <[EMAIL PROTECTED]> writes: | > Lars> | On Tue, Jan 07, 2003 at 12:31:00PM +0100, Andre' Poenitz wrote: | > Lars> | > I just got confirmation from de.comp.lang.iso-c++ that | > | > Lars> getline() should never return the '\r' if

Re: Remove trailing \r when reading...

2003-01-07 Thread Andre Poenitz
On Tue, Jan 07, 2003 at 05:27:33PM +0100, Claus Hentschel wrote: > > Lars> Andre Poenitz <[EMAIL PROTECTED]> writes: > > Lars> | On Tue, Jan 07, 2003 at 12:31:00PM +0100, Andre' Poenitz wrote: > > Lars> | > I just got confirmation from de.comp.lang.iso-c++ that | > > > Lars> getline() should never

Re: Remove trailing \r when reading...

2003-01-07 Thread Claus Hentschel
> Lars> Andre Poenitz <[EMAIL PROTECTED]> writes: > Lars> | On Tue, Jan 07, 2003 at 12:31:00PM +0100, Andre' Poenitz wrote: > Lars> | > I just got confirmation from de.comp.lang.iso-c++ that | > > Lars> getline() should never return the '\r' if the stream is in | > > Lars> text mode. That's the re

Re: Remove trailing \r when reading...

2003-01-07 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Andre Poenitz <[EMAIL PROTECTED]> writes: Lars> | On Tue, Jan 07, 2003 at 12:31:00PM +0100, Andre' Poenitz wrote: Lars> | > I just got confirmation from de.comp.lang.iso-c++ that | > Lars> getline() should never return the '\r'

Re: Remove trailing \r when reading...

2003-01-07 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Tue, Jan 07, 2003 at 12:31:00PM +0100, Andre' Poenitz wrote: | > I just got confirmation from de.comp.lang.iso-c++ that | > getline() should never return the '\r' if the stream is in | > text mode. | | Next asnwer says: This is a well-known bug

Re: Remove trailing \r when reading...

2003-01-07 Thread Andre Poenitz
On Tue, Jan 07, 2003 at 12:31:00PM +0100, Andre' Poenitz wrote: > I just got confirmation from de.comp.lang.iso-c++ that > getline() should never return the '\r' if the stream is in > text mode. Next asnwer says: This is a well-known bug in some Borland Compiler ("BCB5"). Upgrading or using