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