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