xref: /original-bsd/lib/libcurses/unctrl.c (revision 7fc379b0)
1 /*
2  * Copyright (c) 1981 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)unctrl.c	5.5 (Berkeley) 08/23/92";
10 #endif /* not lint */
11 
12 /*
13  * Define unctrl codes for each character.
14  */
15 char *__unctrl[128] = {
16 	"^@",  "^A",  "^B",  "^C",  "^D",  "^E",  "^F",  "^G",
17 	"^H",  "^I",  "^J",  "^K",  "^L",  "^M",  "^N",  "^O",
18 	"^P",  "^Q",  "^R",  "^S",  "^T",  "^U",  "^V",  "^W",
19 	"^X",  "^Y",  "^Z",  "^[", "^\\",  "^]",  "^~",  "^_",
20 	 " ",   "!",  "\"",   "#",   "$",   "%",   "&",   "'",
21 	 "(",   ")",   "*",   "+",   ",",   "-",   ".",   "/",
22 	 "0",   "1",   "2",   "3",   "4",   "5",   "6",   "7",
23 	 "8",   "9",   ":",   ";",   "<",   "=",   ">",   "?",
24 	 "@",   "A",   "B",   "C",   "D",   "E",   "F",   "G",
25 	 "H",   "I",   "J",   "K",   "L",   "M",   "N",   "O",
26 	 "P",   "Q",   "R",   "S",   "T",   "U",   "V",   "W",
27 	 "X",   "Y",   "Z",   "[",  "\\",   "]",   "^",   "_",
28 	 "`",   "a",   "b",   "c",   "d",   "e",   "f",   "g",
29 	 "h",   "i",   "j",   "k",   "l",   "m",   "n",   "o",
30 	 "p",   "q",   "r",   "s",   "t",   "u",   "v",   "w",
31 	 "x",   "y",   "z",   "{",   "|",   "}",   "~",   "^?",
32 };
33 
34 /* The length of the characters in the above array. */
35 char __unctrllen[128] = {
36 	   2,     2,     2,     2,     2,     2,     2,     2,
37 	   2,     2,     2,     2,     2,     2,     2,     2,
38 	   2,     2,     2,     2,     2,     2,     2,     2,
39 	   2,     2,     2,     2,     2,     2,     2,     2,
40 	   1,     1,     1,     1,     1,     1,     1,     1,
41 	   1,     1,     1,     1,     1,     1,     1,     1,
42 	   1,     1,     1,     1,     1,     1,     1,     1,
43 	   1,     1,     1,     1,     1,     1,     1,     1,
44 	   1,     1,     1,     1,     1,     1,     1,     1,
45 	   1,     1,     1,     1,     1,     1,     1,     1,
46 	   1,     1,     1,     1,     1,     1,     1,     1,
47 	   1,     1,     1,     1,     1,     1,     1,     1,
48 	   1,     1,     1,     1,     1,     1,     1,     1,
49 	   1,     1,     1,     1,     1,     1,     1,     1,
50 	   1,     1,     1,     1,     1,     1,     1,     1,
51 	   1,     1,     1,     1,     1,     1,     1,     2,
52 };
53