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