From: ceriel Date: Thu, 22 Nov 1990 11:25:34 +0000 (+0000) Subject: Also update WorkingDir on line directives X-Git-Tag: release-5-5~1392 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=6545b68874a71b3ba47184242276880938404aa8;p=ack.git Also update WorkingDir on line directives --- diff --git a/lang/m2/comp/LLlex.c b/lang/m2/comp/LLlex.c index 7818b0b8c..322bc181c 100644 --- a/lang/m2/comp/LLlex.c +++ b/lang/m2/comp/LLlex.c @@ -30,7 +30,8 @@ #include "const.h" #include "warning.h" -long str2long(); +extern long str2long(); +extern char *getwdir(); t_token dot, aside; @@ -225,6 +226,7 @@ CheckForLineDirective() */ if (class(ch) == STNL && strcmp(FileName,buf)) { FileName = Salloc(buf,(unsigned) strlen(buf) + 1); + WorkingDir = getwdir(FileName); } } if (class(ch) == STEOI) { diff --git a/lang/m2/comp/program.g b/lang/m2/comp/program.g index 44c19ef54..15c81b5c1 100644 --- a/lang/m2/comp/program.g +++ b/lang/m2/comp/program.g @@ -144,7 +144,9 @@ DefinitionModule MODULE IDENT { df = define(dot.TOK_IDF, GlobalScope, D_MODULE); df->df_flags |= D_BUSY | ForeignFlag; currscope->sc_definedby = df; - if (DefId && df->df_idf != DefId) { + if (DefId && + df->df_idf != DefId && + !is_anon_idf(df->df_idf)) { error("DEFINITION MODULE name is \"%s\", not \"%s\"", df->df_idf->id_text, DefId->id_text); }