1989-02-07 11:04:05 +00:00
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
1994-06-27 08:03:14 +00:00
|
|
|
/* $Id$ */
|
1989-02-07 11:04:05 +00:00
|
|
|
/* PREPROCESSOR: PRAGMA INTERPRETER */
|
|
|
|
|
2013-05-12 19:45:55 +00:00
|
|
|
#include "parameters.h"
|
2019-02-18 16:42:15 +00:00
|
|
|
#include "pragma.h"
|
|
|
|
#include "skip.h"
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
#define P_UNKNOWN 0
|
1990-01-31 11:52:40 +00:00
|
|
|
#define NR_PRAGMAS 0
|
1989-02-07 11:04:05 +00:00
|
|
|
|
2019-02-18 16:42:15 +00:00
|
|
|
struct pkey
|
|
|
|
{
|
1989-02-07 11:04:05 +00:00
|
|
|
char *pk_name;
|
|
|
|
int pk_key;
|
2019-02-18 16:42:15 +00:00
|
|
|
} pragmas[NR_PRAGMAS + 1] =
|
|
|
|
{
|
|
|
|
{ 0, P_UNKNOWN } };
|
1989-02-07 11:04:05 +00:00
|
|
|
|
|
|
|
extern struct idf *GetIdentifier();
|
|
|
|
|
2019-02-18 16:42:15 +00:00
|
|
|
void do_pragma(void)
|
1989-02-07 11:04:05 +00:00
|
|
|
{
|
1990-10-01 15:28:28 +00:00
|
|
|
#if NR_PRAGMAS
|
1990-01-31 11:52:40 +00:00
|
|
|
register struct pkey *pkp = &pragmas[0];
|
1990-10-01 15:28:28 +00:00
|
|
|
#endif
|
1990-01-31 11:52:40 +00:00
|
|
|
register struct idf *id = GetIdentifier(1);
|
1989-02-07 11:04:05 +00:00
|
|
|
|
2019-02-18 16:42:15 +00:00
|
|
|
if (id != (struct idf *) 0)
|
|
|
|
{
|
1990-01-31 11:52:40 +00:00
|
|
|
#if NR_PRAGMAS
|
2019-02-18 16:42:15 +00:00
|
|
|
while(pkp->pk_name)
|
|
|
|
{
|
1989-02-07 11:04:05 +00:00
|
|
|
if (strcmp(pkp->pk_name, id->id_text) == 0)
|
2019-02-18 16:42:15 +00:00
|
|
|
break;
|
1990-01-31 11:52:40 +00:00
|
|
|
pkp++;
|
|
|
|
}
|
1989-02-07 11:04:05 +00:00
|
|
|
|
2019-02-18 16:42:15 +00:00
|
|
|
switch (pkp->pk_key)
|
|
|
|
{
|
|
|
|
case P_UNKNOWN:
|
|
|
|
default:
|
1989-02-07 11:04:05 +00:00
|
|
|
break;
|
|
|
|
}
|
1990-01-31 11:52:40 +00:00
|
|
|
#endif
|
1989-10-18 13:12:31 +00:00
|
|
|
SkipToNewLine();
|
1989-02-07 11:04:05 +00:00
|
|
|
}
|
|
|
|
}
|