summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-11-20 19:17:22 +0400
committerIgor Pashev <pashev.igor@gmail.com>2012-11-20 19:17:22 +0400
commite8e7d57b87e09493a2bb6e2dc7f6d729b85bad5e (patch)
tree03b9b5b68ecaf558e0215f158c7e99b9c2d6f007 /read.c
parent0c56ea458f9be59827e6aa7649bd72e8001517aa (diff)
downloadmake.old-sunmake.tar.gz
Eat trailing spaces in sun modesunmake
Diffstat (limited to 'read.c')
-rw-r--r--read.c7
1 files changed, 7 insertions, 0 deletions
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)