#define INS 327680/* input buffer */ #define OBS 8092/* output buffer */ #define NARG 32/* Max number arguments to a macro */ #define NINCLUDE 48/* Max number of include directories (-I) */ #define NIF 64/* depth of nesting of #if */ #define NINC 32/* depth of nesting of #include */
#define ISDEFINED 0x01 /* has #defined value */ #define ISKW 0x02 /* is PP keyword */ #define ISUNCHANGE 0x04 /* can't be #defined in PP */ #define ISMAC 0x08 /* builtin macro, e.g. __LINE__ */ #define ISARCHITECTURE 0x10 /* architecture */ #define ISACTIVE 0x80 /* is macro currently expanded */
#define EOB 0xFE /* sentinel for end of input buffer */ #define EOFC 0xFD /* sentinel for end of input file */
typedefstruct token
{ unsignedchar type;
size_t wslen;
size_t len;
uchar *t; unsignedint identifier; /* used from macro processor to identify where a macro becomes valid again. */
} Token;
typedefstruct tokenrow
{
Token *tp; /* current one to scan */
Token *bp; /* base (allocated value) */
Token *lp; /* last+1 token used */
size_t max; /* number allocated */
} Tokenrow;
typedefstruct source
{ char *filename; /* name of file of the source */ int line; /* current line number */ int lineinc; /* adjustment for \\n lines */
uchar *inb; /* input buffer */
uchar *inp; /* input pointer */
uchar *inl; /* end of input */ int fd; /* input source */ int ifdepth; /* conditional nesting in include */ int pathdepth; int wrap; struct source *next; /* stack for #include */
} Source;
typedefstruct nlist
{ struct nlist *next;
uchar *name;
size_t len;
Tokenrow *vp; /* value as macro */
Tokenrow *ap; /* list of argument names, if any */ char val; /* value as preprocessor name */ char flag; /* is defined, is pp name */
uchar *loc; /* location of definition */
} Nlist;
/* Checks if one of the validators within the list points to thetokenin_pTokenToCheck.Ifso,themacroissetvalidand thevalidatorisremoved.
*/ void mvl_check(
MacroValidatorList *
inout_pValidators,
Token const * inout_pTokenToCheck);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.