1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00

Cosmetic change

git-svn-id: svn://svn.cc65.org/cc65/trunk@1196 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2002-03-17 10:58:07 +00:00
parent 1b60396980
commit 05753557ce

View File

@ -60,6 +60,7 @@
/* Tokens for the #pragmas */ /* Tokens for the #pragmas */
typedef enum { typedef enum {
PR_ILLEGAL = -1,
PR_BSSSEG, PR_BSSSEG,
PR_CHARMAP, PR_CHARMAP,
PR_CHECKSTACK, PR_CHECKSTACK,
@ -70,14 +71,14 @@ typedef enum {
PR_SIGNEDCHARS, PR_SIGNEDCHARS,
PR_STATICLOCALS, PR_STATICLOCALS,
PR_ZPSYM, PR_ZPSYM,
PR_ILLEGAL PR_COUNT
} pragma_t; } pragma_t;
/* Pragma table */ /* Pragma table */
static const struct Pragma { static const struct Pragma {
const char* Key; /* Keyword */ const char* Key; /* Keyword */
pragma_t Tok; /* Token */ pragma_t Tok; /* Token */
} Pragmas[] = { } Pragmas[PR_COUNT] = {
{ "bssseg", PR_BSSSEG }, { "bssseg", PR_BSSSEG },
{ "charmap", PR_CHARMAP }, { "charmap", PR_CHARMAP },
{ "checkstack", PR_CHECKSTACK }, { "checkstack", PR_CHECKSTACK },
@ -90,9 +91,6 @@ static const struct Pragma {
{ "zpsym", PR_ZPSYM }, { "zpsym", PR_ZPSYM },
}; };
/* Number of pragmas */
#define PRAGMA_COUNT (sizeof(Pragmas) / sizeof(Pragmas[0]))
/*****************************************************************************/ /*****************************************************************************/
@ -115,7 +113,7 @@ static pragma_t FindPragma (const char* Key)
*/ */
{ {
struct Pragma* P; struct Pragma* P;
P = bsearch (Key, Pragmas, PRAGMA_COUNT, sizeof (Pragmas[0]), CmpKey); P = bsearch (Key, Pragmas, PR_COUNT, sizeof (Pragmas[0]), CmpKey);
return P? P->Tok : PR_ILLEGAL; return P? P->Tok : PR_ILLEGAL;
} }