[ECOS] tty.c driver bug?

Chris Gray gray@smartmove-eu.com
Fri Apr 7 02:04:00 GMT 2000


On Fri, 7 Apr 2000, Jonathan Larmour wrote:

> Gary Thomas wrote:
> > > Patrick O'Grady wrote:
> >  Might be a
> > >> good idea that CYG_TTY_IN_FLAGS_CRLF returns a single '\n' for either
> > >> '\r\n' or '\n\r'...  I've seen some lame systems which output those
> > >> characters in reverse.  Cheers!
> 
> Well, in that mode it's easiest just to pretend the '\r' didn't exist.

Unless you also want to handle systems which output just '\r' (e.g. MacOS
uses \r internally as a record terminator.)

I happen to have a table of termios flgs open on my desk (I must have done
something pretty evil in my previous life), and I see options to map CR to
NL, map NL to CR, and ignore CR completely.  Another data point: method
readLine of Java class java/io/BufferedReader is defined to accept
'\n', '\r', or '\r\n' (but not the '\n\r' mutant). 

-- 

  Eur. Ing. Chris Gray MBCS C. Eng.       chris.gray@smartmove.be



More information about the Ecos-discuss mailing list