summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2009-06-05 01:17:29 +0000
committerPaul Smith <psmith@gnu.org>2009-06-05 01:17:29 +0000
commit71385e12250ea56ddb2186f22a3f741684562ac5 (patch)
tree0019528d008184f579bacd2e5af9c37e323d403a /read.c
parent81f3e4babd128f6740d05b371122762924522fb6 (diff)
downloadgunmake-71385e12250ea56ddb2186f22a3f741684562ac5.tar.gz
- Add forgotten variable/define test suite
- Skip initial whitespace including formfeeds, vertical tab, etc. - Add tests for that - Fix the variable/SHELL test; it was wrong!
Diffstat (limited to 'read.c')
-rw-r--r--read.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/read.c b/read.c
index 6ecc2ca..aa13a21 100644
--- a/read.c
+++ b/read.c
@@ -680,9 +680,14 @@ eval (struct ebuffer *ebuf, int set_default)
collapse_continuations (collapsed);
remove_comments (collapsed);
+ /* Get rid if starting space (including formfeed, vtab, etc.) */
+ p = collapsed;
+ while (isspace ((unsigned char)*p))
+ ++p;
+
/* See if this is a variable assignment. We need to do this early, to
allow variables with names like 'ifdef', 'export', 'private', etc. */
- p = parse_var_assignment(collapsed, &vmod);
+ p = parse_var_assignment(p, &vmod);
if (vmod.assign_v)
{
struct variable *v;