CRLF vs (just) LF

Ralf Corsepius corsepiu at faw.uni-ulm.de
Thu Jan 17 12:15:22 UTC 2002


Am Don, 2002-01-17 um 12.48 schrieb Jarl Friis:
> I just installed and ran the rtems-hello.c program.
> 
> One thing that I find annoying is that the "\n" character in the
> printf string translates to CR LF (two bytes). I expected that it
> would as on any other relevant OS generate only LF. I doubt this is an
> RTEMS issue but related to the sparc-rtems-gcc version found on
> www.gaisler.com.
> 
> Can someone direct of where to start to look to resolve this problem?
* termios, c.f. [I|O]CRNL, [I|O]NLCR etc.

* console-drivers: AFAIK, some (non-termios-based) console drivers apply
LF->CRLF conversion (Note: These are console-drivers, not serial
drivers, being applicable for general serial IO purposes.)

* Check the settings of your terminal.

Ralf





More information about the users mailing list