From 763c607bd8d82966c1c8a4028f62c671970581c6 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 11 May 1992 11:52:22 +0000 Subject: [PATCH] Added filename check --- lang/m2/comp/program.g | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lang/m2/comp/program.g b/lang/m2/comp/program.g index e4801af3e..7621f0673 100644 --- a/lang/m2/comp/program.g +++ b/lang/m2/comp/program.g @@ -235,9 +235,15 @@ definition ProgramModule { register t_def *df; + int len; } : MODULE - IDENT { if (state == IMPLEMENTATION) { + IDENT { len = strlen(dot.TOK_IDF->id_text); + if (len > 10) len = 10; + if (strncmp(FileName, dot.TOK_IDF->id_text, 10)) { + warning(W_ORDINARY, "modulename %s does not match filename %s", dot.TOK_IDF->id_text, FileName); + } + if (state == IMPLEMENTATION) { df = GetDefinitionModule(dot.TOK_IDF, 0); CurrVis = df->mod_vis; } -- 2.34.1