This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: tty.c driver bug?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]