blob: d56df611387df0e8ca6eba5d33e342e2ea748d69 [file] [log] [blame]
Jari Aaltocce855b1998-04-17 19:52:44 +00001/* collsyms.h -- collating symbol names and their corresponding characters
2 (in ascii) as given by POSIX.2 in table 2.8. */
3
Jari Aalto7117c2d2002-07-17 14:10:11 +00004/* Copyright (C) 1997-2002 Free Software Foundation, Inc.
Jari Aaltocce855b1998-04-17 19:52:44 +00005
6 This file is part of GNU Bash, the Bourne Again SHell.
Jari Aalto7117c2d2002-07-17 14:10:11 +00007
Jari Aalto31859422009-01-12 13:36:28 +00008 Bash is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
Jari Aalto7117c2d2002-07-17 14:10:11 +000012
Jari Aalto31859422009-01-12 13:36:28 +000013 Bash is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
Jari Aalto7117c2d2002-07-17 14:10:11 +000017
Jari Aalto31859422009-01-12 13:36:28 +000018 You should have received a copy of the GNU General Public License
19 along with Bash. If not, see <http://www.gnu.org/licenses/>.
20*/
Jari Aaltocce855b1998-04-17 19:52:44 +000021
Jari Aaltocce855b1998-04-17 19:52:44 +000022/* The upper-case letters, lower-case letters, and digits are omitted from
23 this table. The digits are not included in the table in the POSIX.2
24 spec. The upper and lower case letters are translated by the code
Jari Aalto7117c2d2002-07-17 14:10:11 +000025 in smatch.c:collsym(). */
Jari Aaltocce855b1998-04-17 19:52:44 +000026
Jari Aalto7117c2d2002-07-17 14:10:11 +000027typedef struct _COLLSYM {
28 XCHAR *name;
29 CHAR code;
30} __COLLSYM;
Jari Aaltocce855b1998-04-17 19:52:44 +000031
Jari Aalto7117c2d2002-07-17 14:10:11 +000032static __COLLSYM POSIXCOLL [] =
Jari Aaltocce855b1998-04-17 19:52:44 +000033{
Jari Aalto7117c2d2002-07-17 14:10:11 +000034 { L("NUL"), L('\0') },
35 { L("SOH"), L('\001') },
36 { L("STX"), L('\002') },
37 { L("ETX"), L('\003') },
38 { L("EOT"), L('\004') },
39 { L("ENQ"), L('\005') },
40 { L("ACK"), L('\006') },
Jari Aaltocce855b1998-04-17 19:52:44 +000041#ifdef __STDC__
Jari Aalto7117c2d2002-07-17 14:10:11 +000042 { L("alert"), L('\a') },
Jari Aaltocce855b1998-04-17 19:52:44 +000043#else
Jari Aalto7117c2d2002-07-17 14:10:11 +000044 { L("alert"), L('\007') },
Jari Aaltocce855b1998-04-17 19:52:44 +000045#endif
Jari Aalto7117c2d2002-07-17 14:10:11 +000046 { L("BS"), L('\010') },
47 { L("backspace"), L('\b') },
48 { L("HT"), L('\011') },
49 { L("tab"), L('\t') },
50 { L("LF"), L('\012') },
51 { L("newline"), L('\n') },
52 { L("VT"), L('\013') },
53 { L("vertical-tab"), L('\v') },
54 { L("FF"), L('\014') },
55 { L("form-feed"), L('\f') },
56 { L("CR"), L('\015') },
57 { L("carriage-return"), L('\r') },
58 { L("SO"), L('\016') },
59 { L("SI"), L('\017') },
60 { L("DLE"), L('\020') },
61 { L("DC1"), L('\021') },
62 { L("DC2"), L('\022') },
63 { L("DC3"), L('\023') },
64 { L("DC4"), L('\024') },
65 { L("NAK"), L('\025') },
66 { L("SYN"), L('\026') },
67 { L("ETB"), L('\027') },
68 { L("CAN"), L('\030') },
69 { L("EM"), L('\031') },
70 { L("SUB"), L('\032') },
71 { L("ESC"), L('\033') },
72 { L("IS4"), L('\034') },
73 { L("FS"), L('\034') },
74 { L("IS3"), L('\035') },
75 { L("GS"), L('\035') },
76 { L("IS2"), L('\036') },
77 { L("RS"), L('\036') },
78 { L("IS1"), L('\037') },
79 { L("US"), L('\037') },
80 { L("space"), L(' ') },
81 { L("exclamation-mark"), L('!') },
82 { L("quotation-mark"), L('"') },
83 { L("number-sign"), L('#') },
84 { L("dollar-sign"), L('$') },
85 { L("percent-sign"), L('%') },
86 { L("ampersand"), L('&') },
87 { L("apostrophe"), L('\'') },
88 { L("left-parenthesis"), L('(') },
89 { L("right-parenthesis"), L(')') },
90 { L("asterisk"), L('*') },
91 { L("plus-sign"), L('+') },
92 { L("comma"), L(',') },
93 { L("hyphen"), L('-') },
94 { L("hyphen-minus"), L('-') },
95 { L("minus"), L('-') }, /* extension from POSIX.2 */
96 { L("dash"), L('-') }, /* extension from POSIX.2 */
97 { L("period"), L('.') },
98 { L("full-stop"), L('.') },
99 { L("slash"), L('/') },
100 { L("solidus"), L('/') }, /* extension from POSIX.2 */
101 { L("zero"), L('0') },
102 { L("one"), L('1') },
103 { L("two"), L('2') },
104 { L("three"), L('3') },
105 { L("four"), L('4') },
106 { L("five"), L('5') },
107 { L("six"), L('6') },
108 { L("seven"), L('7') },
109 { L("eight"), L('8') },
110 { L("nine"), L('9') },
111 { L("colon"), L(':') },
112 { L("semicolon"), L(';') },
113 { L("less-than-sign"), L('<') },
114 { L("equals-sign"), L('=') },
115 { L("greater-than-sign"), L('>') },
116 { L("question-mark"), L('?') },
117 { L("commercial-at"), L('@') },
Jari Aaltof73dda02001-11-13 17:56:06 +0000118 /* upper-case letters omitted */
Jari Aalto7117c2d2002-07-17 14:10:11 +0000119 { L("left-square-bracket"), L('[') },
120 { L("backslash"), L('\\') },
121 { L("reverse-solidus"), L('\\') },
122 { L("right-square-bracket"), L(']') },
123 { L("circumflex"), L('^') },
124 { L("circumflex-accent"), L('^') }, /* extension from POSIX.2 */
125 { L("underscore"), L('_') },
126 { L("grave-accent"), L('`') },
Jari Aaltof73dda02001-11-13 17:56:06 +0000127 /* lower-case letters omitted */
Jari Aalto7117c2d2002-07-17 14:10:11 +0000128 { L("left-brace"), L('{') }, /* extension from POSIX.2 */
129 { L("left-curly-bracket"), L('{') },
130 { L("vertical-line"), L('|') },
131 { L("right-brace"), L('}') }, /* extension from POSIX.2 */
132 { L("right-curly-bracket"), L('}') },
133 { L("tilde"), L('~') },
134 { L("DEL"), L('\177') },
Jari Aaltof73dda02001-11-13 17:56:06 +0000135 { 0, 0 },
Jari Aaltocce855b1998-04-17 19:52:44 +0000136};
137
Jari Aalto7117c2d2002-07-17 14:10:11 +0000138#undef _COLLSYM
139#undef __COLLSYM
140#undef POSIXCOLL