This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: tty.c driver bug?
- To: Jonathan Larmour <jlarmour at redhat dot co dot uk>
- Subject: Re: [ECOS] tty.c driver bug?
- From: Chris Gray <gray at smartmove-eu dot com>
- Date: Fri, 7 Apr 2000 11:05:52 +0200 (CEST)
- cc: ecos-discuss at sourceware dot cygnus dot com, patrick at softprocess dot com
- Reply-To: chris dot gray at smartmove-eu dot com
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