From 5e4b4e1c1142a747fa1ba6286639b4d82d80f4ce Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Tue, 24 Mar 2015 22:06:35 +0300 Subject: Eat trailing spaces in sun mode --- read.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'read.c') diff --git a/read.c b/read.c index 38cdbdd..eb049ba 100644 --- a/read.c +++ b/read.c @@ -2567,6 +2567,14 @@ readline (struct ebuffer *ebuf) } #endif + /* In SunOS mode strip trailing spaces. */ + if (sun_flag) + { + while ((p - start) > 1 && (p[-2] == ' ' || p[-2] == '\t')) + --p; + p[-1] = '\n'; + } + backslash = 0; for (p2 = p - 2; p2 >= start; --p2) { -- cgit v1.2.3