xref: /freebsd/lib/libc/regex/cname.h (revision dc36d6f9bb1753f3808552f3afd30eda9a7b206a)
158f0484fSRodney W. Grimes /*-
2*8a16b7a1SPedro F. Giffuni  * SPDX-License-Identifier: BSD-3-Clause
3*8a16b7a1SPedro F. Giffuni  *
458f0484fSRodney W. Grimes  * Copyright (c) 1992, 1993, 1994 Henry Spencer.
558f0484fSRodney W. Grimes  * Copyright (c) 1992, 1993, 1994
658f0484fSRodney W. Grimes  *	The Regents of the University of California.  All rights reserved.
758f0484fSRodney W. Grimes  *
858f0484fSRodney W. Grimes  * This code is derived from software contributed to Berkeley by
958f0484fSRodney W. Grimes  * Henry Spencer.
1058f0484fSRodney W. Grimes  *
1158f0484fSRodney W. Grimes  * Redistribution and use in source and binary forms, with or without
1258f0484fSRodney W. Grimes  * modification, are permitted provided that the following conditions
1358f0484fSRodney W. Grimes  * are met:
1458f0484fSRodney W. Grimes  * 1. Redistributions of source code must retain the above copyright
1558f0484fSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer.
1658f0484fSRodney W. Grimes  * 2. Redistributions in binary form must reproduce the above copyright
1758f0484fSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer in the
1858f0484fSRodney W. Grimes  *    documentation and/or other materials provided with the distribution.
19fbbd9655SWarner Losh  * 3. Neither the name of the University nor the names of its contributors
2058f0484fSRodney W. Grimes  *    may be used to endorse or promote products derived from this software
2158f0484fSRodney W. Grimes  *    without specific prior written permission.
2258f0484fSRodney W. Grimes  *
2358f0484fSRodney W. Grimes  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2458f0484fSRodney W. Grimes  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2558f0484fSRodney W. Grimes  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2658f0484fSRodney W. Grimes  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2758f0484fSRodney W. Grimes  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2858f0484fSRodney W. Grimes  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2958f0484fSRodney W. Grimes  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3058f0484fSRodney W. Grimes  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3158f0484fSRodney W. Grimes  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3258f0484fSRodney W. Grimes  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3358f0484fSRodney W. Grimes  * SUCH DAMAGE.
3458f0484fSRodney W. Grimes  */
3558f0484fSRodney W. Grimes 
3658f0484fSRodney W. Grimes /* character-name table */
3758f0484fSRodney W. Grimes static struct cname {
388d0f9a93SPedro F. Giffuni 	const char *name;
3958f0484fSRodney W. Grimes 	char code;
4058f0484fSRodney W. Grimes } cnames[] = {
4151295a4dSJordan K. Hubbard 	{"NUL",			'\0'},
4251295a4dSJordan K. Hubbard 	{"SOH",			'\001'},
4351295a4dSJordan K. Hubbard 	{"STX",			'\002'},
4451295a4dSJordan K. Hubbard 	{"ETX",			'\003'},
4551295a4dSJordan K. Hubbard 	{"EOT",			'\004'},
4651295a4dSJordan K. Hubbard 	{"ENQ",			'\005'},
4751295a4dSJordan K. Hubbard 	{"ACK",			'\006'},
4851295a4dSJordan K. Hubbard 	{"BEL",			'\007'},
4951295a4dSJordan K. Hubbard 	{"alert",		'\007'},
5051295a4dSJordan K. Hubbard 	{"BS",			'\010'},
5151295a4dSJordan K. Hubbard 	{"backspace",		'\b'},
5251295a4dSJordan K. Hubbard 	{"HT",			'\011'},
5351295a4dSJordan K. Hubbard 	{"tab",			'\t'},
5451295a4dSJordan K. Hubbard 	{"LF",			'\012'},
5551295a4dSJordan K. Hubbard 	{"newline",		'\n'},
5651295a4dSJordan K. Hubbard 	{"VT",			'\013'},
5751295a4dSJordan K. Hubbard 	{"vertical-tab",	'\v'},
5851295a4dSJordan K. Hubbard 	{"FF",			'\014'},
5951295a4dSJordan K. Hubbard 	{"form-feed",		'\f'},
6051295a4dSJordan K. Hubbard 	{"CR",			'\015'},
6151295a4dSJordan K. Hubbard 	{"carriage-return",	'\r'},
6251295a4dSJordan K. Hubbard 	{"SO",			'\016'},
6351295a4dSJordan K. Hubbard 	{"SI",			'\017'},
6451295a4dSJordan K. Hubbard 	{"DLE",			'\020'},
6551295a4dSJordan K. Hubbard 	{"DC1",			'\021'},
6651295a4dSJordan K. Hubbard 	{"DC2",			'\022'},
6751295a4dSJordan K. Hubbard 	{"DC3",			'\023'},
6851295a4dSJordan K. Hubbard 	{"DC4",			'\024'},
6951295a4dSJordan K. Hubbard 	{"NAK",			'\025'},
7051295a4dSJordan K. Hubbard 	{"SYN",			'\026'},
7151295a4dSJordan K. Hubbard 	{"ETB",			'\027'},
7251295a4dSJordan K. Hubbard 	{"CAN",			'\030'},
7351295a4dSJordan K. Hubbard 	{"EM",			'\031'},
7451295a4dSJordan K. Hubbard 	{"SUB",			'\032'},
7551295a4dSJordan K. Hubbard 	{"ESC",			'\033'},
7651295a4dSJordan K. Hubbard 	{"IS4",			'\034'},
7751295a4dSJordan K. Hubbard 	{"FS",			'\034'},
7851295a4dSJordan K. Hubbard 	{"IS3",			'\035'},
7951295a4dSJordan K. Hubbard 	{"GS",			'\035'},
8051295a4dSJordan K. Hubbard 	{"IS2",			'\036'},
8151295a4dSJordan K. Hubbard 	{"RS",			'\036'},
8251295a4dSJordan K. Hubbard 	{"IS1",			'\037'},
8351295a4dSJordan K. Hubbard 	{"US",			'\037'},
8451295a4dSJordan K. Hubbard 	{"space",		' '},
8551295a4dSJordan K. Hubbard 	{"exclamation-mark",	'!'},
8651295a4dSJordan K. Hubbard 	{"quotation-mark",	'"'},
8751295a4dSJordan K. Hubbard 	{"number-sign",		'#'},
8851295a4dSJordan K. Hubbard 	{"dollar-sign",		'$'},
8951295a4dSJordan K. Hubbard 	{"percent-sign",	'%'},
9051295a4dSJordan K. Hubbard 	{"ampersand",		'&'},
9151295a4dSJordan K. Hubbard 	{"apostrophe",		'\''},
9251295a4dSJordan K. Hubbard 	{"left-parenthesis",	'('},
9351295a4dSJordan K. Hubbard 	{"right-parenthesis",	')'},
9451295a4dSJordan K. Hubbard 	{"asterisk",		'*'},
9551295a4dSJordan K. Hubbard 	{"plus-sign",		'+'},
9651295a4dSJordan K. Hubbard 	{"comma",		','},
9751295a4dSJordan K. Hubbard 	{"hyphen",		'-'},
9851295a4dSJordan K. Hubbard 	{"hyphen-minus",	'-'},
9951295a4dSJordan K. Hubbard 	{"period",		'.'},
10051295a4dSJordan K. Hubbard 	{"full-stop",		'.'},
10151295a4dSJordan K. Hubbard 	{"slash",		'/'},
10251295a4dSJordan K. Hubbard 	{"solidus",		'/'},
10351295a4dSJordan K. Hubbard 	{"zero",		'0'},
10451295a4dSJordan K. Hubbard 	{"one",			'1'},
10551295a4dSJordan K. Hubbard 	{"two",			'2'},
10651295a4dSJordan K. Hubbard 	{"three",		'3'},
10751295a4dSJordan K. Hubbard 	{"four",		'4'},
10851295a4dSJordan K. Hubbard 	{"five",		'5'},
10951295a4dSJordan K. Hubbard 	{"six",			'6'},
11051295a4dSJordan K. Hubbard 	{"seven",      		'7'},
11151295a4dSJordan K. Hubbard 	{"eight",		'8'},
11251295a4dSJordan K. Hubbard 	{"nine",		'9'},
11351295a4dSJordan K. Hubbard 	{"colon",		':'},
11451295a4dSJordan K. Hubbard 	{"semicolon",		';'},
11551295a4dSJordan K. Hubbard 	{"less-than-sign",	'<'},
11651295a4dSJordan K. Hubbard 	{"equals-sign",		'='},
11751295a4dSJordan K. Hubbard 	{"greater-than-sign",	'>'},
11851295a4dSJordan K. Hubbard 	{"question-mark",	'?'},
11951295a4dSJordan K. Hubbard 	{"commercial-at",	'@'},
12051295a4dSJordan K. Hubbard 	{"left-square-bracket",	'['},
12151295a4dSJordan K. Hubbard 	{"backslash",		'\\'},
12251295a4dSJordan K. Hubbard 	{"reverse-solidus",	'\\'},
12351295a4dSJordan K. Hubbard 	{"right-square-bracket",']'},
12451295a4dSJordan K. Hubbard 	{"circumflex",		'^'},
12551295a4dSJordan K. Hubbard 	{"circumflex-accent",	'^'},
12651295a4dSJordan K. Hubbard 	{"underscore",		'_'},
12751295a4dSJordan K. Hubbard 	{"low-line",		'_'},
12851295a4dSJordan K. Hubbard 	{"grave-accent",	'`'},
12951295a4dSJordan K. Hubbard 	{"left-brace",		'{'},
13051295a4dSJordan K. Hubbard 	{"left-curly-bracket",	'{'},
13151295a4dSJordan K. Hubbard 	{"vertical-line",	'|'},
13251295a4dSJordan K. Hubbard 	{"right-brace",		'}'},
13351295a4dSJordan K. Hubbard 	{"right-curly-bracket",	'}'},
13451295a4dSJordan K. Hubbard 	{"tilde",		'~'},
13551295a4dSJordan K. Hubbard 	{"DEL",	'\177'},
13651295a4dSJordan K. Hubbard 	{NULL,	0}
13758f0484fSRodney W. Grimes };
138