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