This is the mail archive of the
newlib-cvs@sourceware.org
mailing list for the newlib project.
[newlib-cygwin] rl78: Don't output CR when LF is encountered in write().
- From: Kevin Buettner <kevinb at sourceware dot org>
- To: newlib-cvs at sourceware dot org
- Date: 16 Dec 2015 20:39:00 -0000
- Subject: [newlib-cygwin] rl78: Don't output CR when LF is encountered in write().
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=725532a3b2019ff7804a44b4cd97242e60a919b1
commit 725532a3b2019ff7804a44b4cd97242e60a919b1
Author: Kevin Buettner <kevinb@redhat.com>
Date: Mon Dec 14 20:41:53 2015 -0700
rl78: Don't output CR when LF is encountered in write().
The file libgloss/rl78/write.c currently contains code which outputs
\r when \n is seen. The code will then output the \n as well.
This patch removes the bit of code that tests for \n and then outputs
\r.
I made this change to fix some failures in gdb.base/call-ar-st.exp. In
that test, I see two carriage returns followed by a newline. One CR is
output by the libgloss code. The other is output by the terminal driver.
The total list of failures fixed (using the default rl78 multilib) are:
FAIL: gdb.base/call-ar-st.exp: print print_double_array(double_array) (timeout)
FAIL: gdb.base/call-ar-st.exp: print print_char_array(char_array) (timeout)
FAIL: gdb.base/call-ar-st.exp: continue to tbreak2 (timeout)
FAIL: gdb.base/call-ar-st.exp: continuing to tbreak3 (timeout)
FAIL: gdb.base/call-ar-st.exp: print print_double_array(array_d) (timeout)
FAIL: gdb.base/call-ar-st.exp: continuing to tbreak4 (timeout)
FAIL: gdb.base/call-ar-st.exp: print sum_array_print(10, *list1, *list2, *list3, *list4) (timeout)
FAIL: gdb.base/call-ar-st.exp: print print_small_structs (timeout)
FAIL: gdb.base/call-ar-st.exp: print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065) (timeout)
FAIL: gdb.base/call-ar-st.exp: print print_small_structs from print_long_arg_list (timeout)
FAIL: gdb.base/call-ar-st.exp: print print_struct_rep(*struct1, *struct2, *struct3) (timeout)
FAIL: gdb.base/dprintf.exp: call: printf: 1st dprintf (timeout)
FAIL: gdb.base/dprintf.exp: call: printf: 2nd dprintf (timeout)
FAIL: gdb.base/interrupt.exp: process is alive (the program exited)
There are no regressions.
libgloss/ChangeLog:
* rl78/write.c (_write): Don't output CR when LF is encountered.
Diff:
---
libgloss/ChangeLog | 4 ++++
libgloss/rl78/write.c | 2 --
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index 6556028..fbab758 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -1,3 +1,7 @@
+2015-12-16 Kevin Buettner <kevinb@redhat.com>
+
+ * rl78/write.c (_write): Don't output CR when LF is encountered.
+
2015-12-04 Nick Clifton <nickc@redhat.com>
* msp430/msp430xl-sim.ld (__high_bsssize): Define.
diff --git a/libgloss/rl78/write.c b/libgloss/rl78/write.c
index 0b42220..849470c 100644
--- a/libgloss/rl78/write.c
+++ b/libgloss/rl78/write.c
@@ -101,8 +101,6 @@ _write(int fd, char *ptr, int len)
while (len != 0)
{
- if (*ptr == '\n')
- tputc ('\r');
tputc (*ptr);
ptr ++;
len --;