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