diff options
Diffstat (limited to 'libX11/src/RdBitF.c')
-rw-r--r-- | libX11/src/RdBitF.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/libX11/src/RdBitF.c b/libX11/src/RdBitF.c index 07967aebe..e9a509c55 100644 --- a/libX11/src/RdBitF.c +++ b/libX11/src/RdBitF.c @@ -54,22 +54,23 @@ from The Open Group. #define MAX_SIZE 255 /* shared data for the image read/parse logic */ -static const short hexTable[256] = { - ['0'] = 0, ['1'] = 1, - ['2'] = 2, ['3'] = 3, - ['4'] = 4, ['5'] = 5, - ['6'] = 6, ['7'] = 7, - ['8'] = 8, ['9'] = 9, - ['A'] = 10, ['B'] = 11, - ['C'] = 12, ['D'] = 13, - ['E'] = 14, ['F'] = 15, - ['a'] = 10, ['b'] = 11, - ['c'] = 12, ['d'] = 13, - ['e'] = 14, ['f'] = 15, - - [' '] = -1, [','] = -1, - ['}'] = -1, ['\n'] = -1, - ['\t'] = -1 +static const signed char hexTable[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + ,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0 + , 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0 + , 0, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + , 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /* |