From 5362ef6f2001d46508357d7a66eb79fddb884771 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 15 May 1992 13:53:36 +0000 Subject: [PATCH] Filename check now only for implementation modules --- lang/m2/comp/program.g | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lang/m2/comp/program.g b/lang/m2/comp/program.g index fff51fed3..96faf91e9 100644 --- a/lang/m2/comp/program.g +++ b/lang/m2/comp/program.g @@ -235,15 +235,16 @@ definition ProgramModule { register t_def *df; - int len; } : MODULE - IDENT { len = strlen(dot.TOK_IDF->id_text); - if (len > 10) len = 10; - if (strncmp(FileName, dot.TOK_IDF->id_text, len)) { - warning(W_ORDINARY, "modulename %s does not match filename %s", dot.TOK_IDF->id_text, FileName); - } + IDENT { if (state == IMPLEMENTATION) { + int len = strlen(dot.TOK_IDF->id_text); + + if (len > 10) len = 10; + if (strncmp(FileName, dot.TOK_IDF->id_text, len)) { + warning(W_ORDINARY, "modulename %s does not match filename %s", dot.TOK_IDF->id_text, FileName); + } df = GetDefinitionModule(dot.TOK_IDF, 0); CurrVis = df->mod_vis; }