14297a3b0SGarrett D'Amore /* 24297a3b0SGarrett D'Amore * Copyright (c) 1992, 1993, 1994 Henry Spencer. 34297a3b0SGarrett D'Amore * Copyright (c) 1992, 1993, 1994 44297a3b0SGarrett D'Amore * The Regents of the University of California. All rights reserved. 54297a3b0SGarrett D'Amore * 64297a3b0SGarrett D'Amore * This code is derived from software contributed to Berkeley by 74297a3b0SGarrett D'Amore * Henry Spencer. 84297a3b0SGarrett D'Amore * 94297a3b0SGarrett D'Amore * Redistribution and use in source and binary forms, with or without 104297a3b0SGarrett D'Amore * modification, are permitted provided that the following conditions 114297a3b0SGarrett D'Amore * are met: 124297a3b0SGarrett D'Amore * 1. Redistributions of source code must retain the above copyright 134297a3b0SGarrett D'Amore * notice, this list of conditions and the following disclaimer. 144297a3b0SGarrett D'Amore * 2. Redistributions in binary form must reproduce the above copyright 154297a3b0SGarrett D'Amore * notice, this list of conditions and the following disclaimer in the 164297a3b0SGarrett D'Amore * documentation and/or other materials provided with the distribution. 17*7641c5eaSYuri Pankov * 3. Neither the name of the University nor the names of its contributors 184297a3b0SGarrett D'Amore * may be used to endorse or promote products derived from this software 194297a3b0SGarrett D'Amore * without specific prior written permission. 204297a3b0SGarrett D'Amore * 214297a3b0SGarrett D'Amore * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 224297a3b0SGarrett D'Amore * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 234297a3b0SGarrett D'Amore * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 244297a3b0SGarrett D'Amore * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 254297a3b0SGarrett D'Amore * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 264297a3b0SGarrett D'Amore * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 274297a3b0SGarrett D'Amore * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 284297a3b0SGarrett D'Amore * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 294297a3b0SGarrett D'Amore * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 304297a3b0SGarrett D'Amore * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 314297a3b0SGarrett D'Amore * SUCH DAMAGE. 324297a3b0SGarrett D'Amore */ 334297a3b0SGarrett D'Amore 344297a3b0SGarrett D'Amore /* character-name table */ 354297a3b0SGarrett D'Amore static struct cname { 364297a3b0SGarrett D'Amore char *name; 374297a3b0SGarrett D'Amore char code; 384297a3b0SGarrett D'Amore } cnames[] = { 394297a3b0SGarrett D'Amore {"NUL", '\0'}, 404297a3b0SGarrett D'Amore {"SOH", '\001'}, 414297a3b0SGarrett D'Amore {"STX", '\002'}, 424297a3b0SGarrett D'Amore {"ETX", '\003'}, 434297a3b0SGarrett D'Amore {"EOT", '\004'}, 444297a3b0SGarrett D'Amore {"ENQ", '\005'}, 454297a3b0SGarrett D'Amore {"ACK", '\006'}, 464297a3b0SGarrett D'Amore {"BEL", '\007'}, 474297a3b0SGarrett D'Amore {"alert", '\007'}, 484297a3b0SGarrett D'Amore {"BS", '\010'}, 494297a3b0SGarrett D'Amore {"backspace", '\b'}, 504297a3b0SGarrett D'Amore {"HT", '\011'}, 514297a3b0SGarrett D'Amore {"tab", '\t'}, 524297a3b0SGarrett D'Amore {"LF", '\012'}, 534297a3b0SGarrett D'Amore {"newline", '\n'}, 544297a3b0SGarrett D'Amore {"VT", '\013'}, 554297a3b0SGarrett D'Amore {"vertical-tab", '\v'}, 564297a3b0SGarrett D'Amore {"FF", '\014'}, 574297a3b0SGarrett D'Amore {"form-feed", '\f'}, 584297a3b0SGarrett D'Amore {"CR", '\015'}, 594297a3b0SGarrett D'Amore {"carriage-return", '\r'}, 604297a3b0SGarrett D'Amore {"SO", '\016'}, 614297a3b0SGarrett D'Amore {"SI", '\017'}, 624297a3b0SGarrett D'Amore {"DLE", '\020'}, 634297a3b0SGarrett D'Amore {"DC1", '\021'}, 644297a3b0SGarrett D'Amore {"DC2", '\022'}, 654297a3b0SGarrett D'Amore {"DC3", '\023'}, 664297a3b0SGarrett D'Amore {"DC4", '\024'}, 674297a3b0SGarrett D'Amore {"NAK", '\025'}, 684297a3b0SGarrett D'Amore {"SYN", '\026'}, 694297a3b0SGarrett D'Amore {"ETB", '\027'}, 704297a3b0SGarrett D'Amore {"CAN", '\030'}, 714297a3b0SGarrett D'Amore {"EM", '\031'}, 724297a3b0SGarrett D'Amore {"SUB", '\032'}, 734297a3b0SGarrett D'Amore {"ESC", '\033'}, 744297a3b0SGarrett D'Amore {"IS4", '\034'}, 754297a3b0SGarrett D'Amore {"FS", '\034'}, 764297a3b0SGarrett D'Amore {"IS3", '\035'}, 774297a3b0SGarrett D'Amore {"GS", '\035'}, 784297a3b0SGarrett D'Amore {"IS2", '\036'}, 794297a3b0SGarrett D'Amore {"RS", '\036'}, 804297a3b0SGarrett D'Amore {"IS1", '\037'}, 814297a3b0SGarrett D'Amore {"US", '\037'}, 824297a3b0SGarrett D'Amore {"space", ' '}, 834297a3b0SGarrett D'Amore {"exclamation-mark", '!'}, 844297a3b0SGarrett D'Amore {"quotation-mark", '"'}, 854297a3b0SGarrett D'Amore {"number-sign", '#'}, 864297a3b0SGarrett D'Amore {"dollar-sign", '$'}, 874297a3b0SGarrett D'Amore {"percent-sign", '%'}, 884297a3b0SGarrett D'Amore {"ampersand", '&'}, 894297a3b0SGarrett D'Amore {"apostrophe", '\''}, 904297a3b0SGarrett D'Amore {"left-parenthesis", '('}, 914297a3b0SGarrett D'Amore {"right-parenthesis", ')'}, 924297a3b0SGarrett D'Amore {"asterisk", '*'}, 934297a3b0SGarrett D'Amore {"plus-sign", '+'}, 944297a3b0SGarrett D'Amore {"comma", ','}, 954297a3b0SGarrett D'Amore {"hyphen", '-'}, 964297a3b0SGarrett D'Amore {"hyphen-minus", '-'}, 974297a3b0SGarrett D'Amore {"period", '.'}, 984297a3b0SGarrett D'Amore {"full-stop", '.'}, 994297a3b0SGarrett D'Amore {"slash", '/'}, 1004297a3b0SGarrett D'Amore {"solidus", '/'}, 1014297a3b0SGarrett D'Amore {"zero", '0'}, 1024297a3b0SGarrett D'Amore {"one", '1'}, 1034297a3b0SGarrett D'Amore {"two", '2'}, 1044297a3b0SGarrett D'Amore {"three", '3'}, 1054297a3b0SGarrett D'Amore {"four", '4'}, 1064297a3b0SGarrett D'Amore {"five", '5'}, 1074297a3b0SGarrett D'Amore {"six", '6'}, 1084297a3b0SGarrett D'Amore {"seven", '7'}, 1094297a3b0SGarrett D'Amore {"eight", '8'}, 1104297a3b0SGarrett D'Amore {"nine", '9'}, 1114297a3b0SGarrett D'Amore {"colon", ':'}, 1124297a3b0SGarrett D'Amore {"semicolon", ';'}, 1134297a3b0SGarrett D'Amore {"less-than-sign", '<'}, 1144297a3b0SGarrett D'Amore {"equals-sign", '='}, 1154297a3b0SGarrett D'Amore {"greater-than-sign", '>'}, 1164297a3b0SGarrett D'Amore {"question-mark", '?'}, 1174297a3b0SGarrett D'Amore {"commercial-at", '@'}, 1184297a3b0SGarrett D'Amore {"left-square-bracket", '['}, 1194297a3b0SGarrett D'Amore {"backslash", '\\'}, 1204297a3b0SGarrett D'Amore {"reverse-solidus", '\\'}, 1214297a3b0SGarrett D'Amore {"right-square-bracket", ']'}, 1224297a3b0SGarrett D'Amore {"circumflex", '^'}, 1234297a3b0SGarrett D'Amore {"circumflex-accent", '^'}, 1244297a3b0SGarrett D'Amore {"underscore", '_'}, 1254297a3b0SGarrett D'Amore {"low-line", '_'}, 1264297a3b0SGarrett D'Amore {"grave-accent", '`'}, 1274297a3b0SGarrett D'Amore {"left-brace", '{'}, 1284297a3b0SGarrett D'Amore {"left-curly-bracket", '{'}, 1294297a3b0SGarrett D'Amore {"vertical-line", '|'}, 1304297a3b0SGarrett D'Amore {"right-brace", '}'}, 1314297a3b0SGarrett D'Amore {"right-curly-bracket", '}'}, 1324297a3b0SGarrett D'Amore {"tilde", '~'}, 1334297a3b0SGarrett D'Amore {"DEL", '\177'}, 1344297a3b0SGarrett D'Amore {NULL, 0} 1354297a3b0SGarrett D'Amore }; 136