Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
142 lines (139 sloc) 3.07 KB
#ifndef CHAR_H
#define CHAR_H
/*!
* Map Integer to Char
*
* Symbols are surrounded in qotes
* to ensure no interference with
* macro expansion.
*/
#define CHAR(X) JOIN(CHAR_, X)
#define CHAR_0 '\0'
#define CHAR_1 '\0x01'
#define CHAR_2 '\0x02'
#define CHAR_3 '\0x03'
#define CHAR_4 '\0x04'
#define CHAR_5 '\0x05'
#define CHAR_6 '\0x06'
#define CHAR_7 '\0x07'
#define CHAR_8 '\0x08'
#define CHAR_9 '\t'
#define CHAR_10 '\n'
#define CHAR_11 '\v'
#define CHAR_12 '\0x0C'
#define CHAR_13 '\r'
#define CHAR_14 '\0x0E'
#define CHAR_15 '\0x0F'
#define CHAR_16 '\0x10'
#define CHAR_17 '\0x11'
#define CHAR_18 '\0x12'
#define CHAR_19 '\0x13'
#define CHAR_20 '\0x14'
#define CHAR_21 '\0x15'
#define CHAR_22 '\0x16'
#define CHAR_23 '\0x17'
#define CHAR_24 '\0x18'
#define CHAR_25 '\0x19'
#define CHAR_26 '\0x1A'
#define CHAR_27 '\0x1B'
#define CHAR_28 '\0x1C'
#define CHAR_29 '\0x1D'
#define CHAR_30 '\0x1E'
#define CHAR_31 '\0x1F'
#define CHAR_32 ' '
#define CHAR_33 '!'
#define CHAR_34 '"'
#define CHAR_35 '#'
#define CHAR_36 '$'
#define CHAR_37 '%'
#define CHAR_38 '&'
#define CHAR_39 '\''
#define CHAR_40 '('
#define CHAR_41 ')'
#define CHAR_42 '*'
#define CHAR_43 '+'
#define CHAR_44 ','
#define CHAR_45 '-'
#define CHAR_46 '.'
#define CHAR_47 '/'
#define CHAR_48 '0'
#define CHAR_49 '1'
#define CHAR_50 '2'
#define CHAR_51 '3'
#define CHAR_52 '4'
#define CHAR_53 '5'
#define CHAR_54 '6'
#define CHAR_55 '7'
#define CHAR_56 '8'
#define CHAR_57 '9'
#define CHAR_58 ':'
#define CHAR_59 ';'
#define CHAR_60 '<'
#define CHAR_61 '='
#define CHAR_62 '>'
#define CHAR_63 '?'
#define CHAR_64 '@'
#define CHAR_65 'A'
#define CHAR_66 'B'
#define CHAR_67 'C'
#define CHAR_68 'D'
#define CHAR_69 'E'
#define CHAR_70 'F'
#define CHAR_71 'G'
#define CHAR_72 'H'
#define CHAR_73 'I'
#define CHAR_74 'J'
#define CHAR_75 'K'
#define CHAR_76 'L'
#define CHAR_77 'M'
#define CHAR_78 'N'
#define CHAR_79 'O'
#define CHAR_80 'P'
#define CHAR_81 'Q'
#define CHAR_82 'R'
#define CHAR_83 'S'
#define CHAR_84 'T'
#define CHAR_85 'U'
#define CHAR_86 'V'
#define CHAR_87 'W'
#define CHAR_88 'X'
#define CHAR_89 'Y'
#define CHAR_90 'Z'
#define CHAR_91 '['
#define CHAR_92 '\\'
#define CHAR_93 ']'
#define CHAR_94 '^'
#define CHAR_95 '_'
#define CHAR_96 '`'
#define CHAR_97 'a'
#define CHAR_98 'b'
#define CHAR_99 'c'
#define CHAR_100 'd'
#define CHAR_101 'e'
#define CHAR_102 'f'
#define CHAR_103 'g'
#define CHAR_104 'h'
#define CHAR_105 'i'
#define CHAR_106 'j'
#define CHAR_107 'k'
#define CHAR_108 'l'
#define CHAR_109 'm'
#define CHAR_110 'n'
#define CHAR_111 'o'
#define CHAR_112 'p'
#define CHAR_113 'q'
#define CHAR_114 'r'
#define CHAR_115 's'
#define CHAR_116 't'
#define CHAR_117 'u'
#define CHAR_118 'v'
#define CHAR_119 'w'
#define CHAR_120 'x'
#define CHAR_121 'y'
#define CHAR_122 'z'
#define CHAR_123 '{'
#define CHAR_124 '|'
#define CHAR_125 '}'
#define CHAR_126 '~'
#define CHAR_127 '0x7F'
#endif