From 7a7d0e413b9c7d466d2310f2014401a205f4d8e6 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 31 Mar 1989 11:47:12 +0000 Subject: [PATCH] recognize but ignore #pragma --- lang/cem/cemcom/domacro.c | 5 +++++ lang/cem/cemcom/init.c | 1 + lang/cem/cemcom/macro.str | 1 + 3 files changed, 7 insertions(+) diff --git a/lang/cem/cemcom/domacro.c b/lang/cem/cemcom/domacro.c index ee5288384..1b2592d99 100644 --- a/lang/cem/cemcom/domacro.c +++ b/lang/cem/cemcom/domacro.c @@ -107,6 +107,11 @@ domacro() case K_UNDEF: /* "undef" */ do_undef(); break; + case K_PRAGMA: /* "pragma" */ + /* ignore for now + */ + SkipRestOfLine(); + break; default: /* invalid word seen after the '#' */ lexerror("%s: unknown control", tk.tk_idf->id_text); diff --git a/lang/cem/cemcom/init.c b/lang/cem/cemcom/init.c index df86c5d0f..a330ffecb 100644 --- a/lang/cem/cemcom/init.c +++ b/lang/cem/cemcom/init.c @@ -29,6 +29,7 @@ PRIVATE struct mkey { {"include", K_INCLUDE}, {"line", K_LINE}, {"undef", K_UNDEF}, + {"pragma", K_PRAGMA}, {0, K_UNKNOWN} }; diff --git a/lang/cem/cemcom/macro.str b/lang/cem/cemcom/macro.str index 3979ecbee..5e129402d 100644 --- a/lang/cem/cemcom/macro.str +++ b/lang/cem/cemcom/macro.str @@ -55,4 +55,5 @@ struct mlist { #define K_INCLUDE 8 #define K_LINE 9 #define K_UNDEF 10 +#define K_PRAGMA 11 #endif NOPP