Kill some magic numbers and clean up some whitespace.

This commit is contained in:
Bill Currie 2011-08-20 16:30:43 +09:00
parent a759a5a376
commit 1402feafd2

View file

@ -93,8 +93,9 @@ typedef struct pldata_s { // Unparsed property list string
// Ugly defines for fast checking and conversion from char to number
#define inrange(ch,min,max) ((ch) >= (min) && (ch) <= (max))
#define char2num(ch) \
inrange((ch), '0', '9') ? ((ch) - 0x30) \
: (inrange((ch), 'a', 'f') ? ((ch) - 0x57) : ((ch) - 0x37))
(inrange((ch), '0', '9') ? ((ch) - '0') \
: 10 + (inrange((ch), 'a', 'f') ? ((ch) - 'a') \
: ((ch) - 'A')))
static byte quotable_bitmap[32];
static inline int