blob: 7d71a97d78e1bd5ae09154eaf29feaf5092d5805 [file] [log] [blame]
adamdunkelsb9614dc2004-08-09 20:33:51 +00001/* ascii_control.h
2 *
3 * ASCII CONTROL CHARACTERS
4 * from American National Standard Code for Information Interchange X3.4-1977
5 *
6 * Abbreviations
7 *
8 * CC: communication control
9 * FE: format effector
10 * IS: information separator
11 * Delim: delimiter
12 * Intro: introducer
13 */
14
15/* ----------------------------------------------------------------------- */
16/* C0 (7-bit) set */
17/* ----------------------------------------------------------------------- */
18/* mnemonic octal decimal C meaning */
19/* ----------------------------------------------------------------------- */
20
21#define ASCII_NUL (000) /* 0 '\0' Null */
22#define ASCII_SOH (001) /* 1 Start of Heading (CC) */
23#define ASCII_STX (002) /* 2 Start of Text (CC) */
24#define ASCII_ETX (003) /* 3 End of Text (CC) */
25#define ASCII_EOT (004) /* 4 End of Transmission (CC) */
26#define ASCII_ENQ (005) /* 5 Enquiry (CC) */
27#define ASCII_ACK (006) /* 6 Acknowledge (CC) */
28#define ASCII_BEL (007) /* 7 '\a' Bell / Alert */
29#define ASCII_BS (010) /* 8 '\b' Backspace (FE) */
30#define ASCII_HT (011) /* 9 '\t' Horizontal Tabulation (FE) */
31#define ASCII_LF (012) /* 10 '\n' Line Feed / Newline (FE) */
32#define ASCII_VT (013) /* 11 '\v' Vertical Tabulation (FE) */
33#define ASCII_FF (014) /* 12 '\f' Form Feed (FE) */
34#define ASCII_CR (015) /* 13 '\r' Carriage Return (FE) */
35#define ASCII_SO (016) /* 14 Shift Out */
36#define ASCII_SI (017) /* 15 Shift In */
37#define ASCII_DLE (020) /* 16 Data Link Escape (CC) */
38#define ASCII_DC1 (021) /* 17 Device Control 1 XON */
39#define ASCII_DC2 (022) /* 18 Device Control 2 */
40#define ASCII_DC3 (023) /* 19 Device Control 3 XOFF */
41#define ASCII_DC4 (024) /* 20 Device Control 4 */
42#define ASCII_NAK (025) /* 21 Negative Acknowledge (CC) */
43#define ASCII_SYN (026) /* 22 Synchronous Idle (CC) */
44#define ASCII_ETB (027) /* 23 End of Transmission Block (CC) */
45#define ASCII_CAN (030) /* 24 Cancel */
46#define ASCII_EM (031) /* 25 End of Medium */
47#define ASCII_SUB (032) /* 26 Substitute */
48#define ASCII_ESC (033) /* 27 Escape */
49#define ASCII_FS (034) /* 28 File Separator */
50#define ASCII_GS (035) /* 29 Group Separator */
51#define ASCII_RS (036) /* 30 Record Separator */
52#define ASCII_US (037) /* 31 Unit Separator */
53
54#define ASCII_DEL (0177) /* 127 Delete */
55
56#define ASCII_NL ASCII_LF /* 10 alias for Newline */
57
58/* ----------------------------------------------------------------------- */
59/* C1 (8-bit) set (which have equivalent 7-bit multi-char sequences) */
60/* ----------------------------------------------------------------------- */
61/* mnemonic octal decimal 7-bit meaning */
62/* ----------------------------------------------------------------------- */
63
64#define ASCII_IND (0204) /* 132 Esc D Index (FE) */
65#define ASCII_NEL (0205) /* 133 Esc E Next Line (FE) */
66#define ASCII_SSA (0206) /* 134 Esc F Start Selected Area */
67#define ASCII_ESA (0207) /* 135 Esc G End Selected Area */
68#define ASCII_HTS (0210) /* 136 Esc H Horizontal Tab Set (FE) */
69#define ASCII_HTJ (0211) /* 137 Esc I Horizontal Tab w/Justificat(FE)*/
70#define ASCII_VTS (0212) /* 138 Esc J Vertical Tab Set (FE) */
71#define ASCII_PLD (0213) /* 138 Esc K Partial Line Down (FE) */
72#define ASCII_PLU (0214) /* 140 Esc L Partial Line Up (FE) */
73#define ASCII_RI (0215) /* 141 Esc M Reverse Index (FE) */
74#define ASCII_SS2 (0216) /* 142 Esc N Single Shift G2 (Intro) */
75#define ASCII_SS3 (0217) /* 143 Esc O Single Shift G3 (Intro) */
76#define ASCII_DCS (0220) /* 144 Esc P Device Control String (Delim) */
77#define ASCII_PU1 (0221) /* 145 Esc Q Private Use 1 */
78#define ASCII_PU2 (0222) /* 146 Esc R Private Use 2 */
79#define ASCII_STS (0223) /* 147 Esc S Set Transmit State */
80#define ASCII_CCH (0224) /* 148 Esc T Cancel Previous Character */
81#define ASCII_MW (0225) /* 149 Esc U Message Waiting */
82#define ASCII_SPA (0226) /* 150 Esc V Start Protected Area */
83#define ASCII_EPA (0227) /* 151 Esc W End Protected Area */
84
85#define ASCII_CSI (0233) /* 155 Esc [ Control Sequence Introducer */
86#define ASCII_ST (0234) /* 156 Esc \ String Terminator (Delim) */
87#define ASCII_OSC (0235) /* 157 Esc ] Operating System Control (Delim*/
88#define ASCII_PM (0236) /* 158 Esc ^ Privacy Message (Delim) */
89#define ASCII_APC (0237) /* 159 Esc _ Application Program Command (De*/
90
91/* ------------------------------------------------------------------------- */