Mercurial > vim
comparison src/digraph.c @ 29980:f0952e40de8e v9.0.0328
patch 9.0.0328: OLD_DIGRAPHS is unused
Commit: https://github.com/vim/vim/commit/e27d6e6382795e86ea4dd3a86396350a4c29b6fb
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 15:05:30 2022 +0100
patch 9.0.0328: OLD_DIGRAPHS is unused
Problem: OLD_DIGRAPHS is unused.
Solution: Remove OLD_DIGRAPHS. Also drop HPUX_DIGRAPHS.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 30 Aug 2022 16:15:04 +0200 |
parents | 68ef14b21d01 |
children | ac6b2ee967f1 |
comparison
equal
deleted
inserted
replaced
29979:3822b24c3aa1 | 29980:f0952e40de8e |
---|---|
28 | 28 |
29 // digraphs added by the user | 29 // digraphs added by the user |
30 static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL}; | 30 static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL}; |
31 | 31 |
32 /* | 32 /* |
33 * digraphs for Unicode from RFC1345 | |
34 * (also work for ISO-8859-1 aka latin1) | |
35 * | |
33 * Note: Characters marked with XX are not included literally, because some | 36 * Note: Characters marked with XX are not included literally, because some |
34 * compilers cannot handle them (Amiga SAS/C is the most picky one). | 37 * compilers cannot handle them (Amiga SAS/C is the most picky one). |
35 */ | 38 */ |
36 static digr_T digraphdefault[] = | 39 static digr_T digraphdefault[] = { |
37 | |
38 #ifdef HPUX_DIGRAPHS | |
39 /* | |
40 * different HPUX digraphs | |
41 */ | |
42 {{'A', '`', 161}, // ¡ | |
43 {'A', '^', 162}, // ¢ | |
44 {'E', '`', 163}, // £ | |
45 {'E', '^', 164}, // ¤ | |
46 {'E', '"', 165}, // ¥ | |
47 {'I', '^', 166}, // ¦ | |
48 {'I', '"', 167}, // § | |
49 {'\'', '\'', 168}, // ¨ | |
50 {'`', '`', 169}, // © | |
51 {'^', '^', 170}, // ª | |
52 {'"', '"', 171}, // « | |
53 {'~', '~', 172}, // ¬ | |
54 {'U', '`', 173}, // | |
55 {'U', '^', 174}, // ® | |
56 {'L', '=', 175}, // ¯ | |
57 {'~', '_', 176}, // ° | |
58 {'Y', '\'', 177}, // ± | |
59 {'y', '\'', 178}, // ² | |
60 {'~', 'o', 179}, // ³ | |
61 {'C', ',', 180}, // ´ | |
62 {'c', ',', 181}, // µ | |
63 {'N', '~', 182}, // ¶ | |
64 {'n', '~', 183}, // · | |
65 {'~', '!', 184}, // ¸ | |
66 {'~', '?', 185}, // ¹ | |
67 {'o', 'x', 186}, // º | |
68 {'L', '-', 187}, // » | |
69 {'Y', '=', 188}, // ¼ | |
70 {'p', 'p', 189}, // ½ | |
71 {'f', 'l', 190}, // ¾ | |
72 {'c', '|', 191}, // ¿ | |
73 {'a', '^', 192}, // À | |
74 {'e', '^', 193}, // Á | |
75 {'o', '^', 194}, // Â | |
76 {'u', '^', 195}, // Ã | |
77 {'a', '\'', 196}, // Ä | |
78 {'e', '\'', 197}, // Å | |
79 {'o', '\'', 198}, // Æ | |
80 {'u', '\'', 199}, // Ç | |
81 {'a', '`', 200}, // È | |
82 {'e', '`', 201}, // É | |
83 {'o', '`', 202}, // Ê | |
84 {'u', '`', 203}, // Ë | |
85 {'a', '"', 204}, // Ì | |
86 {'e', '"', 205}, // Í | |
87 {'o', '"', 206}, // Î | |
88 {'u', '"', 207}, // Ï | |
89 {'A', 'o', 208}, // Ð | |
90 {'i', '^', 209}, // Ñ | |
91 {'O', '/', 210}, // Ò | |
92 {'A', 'E', 211}, // Ó | |
93 {'a', 'o', 212}, // Ô | |
94 {'i', '\'', 213}, // Õ | |
95 {'o', '/', 214}, // Ö | |
96 {'a', 'e', 215}, // × | |
97 {'A', '"', 216}, // Ø | |
98 {'i', '`', 217}, // Ù | |
99 {'O', '"', 218}, // Ú | |
100 {'U', '"', 219}, // Û | |
101 {'E', '\'', 220}, // Ü | |
102 {'i', '"', 221}, // Ý | |
103 {'s', 's', 222}, // Þ | |
104 {'O', '^', 223}, // ß | |
105 {'A', '\'', 224}, // à | |
106 {'A', '~', 225}, // á | |
107 {'a', '~', 226}, // â | |
108 {'D', '-', 227}, // ã | |
109 {'d', '-', 228}, // ä | |
110 {'I', '\'', 229}, // å | |
111 {'I', '`', 230}, // æ | |
112 {'O', '\'', 231}, // ç | |
113 {'O', '`', 232}, // è | |
114 {'O', '~', 233}, // é | |
115 {'o', '~', 234}, // ê | |
116 {'S', '~', 235}, // ë | |
117 {'s', '~', 236}, // ì | |
118 {'U', '\'', 237}, // í | |
119 {'Y', '"', 238}, // î | |
120 {'y', '"', 239}, // ï | |
121 {'p', '-', 240}, // ð | |
122 {'p', '~', 241}, // ñ | |
123 {'~', '.', 242}, // ò | |
124 {'j', 'u', 243}, // ó | |
125 {'P', 'p', 244}, // ô | |
126 {'3', '4', 245}, // õ | |
127 {'-', '-', 246}, // ö | |
128 {'1', '4', 247}, // ÷ | |
129 {'1', '2', 248}, // ø | |
130 {'a', '_', 249}, // ù | |
131 {'o', '_', 250}, // ú | |
132 {'<', '<', 251}, // û | |
133 {'x', 'x', 252}, // ü | |
134 {'>', '>', 253}, // ý | |
135 {'+', '-', 254}, // þ | |
136 {'n', 'u', 255}, // x XX | |
137 {NUL, NUL, NUL} | |
138 }; | |
139 | |
140 #else // !HPUX_DIGRAPHS | |
141 # ifdef OLD_DIGRAPHS | |
142 | |
143 /* | |
144 * digraphs compatible with Vim 5.x | |
145 */ | |
146 {{'~', '!', 161}, // ¡ | |
147 {'c', '|', 162}, // ¢ | |
148 {'$', '$', 163}, // £ | |
149 {'o', 'x', 164}, // ¤ - currency symbol in ISO 8859-1 | |
150 {'e', '=', 164}, // ¤ - euro symbol in ISO 8859-15 | |
151 {'Y', '-', 165}, // ¥ | |
152 {'|', '|', 166}, // ¦ | |
153 {'p', 'a', 167}, // § | |
154 {'"', '"', 168}, // ¨ | |
155 {'c', 'O', 169}, // © | |
156 {'a', '-', 170}, // ª | |
157 {'<', '<', 171}, // « | |
158 {'-', ',', 172}, // ¬ | |
159 {'-', '-', 173}, // | |
160 {'r', 'O', 174}, // ® | |
161 {'-', '=', 175}, // ¯ | |
162 {'~', 'o', 176}, // ° | |
163 {'+', '-', 177}, // ± | |
164 {'2', '2', 178}, // ² | |
165 {'3', '3', 179}, // ³ | |
166 {'\'', '\'', 180}, // ´ | |
167 {'j', 'u', 181}, // µ | |
168 {'p', 'p', 182}, // ¶ | |
169 {'~', '.', 183}, // · | |
170 {',', ',', 184}, // ¸ | |
171 {'1', '1', 185}, // ¹ | |
172 {'o', '-', 186}, // º | |
173 {'>', '>', 187}, // » | |
174 {'1', '4', 188}, // ¼ | |
175 {'1', '2', 189}, // ½ | |
176 {'3', '4', 190}, // ¾ | |
177 {'~', '?', 191}, // ¿ | |
178 {'A', '`', 192}, // À | |
179 {'A', '\'', 193}, // Á | |
180 {'A', '^', 194}, // Â | |
181 {'A', '~', 195}, // Ã | |
182 {'A', '"', 196}, // Ä | |
183 {'A', '@', 197}, // Å | |
184 {'A', 'A', 197}, // Å | |
185 {'A', 'E', 198}, // Æ | |
186 {'C', ',', 199}, // Ç | |
187 {'E', '`', 200}, // È | |
188 {'E', '\'', 201}, // É | |
189 {'E', '^', 202}, // Ê | |
190 {'E', '"', 203}, // Ë | |
191 {'I', '`', 204}, // Ì | |
192 {'I', '\'', 205}, // Í | |
193 {'I', '^', 206}, // Î | |
194 {'I', '"', 207}, // Ï | |
195 {'D', '-', 208}, // Ð | |
196 {'N', '~', 209}, // Ñ | |
197 {'O', '`', 210}, // Ò | |
198 {'O', '\'', 211}, // Ó | |
199 {'O', '^', 212}, // Ô | |
200 {'O', '~', 213}, // Õ | |
201 {'O', '"', 214}, // Ö | |
202 {'/', '\\', 215}, // × - multiplication symbol in ISO 8859-1 | |
203 {'O', 'E', 215}, // × - OE in ISO 8859-15 | |
204 {'O', '/', 216}, // Ø | |
205 {'U', '`', 217}, // Ù | |
206 {'U', '\'', 218}, // Ú | |
207 {'U', '^', 219}, // Û | |
208 {'U', '"', 220}, // Ü | |
209 {'Y', '\'', 221}, // Ý | |
210 {'I', 'p', 222}, // Þ | |
211 {'s', 's', 223}, // ß | |
212 {'a', '`', 224}, // à | |
213 {'a', '\'', 225}, // á | |
214 {'a', '^', 226}, // â | |
215 {'a', '~', 227}, // ã | |
216 {'a', '"', 228}, // ä | |
217 {'a', '@', 229}, // å | |
218 {'a', 'a', 229}, // å | |
219 {'a', 'e', 230}, // æ | |
220 {'c', ',', 231}, // ç | |
221 {'e', '`', 232}, // è | |
222 {'e', '\'', 233}, // é | |
223 {'e', '^', 234}, // ê | |
224 {'e', '"', 235}, // ë | |
225 {'i', '`', 236}, // ì | |
226 {'i', '\'', 237}, // í | |
227 {'i', '^', 238}, // î | |
228 {'i', '"', 239}, // ï | |
229 {'d', '-', 240}, // ð | |
230 {'n', '~', 241}, // ñ | |
231 {'o', '`', 242}, // ò | |
232 {'o', '\'', 243}, // ó | |
233 {'o', '^', 244}, // ô | |
234 {'o', '~', 245}, // õ | |
235 {'o', '"', 246}, // ö | |
236 {':', '-', 247}, // ÷ - division symbol in ISO 8859-1 | |
237 {'o', 'e', 247}, // ÷ - oe in ISO 8859-15 | |
238 {'o', '/', 248}, // ø | |
239 {'u', '`', 249}, // ù | |
240 {'u', '\'', 250}, // ú | |
241 {'u', '^', 251}, // û | |
242 {'u', '"', 252}, // ü | |
243 {'y', '\'', 253}, // ý | |
244 {'i', 'p', 254}, // þ | |
245 {'y', '"', 255}, // x XX | |
246 {NUL, NUL, NUL} | |
247 }; | |
248 # else // OLD_DIGRAPHS | |
249 | |
250 /* | |
251 * digraphs for Unicode from RFC1345 | |
252 * (also work for ISO-8859-1 aka latin1) | |
253 */ | |
254 { | |
255 {'N', 'U', 0x0a}, // LF for NUL | 40 {'N', 'U', 0x0a}, // LF for NUL |
256 {'S', 'H', 0x01}, | 41 {'S', 'H', 0x01}, |
257 {'S', 'X', 0x02}, | 42 {'S', 'X', 0x02}, |
258 {'E', 'X', 0x03}, | 43 {'E', 'X', 0x03}, |
259 {'E', 'T', 0x04}, | 44 {'E', 'T', 0x04}, |
1644 {'f', 'i', 0xfb01}, | 1429 {'f', 'i', 0xfb01}, |
1645 {'f', 'l', 0xfb02}, | 1430 {'f', 'l', 0xfb02}, |
1646 {'f', 't', 0xfb05}, | 1431 {'f', 't', 0xfb05}, |
1647 {'s', 't', 0xfb06}, | 1432 {'s', 't', 0xfb06}, |
1648 | 1433 |
1649 {NUL, NUL, NUL} | 1434 {NUL, NUL, NUL} // end marker |
1650 }; | 1435 }; |
1651 | |
1652 # endif // OLD_DIGRAPHS | |
1653 #endif // !HPUX_DIGRAPHS | |
1654 | 1436 |
1655 /* | 1437 /* |
1656 * handle digraphs after typing a character | 1438 * handle digraphs after typing a character |
1657 */ | 1439 */ |
1658 int | 1440 int |