summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'read.c')
-rw-r--r--read.c8
1 files changed, 8 insertions, 0 deletions
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)
{