summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-03-09 08:09:33 +0000
committerru <ru@FreeBSD.org>2004-03-09 08:09:33 +0000
commita328a35e4acfafe236dcdd6247b4cc727354c0df (patch)
tree8fb086a116524fe4d339a056864755c7eb67d7e6 /usr.bin
parented981b0de34ebc74a2cb3b45cf59eaaabccfd35b (diff)
downloadFreeBSD-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.c4
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
OpenPOWER on IntegriCloud