This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
[PATCH] io.sgml \n\r <=> \r\n
- From: Billy <billy at DaDaDaDa dot net>
- To: ecos-discuss <ecos-discuss at sources dot redhat dot com>
- Date: Tue, 4 Nov 2003 17:20:30 -0500
- Subject: [ECOS] [PATCH] io.sgml \n\r <=> \r\n
In the TTY docs, the CRLFs are always expressed as '\n\r'...
(See http://sources.redhat.com/ecos/docs-latest/ref/io-tty-driver.html)
I had to check that the tty code actually does the right thing.
Here's a correction to the docs..
Index: ecos/packages/io/common/current/doc/io.sgml
===================================================================
RCS file: /cvs/ecos/packages/io/common/current/doc/io.sgml,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 io.sgml
--- ecos/packages/io/common/current/doc/io.sgml 17 Apr 2003 21:49:02 -0000 1.1.1.1
+++ ecos/packages/io/common/current/doc/io.sgml 4 Nov 2003 22:18:53 -0000
@@ -839,12 +839,12 @@
<literal>CYG_TTY_OUT_FLAGS_xxx</literal> values below. </PARA>
<PROGRAMLISTING>
-#define CYG_TTY_OUT_FLAGS_CRLF 0x0001 // Map '\n' => '\n\r' on output
+#define CYG_TTY_OUT_FLAGS_CRLF 0x0001 // Map '\n' => '\r\n' on output
</PROGRAMLISTING>
<PARA>If this bit is set in <structfield>tty_out_flags</structfield>,
any occurrence of the character "\n" will
-be replaced by the sequence "\n\r" before
+be replaced by the sequence "\r\n" before
being sent to the device.</PARA>
<PARA>The field <structfield><!-- <index></index> -->tty_in_flags</structfield>
@@ -861,12 +861,12 @@
most keyboards) will be mapped to "\n".</PARA>
<PROGRAMLISTING>
-#define CYG_TTY_IN_FLAGS_CRLF 0x0002 // Map '\n\r' => '\n' on input
+#define CYG_TTY_IN_FLAGS_CRLF 0x0002 // Map '\r\n' => '\n' on input
</PROGRAMLISTING>
<PARA>
If this bit is set in <structfield>tty_in_flags</structfield>, the
-character sequence "\n\r" (often sent by DOS/Windows
+character sequence "\r\n" (often sent by DOS/Windows
based terminals) will be mapped to "\n". </PARA>
<PROGRAMLISTING>
@@ -916,7 +916,7 @@
<PARA>This function is used to send data to the device. In the default
case, the end-of-line character "\n" is replaced by the
-sequence "\n\r". </PARA>
+sequence "\r\n". </PARA>
<PROGRAMLISTING>
cyg_io_get_config(handle, key, buf, len)
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss