diff options
author | ru <ru@FreeBSD.org> | 2004-03-09 08:09:33 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2004-03-09 08:09:33 +0000 |
commit | a328a35e4acfafe236dcdd6247b4cc727354c0df (patch) | |
tree | 8fb086a116524fe4d339a056864755c7eb67d7e6 /usr.bin | |
parent | ed981b0de34ebc74a2cb3b45cf59eaaabccfd35b (diff) | |
download | FreeBSD-src-a328a35e4acfafe236dcdd6247b4cc727354c0df.zip FreeBSD-src-a328a35e4acfafe236dcdd6247b4cc727354c0df.tar.gz |
Fixed line numbering inside the .for loops.
Submitted by: Cyrille Lefevre
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/make/parse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 0873f6d..6be0cb1 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -112,6 +112,7 @@ typedef struct { static char *fname; /* name of current file (for errors) */ static int lineno; /* line number in current file */ +static int savedlineno; /* saved line number */ static FILE *curFILE = NULL; /* current makefile */ static PTR *curPTR = NULL; /* current makefile */ @@ -1792,7 +1793,7 @@ Parse_FromString(char *str) curFILE = NULL; curPTR = (PTR *) emalloc (sizeof (PTR)); curPTR->str = curPTR->ptr = str; - lineno = 0; + lineno = savedlineno; fname = estrdup(fname); } @@ -2277,6 +2278,7 @@ test_char: if (For_Eval(line)) { int ok; free(line); + savedlineno = lineno; do { /* * Skip after the matching end |