don't recognize any pragma's (mechanism is still present)

This commit is contained in:
eck 1990-01-31 11:52:40 +00:00
parent 01829a4203
commit 945c0dc404

View file

@ -6,30 +6,15 @@
/* PREPROCESSOR: PRAGMA INTERPRETER */ /* PREPROCESSOR: PRAGMA INTERPRETER */
#include "debug.h" #include "debug.h"
#include "arith.h"
#include "LLlex.h"
#include "Lpars.h"
#include "idf.h" #include "idf.h"
#include "input.h"
#include "ifdepth.h"
#include "botch_free.h"
#include "nparams.h"
#include "parbufsize.h"
#include "textsize.h"
#include "idfsize.h"
#include "assert.h"
#include <alloc.h>
#include "class.h"
#include "macro.h"
#define P_UNKNOWN 0 #define P_UNKNOWN 0
#define P_FLAGS 1 #define NR_PRAGMAS 0
struct pkey { struct pkey {
char *pk_name; char *pk_name;
int pk_key; int pk_key;
} pragmas[] = { } pragmas[NR_PRAGMAS + 1] = {
{"cemflags", P_FLAGS},
{0, P_UNKNOWN} {0, P_UNKNOWN}
}; };
@ -37,27 +22,23 @@ extern struct idf *GetIdentifier();
do_pragma() do_pragma()
{ {
register struct pkey *pkp; register struct pkey *pkp = &pragmas[0];
register struct idf *id; register struct idf *id = GetIdentifier(1);
struct token tk;
if ((id = GetIdentifier(1)) != (struct idf *)0) { if (id != (struct idf *)0) {
/* Lineair search - why bother ? #if NR_PRAGMAS
*/ while(pkp->pk_name) {
for (pkp = &pragmas[0]; pkp->pk_key != P_UNKNOWN; pkp++)
if (strcmp(pkp->pk_name, id->id_text) == 0) if (strcmp(pkp->pk_name, id->id_text) == 0)
break; break;
pkp++;
}
switch (pkp->pk_key) { switch (pkp->pk_key) {
case P_FLAGS:
if (GetToken(&tk) == STRING)
do_option(tk.tk_bts);
break;
case P_UNKNOWN: case P_UNKNOWN:
default: default:
break; break;
} }
#endif
SkipToNewLine(); SkipToNewLine();
} }
} }