From 05753557ce2508a330a4232b4d1f0de7d7ae83cb Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 17 Mar 2002 10:58:07 +0000 Subject: [PATCH] Cosmetic change git-svn-id: svn://svn.cc65.org/cc65/trunk@1196 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/pragma.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/cc65/pragma.c b/src/cc65/pragma.c index 125bc22b6..5103063c3 100644 --- a/src/cc65/pragma.c +++ b/src/cc65/pragma.c @@ -60,6 +60,7 @@ /* Tokens for the #pragmas */ typedef enum { + PR_ILLEGAL = -1, PR_BSSSEG, PR_CHARMAP, PR_CHECKSTACK, @@ -69,15 +70,15 @@ typedef enum { PR_RODATASEG, PR_SIGNEDCHARS, PR_STATICLOCALS, - PR_ZPSYM, - PR_ILLEGAL + PR_ZPSYM, + PR_COUNT } pragma_t; /* Pragma table */ static const struct Pragma { const char* Key; /* Keyword */ pragma_t Tok; /* Token */ -} Pragmas[] = { +} Pragmas[PR_COUNT] = { { "bssseg", PR_BSSSEG }, { "charmap", PR_CHARMAP }, { "checkstack", PR_CHECKSTACK }, @@ -90,9 +91,6 @@ static const struct Pragma { { "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; - 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; } -- 2.39.5