xref: /freebsd/lib/libc/regex/cname.h (revision 8fc257994d0ce2396196d7a06d50d20c8015f4b7)
1 /*-
2  * Copyright (c) 1992, 1993, 1994 Henry Spencer.
3  * Copyright (c) 1992, 1993, 1994
4  *	The Regents of the University of California.  All rights reserved.
5  *
6  * This code is derived from software contributed to Berkeley by
7  * Henry Spencer.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  * 4. Neither the name of the University nor the names of its contributors
18  *    may be used to endorse or promote products derived from this software
19  *    without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  *
33  *	@(#)cname.h	8.3 (Berkeley) 3/20/94
34  * $FreeBSD$
35  */
36 
37 /* character-name table */
38 static struct cname {
39 	char *name;
40 	char code;
41 } cnames[] = {
42 	{"NUL",			'\0'},
43 	{"SOH",			'\001'},
44 	{"STX",			'\002'},
45 	{"ETX",			'\003'},
46 	{"EOT",			'\004'},
47 	{"ENQ",			'\005'},
48 	{"ACK",			'\006'},
49 	{"BEL",			'\007'},
50 	{"alert",		'\007'},
51 	{"BS",			'\010'},
52 	{"backspace",		'\b'},
53 	{"HT",			'\011'},
54 	{"tab",			'\t'},
55 	{"LF",			'\012'},
56 	{"newline",		'\n'},
57 	{"VT",			'\013'},
58 	{"vertical-tab",	'\v'},
59 	{"FF",			'\014'},
60 	{"form-feed",		'\f'},
61 	{"CR",			'\015'},
62 	{"carriage-return",	'\r'},
63 	{"SO",			'\016'},
64 	{"SI",			'\017'},
65 	{"DLE",			'\020'},
66 	{"DC1",			'\021'},
67 	{"DC2",			'\022'},
68 	{"DC3",			'\023'},
69 	{"DC4",			'\024'},
70 	{"NAK",			'\025'},
71 	{"SYN",			'\026'},
72 	{"ETB",			'\027'},
73 	{"CAN",			'\030'},
74 	{"EM",			'\031'},
75 	{"SUB",			'\032'},
76 	{"ESC",			'\033'},
77 	{"IS4",			'\034'},
78 	{"FS",			'\034'},
79 	{"IS3",			'\035'},
80 	{"GS",			'\035'},
81 	{"IS2",			'\036'},
82 	{"RS",			'\036'},
83 	{"IS1",			'\037'},
84 	{"US",			'\037'},
85 	{"space",		' '},
86 	{"exclamation-mark",	'!'},
87 	{"quotation-mark",	'"'},
88 	{"number-sign",		'#'},
89 	{"dollar-sign",		'$'},
90 	{"percent-sign",	'%'},
91 	{"ampersand",		'&'},
92 	{"apostrophe",		'\''},
93 	{"left-parenthesis",	'('},
94 	{"right-parenthesis",	')'},
95 	{"asterisk",		'*'},
96 	{"plus-sign",		'+'},
97 	{"comma",		','},
98 	{"hyphen",		'-'},
99 	{"hyphen-minus",	'-'},
100 	{"period",		'.'},
101 	{"full-stop",		'.'},
102 	{"slash",		'/'},
103 	{"solidus",		'/'},
104 	{"zero",		'0'},
105 	{"one",			'1'},
106 	{"two",			'2'},
107 	{"three",		'3'},
108 	{"four",		'4'},
109 	{"five",		'5'},
110 	{"six",			'6'},
111 	{"seven",      		'7'},
112 	{"eight",		'8'},
113 	{"nine",		'9'},
114 	{"colon",		':'},
115 	{"semicolon",		';'},
116 	{"less-than-sign",	'<'},
117 	{"equals-sign",		'='},
118 	{"greater-than-sign",	'>'},
119 	{"question-mark",	'?'},
120 	{"commercial-at",	'@'},
121 	{"left-square-bracket",	'['},
122 	{"backslash",		'\\'},
123 	{"reverse-solidus",	'\\'},
124 	{"right-square-bracket",']'},
125 	{"circumflex",		'^'},
126 	{"circumflex-accent",	'^'},
127 	{"underscore",		'_'},
128 	{"low-line",		'_'},
129 	{"grave-accent",	'`'},
130 	{"left-brace",		'{'},
131 	{"left-curly-bracket",	'{'},
132 	{"vertical-line",	'|'},
133 	{"right-brace",		'}'},
134 	{"right-curly-bracket",	'}'},
135 	{"tilde",		'~'},
136 	{"DEL",	'\177'},
137 	{NULL,	0}
138 };
139