diff options
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) |