aboutsummaryrefslogtreecommitdiffstats
path: root/src/octhexdigits.h
blob: fff6866b5e11c66547e36bdeb1f2f874fbdbd1f1 (plain) (blame)
1
2
3
4
#define isoct(c) ('0' <= (c) && (c) <= '7')
#define fromoct(c) ((c) - '0')
#define fromhex(c) ('a' <= (c) && (c) <= 'f' ? (c) - 'a' + 10 : \
                     'A' <= (c) && (c) <= 'F' ? (c) - 'A' + 10 : (c) - '0')