diff options
author | Mightyjo <mightyjo@gmail.com> | 2015-11-27 21:38:23 -0500 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2015-11-29 17:20:22 -0500 |
commit | a97cf48486226d538797ef721c62a80b9327c43f (patch) | |
tree | 9744e98330df3c31dbeced82f7ad128bb5268221 /src/sym.c | |
parent | 45db9033fefa30cdc263db6ede60807da7da89c5 (diff) |
Replaced CHAR macro with unsigned char type.
Thanks to Michael McConville for pointing out that the old Char macro
causes problems with static analysis. The macro has been removed and
replaced with 'unsigned char' throughout the flex sources. The macro is
not needed at best and was confusing at worst. It was not used in any of
the example files nor was it mentioned in the manual at all.
Diffstat (limited to 'src/sym.c')
-rw-r--r-- | src/sym.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -114,7 +114,7 @@ static int addsym (char sym[], char *str_def, int int_def, hash_table table, int /* cclinstal - save the text of a character class */ -void cclinstal (Char ccltxt[], int cclnum) +void cclinstal (unsigned char ccltxt[], int cclnum) { /* We don't bother checking the return status because we are not * called unless the symbol is new. @@ -130,7 +130,7 @@ void cclinstal (Char ccltxt[], int cclnum) * Returns 0 if there's no CCL associated with the text. */ -int ccllookup (Char ccltxt[]) +int ccllookup (unsigned char ccltxt[]) { return findsym ((char *) ccltxt, ccltab, CCL_HASH_SIZE)->int_val; } @@ -178,7 +178,7 @@ static int hashfunct (const char *str, int hash_size) /* ndinstal - install a name definition */ -void ndinstal (const char *name, Char definition[]) +void ndinstal (const char *name, unsigned char definition[]) { if (addsym (copy_string (name), @@ -193,9 +193,9 @@ void ndinstal (const char *name, Char definition[]) * Returns a nil pointer if the name definition does not exist. */ -Char *ndlookup (const char *nd) +unsigned char *ndlookup (const char *nd) { - return (Char *) findsym (nd, ndtbl, NAME_TABLE_HASH_SIZE)->str_val; + return (unsigned char *) findsym (nd, ndtbl, NAME_TABLE_HASH_SIZE)->str_val; } |