From e8e7d57b87e09493a2bb6e2dc7f6d729b85bad5e Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Tue, 20 Nov 2012 19:17:22 +0400 Subject: Eat trailing spaces in sun mode --- read.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'read.c') diff --git a/read.c b/read.c index 5b9d03a..2556b67 100644 --- a/read.c +++ b/read.c @@ -2418,6 +2418,13 @@ readline (struct ebuffer *ebuf) p[-1] = '\n'; } #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