Mercurial > vim
annotate src/digraph.c @ 28396:cf018ac0499c
Added tag v8.2.4722 for changeset a0cd2b7a78efd685e5eba7fa2d3833a926669d0a
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 09 Apr 2022 19:00:03 +0200 |
parents | f34afadbef47 |
children | d770568e6c98 |
rev | line source |
---|---|
10042
4aead6a9b7a9
commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents:
9719
diff
changeset
|
1 /* vi:set ts=8 sts=4 sw=4 noet: |
7 | 2 * |
3 * VIM - Vi IMproved by Bram Moolenaar | |
4 * | |
5 * Do ":help uganda" in Vim to read copying and usage conditions. | |
6 * Do ":help credits" in Vim to see a list of people who contributed. | |
7 * See README.txt for an overview of the Vim source code. | |
8 */ | |
9 | |
10 /* | |
11 * digraph.c: code for digraphs | |
12 */ | |
13 | |
14 #include "vim.h" | |
15 | |
16 #if defined(FEAT_DIGRAPHS) || defined(PROTO) | |
17 | |
18 typedef int result_T; | |
19 | |
20 typedef struct digraph | |
21 { | |
22 char_u char1; | |
23 char_u char2; | |
24 result_T result; | |
25 } digr_T; | |
26 | |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
27 static void printdigraph(digr_T *dp, result_T *previous); |
7 | 28 |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
29 // digraphs added by the user |
1869 | 30 static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL}; |
7 | 31 |
32 /* | |
33 * Note: Characters marked with XX are not included literally, because some | |
34 * compilers cannot handle them (Amiga SAS/C is the most picky one). | |
35 */ | |
298 | 36 static digr_T digraphdefault[] = |
15595
1ec942f1b648
patch 8.1.0805: too many #ifdefs
Bram Moolenaar <Bram@vim.org>
parents:
15470
diff
changeset
|
37 |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
38 #ifdef HPUX_DIGRAPHS |
7 | 39 /* |
40 * different HPUX digraphs | |
41 */ | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
42 {{'A', '`', 161}, // ¡ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
43 {'A', '^', 162}, // ¢ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
44 {'E', '`', 163}, // £ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
45 {'E', '^', 164}, // ¤ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
46 {'E', '"', 165}, // ¥ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
47 {'I', '^', 166}, // ¦ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
48 {'I', '"', 167}, // § |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
49 {'\'', '\'', 168}, // ¨ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
50 {'`', '`', 169}, // © |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
51 {'^', '^', 170}, // ª |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
52 {'"', '"', 171}, // « |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
53 {'~', '~', 172}, // ¬ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
54 {'U', '`', 173}, // |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
55 {'U', '^', 174}, // ® |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
56 {'L', '=', 175}, // ¯ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
57 {'~', '_', 176}, // ° |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
58 {'Y', '\'', 177}, // ± |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
59 {'y', '\'', 178}, // ² |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
60 {'~', 'o', 179}, // ³ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
61 {'C', ',', 180}, // ´ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
62 {'c', ',', 181}, // µ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
63 {'N', '~', 182}, // ¶ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
64 {'n', '~', 183}, // · |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
65 {'~', '!', 184}, // ¸ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
66 {'~', '?', 185}, // ¹ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
67 {'o', 'x', 186}, // º |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
68 {'L', '-', 187}, // » |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
69 {'Y', '=', 188}, // ¼ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
70 {'p', 'p', 189}, // ½ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
71 {'f', 'l', 190}, // ¾ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
72 {'c', '|', 191}, // ¿ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
73 {'a', '^', 192}, // À |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
74 {'e', '^', 193}, // Á |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
75 {'o', '^', 194}, // Â |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
76 {'u', '^', 195}, // Ã |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
77 {'a', '\'', 196}, // Ä |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
78 {'e', '\'', 197}, // Å |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
79 {'o', '\'', 198}, // Æ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
80 {'u', '\'', 199}, // Ç |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
81 {'a', '`', 200}, // È |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
82 {'e', '`', 201}, // É |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
83 {'o', '`', 202}, // Ê |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
84 {'u', '`', 203}, // Ë |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
85 {'a', '"', 204}, // Ì |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
86 {'e', '"', 205}, // Í |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
87 {'o', '"', 206}, // Î |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
88 {'u', '"', 207}, // Ï |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
89 {'A', 'o', 208}, // Ð |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
90 {'i', '^', 209}, // Ñ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
91 {'O', '/', 210}, // Ò |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
92 {'A', 'E', 211}, // Ó |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
93 {'a', 'o', 212}, // Ô |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
94 {'i', '\'', 213}, // Õ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
95 {'o', '/', 214}, // Ö |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
96 {'a', 'e', 215}, // × |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
97 {'A', '"', 216}, // Ø |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
98 {'i', '`', 217}, // Ù |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
99 {'O', '"', 218}, // Ú |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
100 {'U', '"', 219}, // Û |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
101 {'E', '\'', 220}, // Ü |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
102 {'i', '"', 221}, // Ý |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
103 {'s', 's', 222}, // Þ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
104 {'O', '^', 223}, // ß |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
105 {'A', '\'', 224}, // à |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
106 {'A', '~', 225}, // á |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
107 {'a', '~', 226}, // â |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
108 {'D', '-', 227}, // ã |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
109 {'d', '-', 228}, // ä |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
110 {'I', '\'', 229}, // å |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
111 {'I', '`', 230}, // æ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
112 {'O', '\'', 231}, // ç |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
113 {'O', '`', 232}, // è |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
114 {'O', '~', 233}, // é |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
115 {'o', '~', 234}, // ê |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
116 {'S', '~', 235}, // ë |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
117 {'s', '~', 236}, // ì |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
118 {'U', '\'', 237}, // í |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
119 {'Y', '"', 238}, // î |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
120 {'y', '"', 239}, // ï |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
121 {'p', '-', 240}, // ð |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
122 {'p', '~', 241}, // ñ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
123 {'~', '.', 242}, // ò |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
124 {'j', 'u', 243}, // ó |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
125 {'P', 'p', 244}, // ô |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
126 {'3', '4', 245}, // õ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
127 {'-', '-', 246}, // ö |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
128 {'1', '4', 247}, // ÷ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
129 {'1', '2', 248}, // ø |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
130 {'a', '_', 249}, // ù |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
131 {'o', '_', 250}, // ú |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
132 {'<', '<', 251}, // û |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
133 {'x', 'x', 252}, // ü |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
134 {'>', '>', 253}, // ý |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
135 {'+', '-', 254}, // þ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
136 {'n', 'u', 255}, // x XX |
7 | 137 {NUL, NUL, NUL} |
138 }; | |
139 | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
140 #else // !HPUX_DIGRAPHS |
27490
fb4c30606b4a
patch 8.2.4273: the EBCDIC support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
27028
diff
changeset
|
141 # ifdef OLD_DIGRAPHS |
7 | 142 |
143 /* | |
144 * digraphs compatible with Vim 5.x | |
145 */ | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
146 {{'~', '!', 161}, // ¡ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
147 {'c', '|', 162}, // ¢ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
148 {'$', '$', 163}, // £ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
149 {'o', 'x', 164}, // ¤ - currency symbol in ISO 8859-1 |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
150 {'e', '=', 164}, // ¤ - euro symbol in ISO 8859-15 |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
151 {'Y', '-', 165}, // ¥ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
152 {'|', '|', 166}, // ¦ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
153 {'p', 'a', 167}, // § |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
154 {'"', '"', 168}, // ¨ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
155 {'c', 'O', 169}, // © |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
156 {'a', '-', 170}, // ª |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
157 {'<', '<', 171}, // « |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
158 {'-', ',', 172}, // ¬ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
159 {'-', '-', 173}, // |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
160 {'r', 'O', 174}, // ® |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
161 {'-', '=', 175}, // ¯ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
162 {'~', 'o', 176}, // ° |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
163 {'+', '-', 177}, // ± |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
164 {'2', '2', 178}, // ² |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
165 {'3', '3', 179}, // ³ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
166 {'\'', '\'', 180}, // ´ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
167 {'j', 'u', 181}, // µ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
168 {'p', 'p', 182}, // ¶ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
169 {'~', '.', 183}, // · |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
170 {',', ',', 184}, // ¸ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
171 {'1', '1', 185}, // ¹ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
172 {'o', '-', 186}, // º |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
173 {'>', '>', 187}, // » |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
174 {'1', '4', 188}, // ¼ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
175 {'1', '2', 189}, // ½ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
176 {'3', '4', 190}, // ¾ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
177 {'~', '?', 191}, // ¿ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
178 {'A', '`', 192}, // À |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
179 {'A', '\'', 193}, // Á |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
180 {'A', '^', 194}, // Â |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
181 {'A', '~', 195}, // Ã |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
182 {'A', '"', 196}, // Ä |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
183 {'A', '@', 197}, // Å |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
184 {'A', 'A', 197}, // Å |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
185 {'A', 'E', 198}, // Æ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
186 {'C', ',', 199}, // Ç |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
187 {'E', '`', 200}, // È |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
188 {'E', '\'', 201}, // É |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
189 {'E', '^', 202}, // Ê |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
190 {'E', '"', 203}, // Ë |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
191 {'I', '`', 204}, // Ì |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
192 {'I', '\'', 205}, // Í |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
193 {'I', '^', 206}, // Î |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
194 {'I', '"', 207}, // Ï |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
195 {'D', '-', 208}, // Ð |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
196 {'N', '~', 209}, // Ñ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
197 {'O', '`', 210}, // Ò |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
198 {'O', '\'', 211}, // Ó |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
199 {'O', '^', 212}, // Ô |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
200 {'O', '~', 213}, // Õ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
201 {'O', '"', 214}, // Ö |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
202 {'/', '\\', 215}, // × - multiplication symbol in ISO 8859-1 |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
203 {'O', 'E', 215}, // × - OE in ISO 8859-15 |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
204 {'O', '/', 216}, // Ø |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
205 {'U', '`', 217}, // Ù |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
206 {'U', '\'', 218}, // Ú |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
207 {'U', '^', 219}, // Û |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
208 {'U', '"', 220}, // Ü |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
209 {'Y', '\'', 221}, // Ý |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
210 {'I', 'p', 222}, // Þ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
211 {'s', 's', 223}, // ß |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
212 {'a', '`', 224}, // à |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
213 {'a', '\'', 225}, // á |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
214 {'a', '^', 226}, // â |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
215 {'a', '~', 227}, // ã |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
216 {'a', '"', 228}, // ä |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
217 {'a', '@', 229}, // å |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
218 {'a', 'a', 229}, // å |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
219 {'a', 'e', 230}, // æ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
220 {'c', ',', 231}, // ç |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
221 {'e', '`', 232}, // è |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
222 {'e', '\'', 233}, // é |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
223 {'e', '^', 234}, // ê |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
224 {'e', '"', 235}, // ë |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
225 {'i', '`', 236}, // ì |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
226 {'i', '\'', 237}, // í |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
227 {'i', '^', 238}, // î |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
228 {'i', '"', 239}, // ï |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
229 {'d', '-', 240}, // ð |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
230 {'n', '~', 241}, // ñ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
231 {'o', '`', 242}, // ò |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
232 {'o', '\'', 243}, // ó |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
233 {'o', '^', 244}, // ô |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
234 {'o', '~', 245}, // õ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
235 {'o', '"', 246}, // ö |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
236 {':', '-', 247}, // ÷ - division symbol in ISO 8859-1 |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
237 {'o', 'e', 247}, // ÷ - oe in ISO 8859-15 |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
238 {'o', '/', 248}, // ø |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
239 {'u', '`', 249}, // ù |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
240 {'u', '\'', 250}, // ú |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
241 {'u', '^', 251}, // û |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
242 {'u', '"', 252}, // ü |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
243 {'y', '\'', 253}, // ý |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
244 {'i', 'p', 254}, // þ |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
245 {'y', '"', 255}, // x XX |
7 | 246 {NUL, NUL, NUL} |
247 }; | |
27490
fb4c30606b4a
patch 8.2.4273: the EBCDIC support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
27028
diff
changeset
|
248 # else // OLD_DIGRAPHS |
7 | 249 |
250 /* | |
251 * digraphs for Unicode from RFC1345 | |
252 * (also work for ISO-8859-1 aka latin1) | |
253 */ | |
254 { | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
255 {'N', 'U', 0x0a}, // LF for NUL |
7 | 256 {'S', 'H', 0x01}, |
257 {'S', 'X', 0x02}, | |
258 {'E', 'X', 0x03}, | |
259 {'E', 'T', 0x04}, | |
260 {'E', 'Q', 0x05}, | |
261 {'A', 'K', 0x06}, | |
262 {'B', 'L', 0x07}, | |
263 {'B', 'S', 0x08}, | |
264 {'H', 'T', 0x09}, | |
265 {'L', 'F', 0x0a}, | |
266 {'V', 'T', 0x0b}, | |
267 {'F', 'F', 0x0c}, | |
268 {'C', 'R', 0x0d}, | |
269 {'S', 'O', 0x0e}, | |
270 {'S', 'I', 0x0f}, | |
271 {'D', 'L', 0x10}, | |
272 {'D', '1', 0x11}, | |
273 {'D', '2', 0x12}, | |
274 {'D', '3', 0x13}, | |
275 {'D', '4', 0x14}, | |
276 {'N', 'K', 0x15}, | |
277 {'S', 'Y', 0x16}, | |
278 {'E', 'B', 0x17}, | |
279 {'C', 'N', 0x18}, | |
280 {'E', 'M', 0x19}, | |
281 {'S', 'B', 0x1a}, | |
282 {'E', 'C', 0x1b}, | |
283 {'F', 'S', 0x1c}, | |
284 {'G', 'S', 0x1d}, | |
285 {'R', 'S', 0x1e}, | |
286 {'U', 'S', 0x1f}, | |
287 {'S', 'P', 0x20}, | |
288 {'N', 'b', 0x23}, | |
289 {'D', 'O', 0x24}, | |
290 {'A', 't', 0x40}, | |
291 {'<', '(', 0x5b}, | |
292 {'/', '/', 0x5c}, | |
293 {')', '>', 0x5d}, | |
294 {'\'', '>', 0x5e}, | |
295 {'\'', '!', 0x60}, | |
296 {'(', '!', 0x7b}, | |
297 {'!', '!', 0x7c}, | |
298 {'!', ')', 0x7d}, | |
299 {'\'', '?', 0x7e}, | |
300 {'D', 'T', 0x7f}, | |
301 {'P', 'A', 0x80}, | |
302 {'H', 'O', 0x81}, | |
303 {'B', 'H', 0x82}, | |
304 {'N', 'H', 0x83}, | |
305 {'I', 'N', 0x84}, | |
306 {'N', 'L', 0x85}, | |
307 {'S', 'A', 0x86}, | |
308 {'E', 'S', 0x87}, | |
309 {'H', 'S', 0x88}, | |
310 {'H', 'J', 0x89}, | |
311 {'V', 'S', 0x8a}, | |
312 {'P', 'D', 0x8b}, | |
313 {'P', 'U', 0x8c}, | |
314 {'R', 'I', 0x8d}, | |
315 {'S', '2', 0x8e}, | |
316 {'S', '3', 0x8f}, | |
317 {'D', 'C', 0x90}, | |
318 {'P', '1', 0x91}, | |
319 {'P', '2', 0x92}, | |
320 {'T', 'S', 0x93}, | |
321 {'C', 'C', 0x94}, | |
322 {'M', 'W', 0x95}, | |
323 {'S', 'G', 0x96}, | |
324 {'E', 'G', 0x97}, | |
325 {'S', 'S', 0x98}, | |
326 {'G', 'C', 0x99}, | |
327 {'S', 'C', 0x9a}, | |
328 {'C', 'I', 0x9b}, | |
329 {'S', 'T', 0x9c}, | |
330 {'O', 'C', 0x9d}, | |
331 {'P', 'M', 0x9e}, | |
332 {'A', 'C', 0x9f}, | |
333 {'N', 'S', 0xa0}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
334 # define DG_START_LATIN 0xa1 |
7 | 335 {'!', 'I', 0xa1}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
336 {'~', '!', 0xa1}, // ¡ Vim 5.x compatible |
7 | 337 {'C', 't', 0xa2}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
338 {'c', '|', 0xa2}, // ¢ Vim 5.x compatible |
7 | 339 {'P', 'd', 0xa3}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
340 {'$', '$', 0xa3}, // £ Vim 5.x compatible |
7 | 341 {'C', 'u', 0xa4}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
342 {'o', 'x', 0xa4}, // ¤ Vim 5.x compatible |
7 | 343 {'Y', 'e', 0xa5}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
344 {'Y', '-', 0xa5}, // ¥ Vim 5.x compatible |
7 | 345 {'B', 'B', 0xa6}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
346 {'|', '|', 0xa6}, // ¦ Vim 5.x compatible |
7 | 347 {'S', 'E', 0xa7}, |
348 {'\'', ':', 0xa8}, | |
349 {'C', 'o', 0xa9}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
350 {'c', 'O', 0xa9}, // © Vim 5.x compatible |
7 | 351 {'-', 'a', 0xaa}, |
352 {'<', '<', 0xab}, | |
353 {'N', 'O', 0xac}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
354 {'-', ',', 0xac}, // ¬ Vim 5.x compatible |
7 | 355 {'-', '-', 0xad}, |
356 {'R', 'g', 0xae}, | |
357 {'\'', 'm', 0xaf}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
358 {'-', '=', 0xaf}, // ¯ Vim 5.x compatible |
7 | 359 {'D', 'G', 0xb0}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
360 {'~', 'o', 0xb0}, // ° Vim 5.x compatible |
7 | 361 {'+', '-', 0xb1}, |
362 {'2', 'S', 0xb2}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
363 {'2', '2', 0xb2}, // ² Vim 5.x compatible |
7 | 364 {'3', 'S', 0xb3}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
365 {'3', '3', 0xb3}, // ³ Vim 5.x compatible |
7 | 366 {'\'', '\'', 0xb4}, |
367 {'M', 'y', 0xb5}, | |
368 {'P', 'I', 0xb6}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
369 {'p', 'p', 0xb6}, // ¶ Vim 5.x compatible |
7 | 370 {'.', 'M', 0xb7}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
371 {'~', '.', 0xb7}, // · Vim 5.x compatible |
7 | 372 {'\'', ',', 0xb8}, |
373 {'1', 'S', 0xb9}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
374 {'1', '1', 0xb9}, // ¹ Vim 5.x compatible |
7 | 375 {'-', 'o', 0xba}, |
376 {'>', '>', 0xbb}, | |
377 {'1', '4', 0xbc}, | |
378 {'1', '2', 0xbd}, | |
379 {'3', '4', 0xbe}, | |
380 {'?', 'I', 0xbf}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
381 {'~', '?', 0xbf}, // ¿ Vim 5.x compatible |
7 | 382 {'A', '!', 0xc0}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
383 {'A', '`', 0xc0}, // À Vim 5.x compatible |
7 | 384 {'A', '\'', 0xc1}, |
385 {'A', '>', 0xc2}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
386 {'A', '^', 0xc2}, // Â Vim 5.x compatible |
7 | 387 {'A', '?', 0xc3}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
388 {'A', '~', 0xc3}, // Ã Vim 5.x compatible |
7 | 389 {'A', ':', 0xc4}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
390 {'A', '"', 0xc4}, // Ä Vim 5.x compatible |
7 | 391 {'A', 'A', 0xc5}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
392 {'A', '@', 0xc5}, // Å Vim 5.x compatible |
7 | 393 {'A', 'E', 0xc6}, |
394 {'C', ',', 0xc7}, | |
395 {'E', '!', 0xc8}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
396 {'E', '`', 0xc8}, // È Vim 5.x compatible |
7 | 397 {'E', '\'', 0xc9}, |
398 {'E', '>', 0xca}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
399 {'E', '^', 0xca}, // Ê Vim 5.x compatible |
7 | 400 {'E', ':', 0xcb}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
401 {'E', '"', 0xcb}, // Ë Vim 5.x compatible |
7 | 402 {'I', '!', 0xcc}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
403 {'I', '`', 0xcc}, // Ì Vim 5.x compatible |
7 | 404 {'I', '\'', 0xcd}, |
405 {'I', '>', 0xce}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
406 {'I', '^', 0xce}, // Î Vim 5.x compatible |
7 | 407 {'I', ':', 0xcf}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
408 {'I', '"', 0xcf}, // Ï Vim 5.x compatible |
7 | 409 {'D', '-', 0xd0}, |
410 {'N', '?', 0xd1}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
411 {'N', '~', 0xd1}, // Ñ Vim 5.x compatible |
7 | 412 {'O', '!', 0xd2}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
413 {'O', '`', 0xd2}, // Ò Vim 5.x compatible |
7 | 414 {'O', '\'', 0xd3}, |
415 {'O', '>', 0xd4}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
416 {'O', '^', 0xd4}, // Ô Vim 5.x compatible |
7 | 417 {'O', '?', 0xd5}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
418 {'O', '~', 0xd5}, // Õ Vim 5.x compatible |
7 | 419 {'O', ':', 0xd6}, |
420 {'*', 'X', 0xd7}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
421 {'/', '\\', 0xd7}, // × Vim 5.x compatible |
7 | 422 {'O', '/', 0xd8}, |
423 {'U', '!', 0xd9}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
424 {'U', '`', 0xd9}, // Ù Vim 5.x compatible |
7 | 425 {'U', '\'', 0xda}, |
426 {'U', '>', 0xdb}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
427 {'U', '^', 0xdb}, // Û Vim 5.x compatible |
7 | 428 {'U', ':', 0xdc}, |
429 {'Y', '\'', 0xdd}, | |
430 {'T', 'H', 0xde}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
431 {'I', 'p', 0xde}, // Þ Vim 5.x compatible |
7 | 432 {'s', 's', 0xdf}, |
433 {'a', '!', 0xe0}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
434 {'a', '`', 0xe0}, // à Vim 5.x compatible |
7 | 435 {'a', '\'', 0xe1}, |
436 {'a', '>', 0xe2}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
437 {'a', '^', 0xe2}, // â Vim 5.x compatible |
7 | 438 {'a', '?', 0xe3}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
439 {'a', '~', 0xe3}, // ã Vim 5.x compatible |
7 | 440 {'a', ':', 0xe4}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
441 {'a', '"', 0xe4}, // ä Vim 5.x compatible |
7 | 442 {'a', 'a', 0xe5}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
443 {'a', '@', 0xe5}, // å Vim 5.x compatible |
7 | 444 {'a', 'e', 0xe6}, |
445 {'c', ',', 0xe7}, | |
446 {'e', '!', 0xe8}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
447 {'e', '`', 0xe8}, // è Vim 5.x compatible |
7 | 448 {'e', '\'', 0xe9}, |
449 {'e', '>', 0xea}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
450 {'e', '^', 0xea}, // ê Vim 5.x compatible |
7 | 451 {'e', ':', 0xeb}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
452 {'e', '"', 0xeb}, // ë Vim 5.x compatible |
7 | 453 {'i', '!', 0xec}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
454 {'i', '`', 0xec}, // ì Vim 5.x compatible |
7 | 455 {'i', '\'', 0xed}, |
456 {'i', '>', 0xee}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
457 {'i', '^', 0xee}, // î Vim 5.x compatible |
7 | 458 {'i', ':', 0xef}, |
459 {'d', '-', 0xf0}, | |
460 {'n', '?', 0xf1}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
461 {'n', '~', 0xf1}, // ñ Vim 5.x compatible |
7 | 462 {'o', '!', 0xf2}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
463 {'o', '`', 0xf2}, // ò Vim 5.x compatible |
7 | 464 {'o', '\'', 0xf3}, |
465 {'o', '>', 0xf4}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
466 {'o', '^', 0xf4}, // ô Vim 5.x compatible |
7 | 467 {'o', '?', 0xf5}, |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
468 {'o', '~', 0xf5}, // õ Vim 5.x compatible |
7 | 469 {'o', ':', 0xf6}, |
470 {'-', ':', 0xf7}, | |
471 {'o', '/', 0xf8}, | |
472 {'u', '!', 0xf9}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
473 {'u', '`', 0xf9}, // ù Vim 5.x compatible |
7 | 474 {'u', '\'', 0xfa}, |
475 {'u', '>', 0xfb}, | |
17853
c90ca5b9fc0d
patch 8.1.1923: some source files are not in a normal encoding
Bram Moolenaar <Bram@vim.org>
parents:
17789
diff
changeset
|
476 {'u', '^', 0xfb}, // û Vim 5.x compatible |
7 | 477 {'u', ':', 0xfc}, |
478 {'y', '\'', 0xfd}, | |
479 {'t', 'h', 0xfe}, | |
480 {'y', ':', 0xff}, | |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
481 {'y', '"', 0xff}, // x XX Vim 5.x compatible |
7 | 482 |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
483 # define USE_UNICODE_DIGRAPHS |
7 | 484 |
485 {'A', '-', 0x0100}, | |
486 {'a', '-', 0x0101}, | |
487 {'A', '(', 0x0102}, | |
488 {'a', '(', 0x0103}, | |
489 {'A', ';', 0x0104}, | |
490 {'a', ';', 0x0105}, | |
491 {'C', '\'', 0x0106}, | |
492 {'c', '\'', 0x0107}, | |
493 {'C', '>', 0x0108}, | |
494 {'c', '>', 0x0109}, | |
495 {'C', '.', 0x010a}, | |
496 {'c', '.', 0x010b}, | |
497 {'C', '<', 0x010c}, | |
498 {'c', '<', 0x010d}, | |
499 {'D', '<', 0x010e}, | |
500 {'d', '<', 0x010f}, | |
501 {'D', '/', 0x0110}, | |
502 {'d', '/', 0x0111}, | |
503 {'E', '-', 0x0112}, | |
504 {'e', '-', 0x0113}, | |
505 {'E', '(', 0x0114}, | |
506 {'e', '(', 0x0115}, | |
507 {'E', '.', 0x0116}, | |
508 {'e', '.', 0x0117}, | |
509 {'E', ';', 0x0118}, | |
510 {'e', ';', 0x0119}, | |
511 {'E', '<', 0x011a}, | |
512 {'e', '<', 0x011b}, | |
513 {'G', '>', 0x011c}, | |
514 {'g', '>', 0x011d}, | |
515 {'G', '(', 0x011e}, | |
516 {'g', '(', 0x011f}, | |
517 {'G', '.', 0x0120}, | |
518 {'g', '.', 0x0121}, | |
519 {'G', ',', 0x0122}, | |
520 {'g', ',', 0x0123}, | |
521 {'H', '>', 0x0124}, | |
522 {'h', '>', 0x0125}, | |
523 {'H', '/', 0x0126}, | |
524 {'h', '/', 0x0127}, | |
525 {'I', '?', 0x0128}, | |
526 {'i', '?', 0x0129}, | |
527 {'I', '-', 0x012a}, | |
528 {'i', '-', 0x012b}, | |
529 {'I', '(', 0x012c}, | |
530 {'i', '(', 0x012d}, | |
531 {'I', ';', 0x012e}, | |
532 {'i', ';', 0x012f}, | |
533 {'I', '.', 0x0130}, | |
534 {'i', '.', 0x0131}, | |
535 {'I', 'J', 0x0132}, | |
536 {'i', 'j', 0x0133}, | |
537 {'J', '>', 0x0134}, | |
538 {'j', '>', 0x0135}, | |
539 {'K', ',', 0x0136}, | |
540 {'k', ',', 0x0137}, | |
541 {'k', 'k', 0x0138}, | |
542 {'L', '\'', 0x0139}, | |
543 {'l', '\'', 0x013a}, | |
544 {'L', ',', 0x013b}, | |
545 {'l', ',', 0x013c}, | |
546 {'L', '<', 0x013d}, | |
547 {'l', '<', 0x013e}, | |
548 {'L', '.', 0x013f}, | |
549 {'l', '.', 0x0140}, | |
550 {'L', '/', 0x0141}, | |
551 {'l', '/', 0x0142}, | |
552 {'N', '\'', 0x0143}, | |
553 {'n', '\'', 0x0144}, | |
554 {'N', ',', 0x0145}, | |
555 {'n', ',', 0x0146}, | |
556 {'N', '<', 0x0147}, | |
557 {'n', '<', 0x0148}, | |
558 {'\'', 'n', 0x0149}, | |
559 {'N', 'G', 0x014a}, | |
560 {'n', 'g', 0x014b}, | |
561 {'O', '-', 0x014c}, | |
562 {'o', '-', 0x014d}, | |
563 {'O', '(', 0x014e}, | |
564 {'o', '(', 0x014f}, | |
565 {'O', '"', 0x0150}, | |
566 {'o', '"', 0x0151}, | |
567 {'O', 'E', 0x0152}, | |
568 {'o', 'e', 0x0153}, | |
569 {'R', '\'', 0x0154}, | |
570 {'r', '\'', 0x0155}, | |
571 {'R', ',', 0x0156}, | |
572 {'r', ',', 0x0157}, | |
573 {'R', '<', 0x0158}, | |
574 {'r', '<', 0x0159}, | |
575 {'S', '\'', 0x015a}, | |
576 {'s', '\'', 0x015b}, | |
577 {'S', '>', 0x015c}, | |
578 {'s', '>', 0x015d}, | |
579 {'S', ',', 0x015e}, | |
580 {'s', ',', 0x015f}, | |
581 {'S', '<', 0x0160}, | |
582 {'s', '<', 0x0161}, | |
583 {'T', ',', 0x0162}, | |
584 {'t', ',', 0x0163}, | |
585 {'T', '<', 0x0164}, | |
586 {'t', '<', 0x0165}, | |
587 {'T', '/', 0x0166}, | |
588 {'t', '/', 0x0167}, | |
589 {'U', '?', 0x0168}, | |
590 {'u', '?', 0x0169}, | |
591 {'U', '-', 0x016a}, | |
592 {'u', '-', 0x016b}, | |
593 {'U', '(', 0x016c}, | |
594 {'u', '(', 0x016d}, | |
595 {'U', '0', 0x016e}, | |
596 {'u', '0', 0x016f}, | |
597 {'U', '"', 0x0170}, | |
598 {'u', '"', 0x0171}, | |
599 {'U', ';', 0x0172}, | |
600 {'u', ';', 0x0173}, | |
601 {'W', '>', 0x0174}, | |
602 {'w', '>', 0x0175}, | |
603 {'Y', '>', 0x0176}, | |
604 {'y', '>', 0x0177}, | |
605 {'Y', ':', 0x0178}, | |
606 {'Z', '\'', 0x0179}, | |
607 {'z', '\'', 0x017a}, | |
608 {'Z', '.', 0x017b}, | |
609 {'z', '.', 0x017c}, | |
610 {'Z', '<', 0x017d}, | |
611 {'z', '<', 0x017e}, | |
612 {'O', '9', 0x01a0}, | |
613 {'o', '9', 0x01a1}, | |
614 {'O', 'I', 0x01a2}, | |
615 {'o', 'i', 0x01a3}, | |
616 {'y', 'r', 0x01a6}, | |
617 {'U', '9', 0x01af}, | |
618 {'u', '9', 0x01b0}, | |
619 {'Z', '/', 0x01b5}, | |
620 {'z', '/', 0x01b6}, | |
621 {'E', 'D', 0x01b7}, | |
622 {'A', '<', 0x01cd}, | |
623 {'a', '<', 0x01ce}, | |
624 {'I', '<', 0x01cf}, | |
625 {'i', '<', 0x01d0}, | |
626 {'O', '<', 0x01d1}, | |
627 {'o', '<', 0x01d2}, | |
628 {'U', '<', 0x01d3}, | |
629 {'u', '<', 0x01d4}, | |
630 {'A', '1', 0x01de}, | |
631 {'a', '1', 0x01df}, | |
632 {'A', '7', 0x01e0}, | |
633 {'a', '7', 0x01e1}, | |
634 {'A', '3', 0x01e2}, | |
635 {'a', '3', 0x01e3}, | |
636 {'G', '/', 0x01e4}, | |
637 {'g', '/', 0x01e5}, | |
638 {'G', '<', 0x01e6}, | |
639 {'g', '<', 0x01e7}, | |
640 {'K', '<', 0x01e8}, | |
641 {'k', '<', 0x01e9}, | |
642 {'O', ';', 0x01ea}, | |
643 {'o', ';', 0x01eb}, | |
644 {'O', '1', 0x01ec}, | |
645 {'o', '1', 0x01ed}, | |
646 {'E', 'Z', 0x01ee}, | |
647 {'e', 'z', 0x01ef}, | |
648 {'j', '<', 0x01f0}, | |
649 {'G', '\'', 0x01f4}, | |
650 {'g', '\'', 0x01f5}, | |
651 {';', 'S', 0x02bf}, | |
652 {'\'', '<', 0x02c7}, | |
653 {'\'', '(', 0x02d8}, | |
654 {'\'', '.', 0x02d9}, | |
655 {'\'', '0', 0x02da}, | |
656 {'\'', ';', 0x02db}, | |
657 {'\'', '"', 0x02dd}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
658 # define DG_START_GREEK 0x0386 |
7 | 659 {'A', '%', 0x0386}, |
660 {'E', '%', 0x0388}, | |
661 {'Y', '%', 0x0389}, | |
662 {'I', '%', 0x038a}, | |
663 {'O', '%', 0x038c}, | |
664 {'U', '%', 0x038e}, | |
665 {'W', '%', 0x038f}, | |
666 {'i', '3', 0x0390}, | |
667 {'A', '*', 0x0391}, | |
668 {'B', '*', 0x0392}, | |
669 {'G', '*', 0x0393}, | |
670 {'D', '*', 0x0394}, | |
671 {'E', '*', 0x0395}, | |
672 {'Z', '*', 0x0396}, | |
673 {'Y', '*', 0x0397}, | |
674 {'H', '*', 0x0398}, | |
675 {'I', '*', 0x0399}, | |
676 {'K', '*', 0x039a}, | |
677 {'L', '*', 0x039b}, | |
678 {'M', '*', 0x039c}, | |
679 {'N', '*', 0x039d}, | |
680 {'C', '*', 0x039e}, | |
681 {'O', '*', 0x039f}, | |
682 {'P', '*', 0x03a0}, | |
683 {'R', '*', 0x03a1}, | |
684 {'S', '*', 0x03a3}, | |
685 {'T', '*', 0x03a4}, | |
686 {'U', '*', 0x03a5}, | |
687 {'F', '*', 0x03a6}, | |
688 {'X', '*', 0x03a7}, | |
689 {'Q', '*', 0x03a8}, | |
690 {'W', '*', 0x03a9}, | |
691 {'J', '*', 0x03aa}, | |
692 {'V', '*', 0x03ab}, | |
693 {'a', '%', 0x03ac}, | |
694 {'e', '%', 0x03ad}, | |
695 {'y', '%', 0x03ae}, | |
696 {'i', '%', 0x03af}, | |
697 {'u', '3', 0x03b0}, | |
698 {'a', '*', 0x03b1}, | |
699 {'b', '*', 0x03b2}, | |
700 {'g', '*', 0x03b3}, | |
701 {'d', '*', 0x03b4}, | |
702 {'e', '*', 0x03b5}, | |
703 {'z', '*', 0x03b6}, | |
704 {'y', '*', 0x03b7}, | |
705 {'h', '*', 0x03b8}, | |
706 {'i', '*', 0x03b9}, | |
707 {'k', '*', 0x03ba}, | |
708 {'l', '*', 0x03bb}, | |
709 {'m', '*', 0x03bc}, | |
710 {'n', '*', 0x03bd}, | |
711 {'c', '*', 0x03be}, | |
712 {'o', '*', 0x03bf}, | |
713 {'p', '*', 0x03c0}, | |
714 {'r', '*', 0x03c1}, | |
715 {'*', 's', 0x03c2}, | |
716 {'s', '*', 0x03c3}, | |
717 {'t', '*', 0x03c4}, | |
718 {'u', '*', 0x03c5}, | |
719 {'f', '*', 0x03c6}, | |
720 {'x', '*', 0x03c7}, | |
721 {'q', '*', 0x03c8}, | |
722 {'w', '*', 0x03c9}, | |
723 {'j', '*', 0x03ca}, | |
724 {'v', '*', 0x03cb}, | |
725 {'o', '%', 0x03cc}, | |
726 {'u', '%', 0x03cd}, | |
727 {'w', '%', 0x03ce}, | |
728 {'\'', 'G', 0x03d8}, | |
729 {',', 'G', 0x03d9}, | |
730 {'T', '3', 0x03da}, | |
731 {'t', '3', 0x03db}, | |
732 {'M', '3', 0x03dc}, | |
733 {'m', '3', 0x03dd}, | |
734 {'K', '3', 0x03de}, | |
735 {'k', '3', 0x03df}, | |
736 {'P', '3', 0x03e0}, | |
737 {'p', '3', 0x03e1}, | |
738 {'\'', '%', 0x03f4}, | |
739 {'j', '3', 0x03f5}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
740 # define DG_START_CYRILLIC 0x0401 |
7 | 741 {'I', 'O', 0x0401}, |
742 {'D', '%', 0x0402}, | |
743 {'G', '%', 0x0403}, | |
744 {'I', 'E', 0x0404}, | |
745 {'D', 'S', 0x0405}, | |
746 {'I', 'I', 0x0406}, | |
747 {'Y', 'I', 0x0407}, | |
748 {'J', '%', 0x0408}, | |
749 {'L', 'J', 0x0409}, | |
750 {'N', 'J', 0x040a}, | |
751 {'T', 's', 0x040b}, | |
752 {'K', 'J', 0x040c}, | |
753 {'V', '%', 0x040e}, | |
754 {'D', 'Z', 0x040f}, | |
755 {'A', '=', 0x0410}, | |
756 {'B', '=', 0x0411}, | |
757 {'V', '=', 0x0412}, | |
758 {'G', '=', 0x0413}, | |
759 {'D', '=', 0x0414}, | |
760 {'E', '=', 0x0415}, | |
761 {'Z', '%', 0x0416}, | |
762 {'Z', '=', 0x0417}, | |
763 {'I', '=', 0x0418}, | |
764 {'J', '=', 0x0419}, | |
765 {'K', '=', 0x041a}, | |
766 {'L', '=', 0x041b}, | |
767 {'M', '=', 0x041c}, | |
768 {'N', '=', 0x041d}, | |
769 {'O', '=', 0x041e}, | |
770 {'P', '=', 0x041f}, | |
771 {'R', '=', 0x0420}, | |
772 {'S', '=', 0x0421}, | |
773 {'T', '=', 0x0422}, | |
774 {'U', '=', 0x0423}, | |
775 {'F', '=', 0x0424}, | |
776 {'H', '=', 0x0425}, | |
777 {'C', '=', 0x0426}, | |
778 {'C', '%', 0x0427}, | |
779 {'S', '%', 0x0428}, | |
780 {'S', 'c', 0x0429}, | |
781 {'=', '"', 0x042a}, | |
782 {'Y', '=', 0x042b}, | |
783 {'%', '"', 0x042c}, | |
784 {'J', 'E', 0x042d}, | |
785 {'J', 'U', 0x042e}, | |
786 {'J', 'A', 0x042f}, | |
787 {'a', '=', 0x0430}, | |
788 {'b', '=', 0x0431}, | |
789 {'v', '=', 0x0432}, | |
790 {'g', '=', 0x0433}, | |
791 {'d', '=', 0x0434}, | |
792 {'e', '=', 0x0435}, | |
793 {'z', '%', 0x0436}, | |
794 {'z', '=', 0x0437}, | |
795 {'i', '=', 0x0438}, | |
796 {'j', '=', 0x0439}, | |
797 {'k', '=', 0x043a}, | |
798 {'l', '=', 0x043b}, | |
799 {'m', '=', 0x043c}, | |
800 {'n', '=', 0x043d}, | |
801 {'o', '=', 0x043e}, | |
802 {'p', '=', 0x043f}, | |
803 {'r', '=', 0x0440}, | |
804 {'s', '=', 0x0441}, | |
805 {'t', '=', 0x0442}, | |
806 {'u', '=', 0x0443}, | |
807 {'f', '=', 0x0444}, | |
808 {'h', '=', 0x0445}, | |
809 {'c', '=', 0x0446}, | |
810 {'c', '%', 0x0447}, | |
811 {'s', '%', 0x0448}, | |
812 {'s', 'c', 0x0449}, | |
813 {'=', '\'', 0x044a}, | |
814 {'y', '=', 0x044b}, | |
815 {'%', '\'', 0x044c}, | |
816 {'j', 'e', 0x044d}, | |
817 {'j', 'u', 0x044e}, | |
818 {'j', 'a', 0x044f}, | |
819 {'i', 'o', 0x0451}, | |
820 {'d', '%', 0x0452}, | |
821 {'g', '%', 0x0453}, | |
822 {'i', 'e', 0x0454}, | |
823 {'d', 's', 0x0455}, | |
824 {'i', 'i', 0x0456}, | |
825 {'y', 'i', 0x0457}, | |
826 {'j', '%', 0x0458}, | |
827 {'l', 'j', 0x0459}, | |
828 {'n', 'j', 0x045a}, | |
829 {'t', 's', 0x045b}, | |
830 {'k', 'j', 0x045c}, | |
831 {'v', '%', 0x045e}, | |
832 {'d', 'z', 0x045f}, | |
833 {'Y', '3', 0x0462}, | |
834 {'y', '3', 0x0463}, | |
835 {'O', '3', 0x046a}, | |
836 {'o', '3', 0x046b}, | |
837 {'F', '3', 0x0472}, | |
838 {'f', '3', 0x0473}, | |
839 {'V', '3', 0x0474}, | |
840 {'v', '3', 0x0475}, | |
841 {'C', '3', 0x0480}, | |
842 {'c', '3', 0x0481}, | |
843 {'G', '3', 0x0490}, | |
844 {'g', '3', 0x0491}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
845 # define DG_START_HEBREW 0x05d0 |
7 | 846 {'A', '+', 0x05d0}, |
847 {'B', '+', 0x05d1}, | |
848 {'G', '+', 0x05d2}, | |
849 {'D', '+', 0x05d3}, | |
850 {'H', '+', 0x05d4}, | |
851 {'W', '+', 0x05d5}, | |
852 {'Z', '+', 0x05d6}, | |
853 {'X', '+', 0x05d7}, | |
854 {'T', 'j', 0x05d8}, | |
855 {'J', '+', 0x05d9}, | |
856 {'K', '%', 0x05da}, | |
857 {'K', '+', 0x05db}, | |
858 {'L', '+', 0x05dc}, | |
859 {'M', '%', 0x05dd}, | |
860 {'M', '+', 0x05de}, | |
861 {'N', '%', 0x05df}, | |
862 {'N', '+', 0x05e0}, | |
863 {'S', '+', 0x05e1}, | |
864 {'E', '+', 0x05e2}, | |
865 {'P', '%', 0x05e3}, | |
866 {'P', '+', 0x05e4}, | |
867 {'Z', 'j', 0x05e5}, | |
868 {'Z', 'J', 0x05e6}, | |
869 {'Q', '+', 0x05e7}, | |
870 {'R', '+', 0x05e8}, | |
871 {'S', 'h', 0x05e9}, | |
872 {'T', '+', 0x05ea}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
873 # define DG_START_ARABIC 0x060c |
7 | 874 {',', '+', 0x060c}, |
875 {';', '+', 0x061b}, | |
876 {'?', '+', 0x061f}, | |
877 {'H', '\'', 0x0621}, | |
878 {'a', 'M', 0x0622}, | |
879 {'a', 'H', 0x0623}, | |
880 {'w', 'H', 0x0624}, | |
881 {'a', 'h', 0x0625}, | |
882 {'y', 'H', 0x0626}, | |
883 {'a', '+', 0x0627}, | |
884 {'b', '+', 0x0628}, | |
885 {'t', 'm', 0x0629}, | |
886 {'t', '+', 0x062a}, | |
887 {'t', 'k', 0x062b}, | |
888 {'g', '+', 0x062c}, | |
889 {'h', 'k', 0x062d}, | |
890 {'x', '+', 0x062e}, | |
891 {'d', '+', 0x062f}, | |
892 {'d', 'k', 0x0630}, | |
893 {'r', '+', 0x0631}, | |
894 {'z', '+', 0x0632}, | |
895 {'s', '+', 0x0633}, | |
896 {'s', 'n', 0x0634}, | |
897 {'c', '+', 0x0635}, | |
898 {'d', 'd', 0x0636}, | |
899 {'t', 'j', 0x0637}, | |
900 {'z', 'H', 0x0638}, | |
901 {'e', '+', 0x0639}, | |
902 {'i', '+', 0x063a}, | |
903 {'+', '+', 0x0640}, | |
904 {'f', '+', 0x0641}, | |
905 {'q', '+', 0x0642}, | |
906 {'k', '+', 0x0643}, | |
907 {'l', '+', 0x0644}, | |
908 {'m', '+', 0x0645}, | |
909 {'n', '+', 0x0646}, | |
910 {'h', '+', 0x0647}, | |
911 {'w', '+', 0x0648}, | |
912 {'j', '+', 0x0649}, | |
913 {'y', '+', 0x064a}, | |
914 {':', '+', 0x064b}, | |
915 {'"', '+', 0x064c}, | |
916 {'=', '+', 0x064d}, | |
917 {'/', '+', 0x064e}, | |
918 {'\'', '+', 0x064f}, | |
919 {'1', '+', 0x0650}, | |
920 {'3', '+', 0x0651}, | |
921 {'0', '+', 0x0652}, | |
922 {'a', 'S', 0x0670}, | |
923 {'p', '+', 0x067e}, | |
924 {'v', '+', 0x06a4}, | |
925 {'g', 'f', 0x06af}, | |
926 {'0', 'a', 0x06f0}, | |
927 {'1', 'a', 0x06f1}, | |
928 {'2', 'a', 0x06f2}, | |
929 {'3', 'a', 0x06f3}, | |
930 {'4', 'a', 0x06f4}, | |
931 {'5', 'a', 0x06f5}, | |
932 {'6', 'a', 0x06f6}, | |
933 {'7', 'a', 0x06f7}, | |
934 {'8', 'a', 0x06f8}, | |
935 {'9', 'a', 0x06f9}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
936 # define DG_START_LATIN_EXTENDED 0x1e02 |
7 | 937 {'B', '.', 0x1e02}, |
938 {'b', '.', 0x1e03}, | |
939 {'B', '_', 0x1e06}, | |
940 {'b', '_', 0x1e07}, | |
941 {'D', '.', 0x1e0a}, | |
942 {'d', '.', 0x1e0b}, | |
943 {'D', '_', 0x1e0e}, | |
944 {'d', '_', 0x1e0f}, | |
945 {'D', ',', 0x1e10}, | |
946 {'d', ',', 0x1e11}, | |
947 {'F', '.', 0x1e1e}, | |
948 {'f', '.', 0x1e1f}, | |
949 {'G', '-', 0x1e20}, | |
950 {'g', '-', 0x1e21}, | |
951 {'H', '.', 0x1e22}, | |
952 {'h', '.', 0x1e23}, | |
953 {'H', ':', 0x1e26}, | |
954 {'h', ':', 0x1e27}, | |
955 {'H', ',', 0x1e28}, | |
956 {'h', ',', 0x1e29}, | |
957 {'K', '\'', 0x1e30}, | |
958 {'k', '\'', 0x1e31}, | |
959 {'K', '_', 0x1e34}, | |
960 {'k', '_', 0x1e35}, | |
961 {'L', '_', 0x1e3a}, | |
962 {'l', '_', 0x1e3b}, | |
963 {'M', '\'', 0x1e3e}, | |
964 {'m', '\'', 0x1e3f}, | |
965 {'M', '.', 0x1e40}, | |
966 {'m', '.', 0x1e41}, | |
967 {'N', '.', 0x1e44}, | |
968 {'n', '.', 0x1e45}, | |
969 {'N', '_', 0x1e48}, | |
970 {'n', '_', 0x1e49}, | |
971 {'P', '\'', 0x1e54}, | |
972 {'p', '\'', 0x1e55}, | |
973 {'P', '.', 0x1e56}, | |
974 {'p', '.', 0x1e57}, | |
975 {'R', '.', 0x1e58}, | |
976 {'r', '.', 0x1e59}, | |
977 {'R', '_', 0x1e5e}, | |
978 {'r', '_', 0x1e5f}, | |
979 {'S', '.', 0x1e60}, | |
980 {'s', '.', 0x1e61}, | |
981 {'T', '.', 0x1e6a}, | |
982 {'t', '.', 0x1e6b}, | |
983 {'T', '_', 0x1e6e}, | |
984 {'t', '_', 0x1e6f}, | |
985 {'V', '?', 0x1e7c}, | |
986 {'v', '?', 0x1e7d}, | |
987 {'W', '!', 0x1e80}, | |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
988 {'W', '`', 0x1e80}, // extra alternative, easier to remember |
7 | 989 {'w', '!', 0x1e81}, |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
990 {'w', '`', 0x1e81}, // extra alternative, easier to remember |
7 | 991 {'W', '\'', 0x1e82}, |
992 {'w', '\'', 0x1e83}, | |
993 {'W', ':', 0x1e84}, | |
994 {'w', ':', 0x1e85}, | |
995 {'W', '.', 0x1e86}, | |
996 {'w', '.', 0x1e87}, | |
997 {'X', '.', 0x1e8a}, | |
998 {'x', '.', 0x1e8b}, | |
999 {'X', ':', 0x1e8c}, | |
1000 {'x', ':', 0x1e8d}, | |
1001 {'Y', '.', 0x1e8e}, | |
1002 {'y', '.', 0x1e8f}, | |
1003 {'Z', '>', 0x1e90}, | |
1004 {'z', '>', 0x1e91}, | |
1005 {'Z', '_', 0x1e94}, | |
1006 {'z', '_', 0x1e95}, | |
1007 {'h', '_', 0x1e96}, | |
1008 {'t', ':', 0x1e97}, | |
1009 {'w', '0', 0x1e98}, | |
1010 {'y', '0', 0x1e99}, | |
1011 {'A', '2', 0x1ea2}, | |
1012 {'a', '2', 0x1ea3}, | |
1013 {'E', '2', 0x1eba}, | |
1014 {'e', '2', 0x1ebb}, | |
1015 {'E', '?', 0x1ebc}, | |
1016 {'e', '?', 0x1ebd}, | |
1017 {'I', '2', 0x1ec8}, | |
1018 {'i', '2', 0x1ec9}, | |
1019 {'O', '2', 0x1ece}, | |
1020 {'o', '2', 0x1ecf}, | |
1021 {'U', '2', 0x1ee6}, | |
1022 {'u', '2', 0x1ee7}, | |
1023 {'Y', '!', 0x1ef2}, | |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1024 {'Y', '`', 0x1ef2}, // extra alternative, easier to remember |
7 | 1025 {'y', '!', 0x1ef3}, |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1026 {'y', '`', 0x1ef3}, // extra alternative, easier to remember |
7 | 1027 {'Y', '2', 0x1ef6}, |
1028 {'y', '2', 0x1ef7}, | |
1029 {'Y', '?', 0x1ef8}, | |
1030 {'y', '?', 0x1ef9}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1031 # define DG_START_GREEK_EXTENDED 0x1f00 |
7 | 1032 {';', '\'', 0x1f00}, |
1033 {',', '\'', 0x1f01}, | |
1034 {';', '!', 0x1f02}, | |
1035 {',', '!', 0x1f03}, | |
1036 {'?', ';', 0x1f04}, | |
1037 {'?', ',', 0x1f05}, | |
1038 {'!', ':', 0x1f06}, | |
1039 {'?', ':', 0x1f07}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1040 # define DG_START_PUNCTUATION 0x2002 |
7 | 1041 {'1', 'N', 0x2002}, |
1042 {'1', 'M', 0x2003}, | |
1043 {'3', 'M', 0x2004}, | |
1044 {'4', 'M', 0x2005}, | |
1045 {'6', 'M', 0x2006}, | |
1046 {'1', 'T', 0x2009}, | |
1047 {'1', 'H', 0x200a}, | |
1048 {'-', '1', 0x2010}, | |
1049 {'-', 'N', 0x2013}, | |
1050 {'-', 'M', 0x2014}, | |
1051 {'-', '3', 0x2015}, | |
1052 {'!', '2', 0x2016}, | |
1053 {'=', '2', 0x2017}, | |
1054 {'\'', '6', 0x2018}, | |
1055 {'\'', '9', 0x2019}, | |
1056 {'.', '9', 0x201a}, | |
1057 {'9', '\'', 0x201b}, | |
1058 {'"', '6', 0x201c}, | |
1059 {'"', '9', 0x201d}, | |
1060 {':', '9', 0x201e}, | |
1061 {'9', '"', 0x201f}, | |
1062 {'/', '-', 0x2020}, | |
1063 {'/', '=', 0x2021}, | |
22172
1b23391fac7e
patch 8.2.1635: no digraph for 0x2022 BULLET
Bram Moolenaar <Bram@vim.org>
parents:
21329
diff
changeset
|
1064 {'o', 'o', 0x2022}, |
7 | 1065 {'.', '.', 0x2025}, |
10334
086117f5fb71
commit https://github.com/vim/vim/commit/81615517249bb78cba9c37c9834b787c1b265521
Christian Brabandt <cb@256bit.org>
parents:
10042
diff
changeset
|
1066 {',', '.', 0x2026}, |
7 | 1067 {'%', '0', 0x2030}, |
1068 {'1', '\'', 0x2032}, | |
1069 {'2', '\'', 0x2033}, | |
1070 {'3', '\'', 0x2034}, | |
1071 {'1', '"', 0x2035}, | |
1072 {'2', '"', 0x2036}, | |
1073 {'3', '"', 0x2037}, | |
1074 {'C', 'a', 0x2038}, | |
1075 {'<', '1', 0x2039}, | |
1076 {'>', '1', 0x203a}, | |
1077 {':', 'X', 0x203b}, | |
1078 {'\'', '-', 0x203e}, | |
1079 {'/', 'f', 0x2044}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1080 # define DG_START_SUB_SUPER 0x2070 |
7 | 1081 {'0', 'S', 0x2070}, |
1082 {'4', 'S', 0x2074}, | |
1083 {'5', 'S', 0x2075}, | |
1084 {'6', 'S', 0x2076}, | |
1085 {'7', 'S', 0x2077}, | |
1086 {'8', 'S', 0x2078}, | |
1087 {'9', 'S', 0x2079}, | |
1088 {'+', 'S', 0x207a}, | |
1089 {'-', 'S', 0x207b}, | |
1090 {'=', 'S', 0x207c}, | |
1091 {'(', 'S', 0x207d}, | |
1092 {')', 'S', 0x207e}, | |
1093 {'n', 'S', 0x207f}, | |
1094 {'0', 's', 0x2080}, | |
1095 {'1', 's', 0x2081}, | |
1096 {'2', 's', 0x2082}, | |
1097 {'3', 's', 0x2083}, | |
1098 {'4', 's', 0x2084}, | |
1099 {'5', 's', 0x2085}, | |
1100 {'6', 's', 0x2086}, | |
1101 {'7', 's', 0x2087}, | |
1102 {'8', 's', 0x2088}, | |
1103 {'9', 's', 0x2089}, | |
1104 {'+', 's', 0x208a}, | |
1105 {'-', 's', 0x208b}, | |
1106 {'=', 's', 0x208c}, | |
1107 {'(', 's', 0x208d}, | |
1108 {')', 's', 0x208e}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1109 # define DG_START_CURRENCY 0x20a4 |
7 | 1110 {'L', 'i', 0x20a4}, |
1111 {'P', 't', 0x20a7}, | |
1112 {'W', '=', 0x20a9}, | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1113 {'=', 'e', 0x20ac}, // euro |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1114 {'E', 'u', 0x20ac}, // euro |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1115 {'=', 'R', 0x20bd}, // rouble |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1116 {'=', 'P', 0x20bd}, // rouble |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1117 # define DG_START_OTHER1 0x2103 |
7 | 1118 {'o', 'C', 0x2103}, |
1119 {'c', 'o', 0x2105}, | |
1120 {'o', 'F', 0x2109}, | |
1121 {'N', '0', 0x2116}, | |
1122 {'P', 'O', 0x2117}, | |
1123 {'R', 'x', 0x211e}, | |
1124 {'S', 'M', 0x2120}, | |
1125 {'T', 'M', 0x2122}, | |
1126 {'O', 'm', 0x2126}, | |
1127 {'A', 'O', 0x212b}, | |
1128 {'1', '3', 0x2153}, | |
1129 {'2', '3', 0x2154}, | |
1130 {'1', '5', 0x2155}, | |
1131 {'2', '5', 0x2156}, | |
1132 {'3', '5', 0x2157}, | |
1133 {'4', '5', 0x2158}, | |
1134 {'1', '6', 0x2159}, | |
1135 {'5', '6', 0x215a}, | |
1136 {'1', '8', 0x215b}, | |
1137 {'3', '8', 0x215c}, | |
1138 {'5', '8', 0x215d}, | |
1139 {'7', '8', 0x215e}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1140 # define DG_START_ROMAN 0x2160 |
7 | 1141 {'1', 'R', 0x2160}, |
1142 {'2', 'R', 0x2161}, | |
1143 {'3', 'R', 0x2162}, | |
1144 {'4', 'R', 0x2163}, | |
1145 {'5', 'R', 0x2164}, | |
1146 {'6', 'R', 0x2165}, | |
1147 {'7', 'R', 0x2166}, | |
1148 {'8', 'R', 0x2167}, | |
1149 {'9', 'R', 0x2168}, | |
1150 {'a', 'R', 0x2169}, | |
1151 {'b', 'R', 0x216a}, | |
1152 {'c', 'R', 0x216b}, | |
1153 {'1', 'r', 0x2170}, | |
1154 {'2', 'r', 0x2171}, | |
1155 {'3', 'r', 0x2172}, | |
1156 {'4', 'r', 0x2173}, | |
1157 {'5', 'r', 0x2174}, | |
1158 {'6', 'r', 0x2175}, | |
1159 {'7', 'r', 0x2176}, | |
1160 {'8', 'r', 0x2177}, | |
1161 {'9', 'r', 0x2178}, | |
1162 {'a', 'r', 0x2179}, | |
1163 {'b', 'r', 0x217a}, | |
1164 {'c', 'r', 0x217b}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1165 # define DG_START_ARROWS 0x2190 |
7 | 1166 {'<', '-', 0x2190}, |
1167 {'-', '!', 0x2191}, | |
1168 {'-', '>', 0x2192}, | |
1169 {'-', 'v', 0x2193}, | |
1170 {'<', '>', 0x2194}, | |
1171 {'U', 'D', 0x2195}, | |
1172 {'<', '=', 0x21d0}, | |
1173 {'=', '>', 0x21d2}, | |
1174 {'=', '=', 0x21d4}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1175 # define DG_START_MATH 0x2200 |
7 | 1176 {'F', 'A', 0x2200}, |
1177 {'d', 'P', 0x2202}, | |
1178 {'T', 'E', 0x2203}, | |
1179 {'/', '0', 0x2205}, | |
1180 {'D', 'E', 0x2206}, | |
1181 {'N', 'B', 0x2207}, | |
1182 {'(', '-', 0x2208}, | |
1183 {'-', ')', 0x220b}, | |
1184 {'*', 'P', 0x220f}, | |
1185 {'+', 'Z', 0x2211}, | |
1186 {'-', '2', 0x2212}, | |
1187 {'-', '+', 0x2213}, | |
1188 {'*', '-', 0x2217}, | |
1189 {'O', 'b', 0x2218}, | |
1190 {'S', 'b', 0x2219}, | |
1191 {'R', 'T', 0x221a}, | |
1192 {'0', '(', 0x221d}, | |
1193 {'0', '0', 0x221e}, | |
1194 {'-', 'L', 0x221f}, | |
1195 {'-', 'V', 0x2220}, | |
1196 {'P', 'P', 0x2225}, | |
1197 {'A', 'N', 0x2227}, | |
1198 {'O', 'R', 0x2228}, | |
1199 {'(', 'U', 0x2229}, | |
1200 {')', 'U', 0x222a}, | |
1201 {'I', 'n', 0x222b}, | |
1202 {'D', 'I', 0x222c}, | |
1203 {'I', 'o', 0x222e}, | |
1204 {'.', ':', 0x2234}, | |
1205 {':', '.', 0x2235}, | |
1206 {':', 'R', 0x2236}, | |
1207 {':', ':', 0x2237}, | |
1208 {'?', '1', 0x223c}, | |
1209 {'C', 'G', 0x223e}, | |
1210 {'?', '-', 0x2243}, | |
1211 {'?', '=', 0x2245}, | |
1212 {'?', '2', 0x2248}, | |
1213 {'=', '?', 0x224c}, | |
1214 {'H', 'I', 0x2253}, | |
1215 {'!', '=', 0x2260}, | |
1216 {'=', '3', 0x2261}, | |
1217 {'=', '<', 0x2264}, | |
1218 {'>', '=', 0x2265}, | |
1219 {'<', '*', 0x226a}, | |
1220 {'*', '>', 0x226b}, | |
1221 {'!', '<', 0x226e}, | |
1222 {'!', '>', 0x226f}, | |
1223 {'(', 'C', 0x2282}, | |
1224 {')', 'C', 0x2283}, | |
1225 {'(', '_', 0x2286}, | |
1226 {')', '_', 0x2287}, | |
1227 {'0', '.', 0x2299}, | |
1228 {'0', '2', 0x229a}, | |
1229 {'-', 'T', 0x22a5}, | |
1230 {'.', 'P', 0x22c5}, | |
1231 {':', '3', 0x22ee}, | |
1232 {'.', '3', 0x22ef}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1233 # define DG_START_TECHNICAL 0x2302 |
7 | 1234 {'E', 'h', 0x2302}, |
1235 {'<', '7', 0x2308}, | |
1236 {'>', '7', 0x2309}, | |
1237 {'7', '<', 0x230a}, | |
1238 {'7', '>', 0x230b}, | |
1239 {'N', 'I', 0x2310}, | |
1240 {'(', 'A', 0x2312}, | |
1241 {'T', 'R', 0x2315}, | |
1242 {'I', 'u', 0x2320}, | |
1243 {'I', 'l', 0x2321}, | |
1244 {'<', '/', 0x2329}, | |
1245 {'/', '>', 0x232a}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1246 # define DG_START_OTHER2 0x2423 |
7 | 1247 {'V', 's', 0x2423}, |
1248 {'1', 'h', 0x2440}, | |
1249 {'3', 'h', 0x2441}, | |
1250 {'2', 'h', 0x2442}, | |
1251 {'4', 'h', 0x2443}, | |
1252 {'1', 'j', 0x2446}, | |
1253 {'2', 'j', 0x2447}, | |
1254 {'3', 'j', 0x2448}, | |
1255 {'4', 'j', 0x2449}, | |
1256 {'1', '.', 0x2488}, | |
1257 {'2', '.', 0x2489}, | |
1258 {'3', '.', 0x248a}, | |
1259 {'4', '.', 0x248b}, | |
1260 {'5', '.', 0x248c}, | |
1261 {'6', '.', 0x248d}, | |
1262 {'7', '.', 0x248e}, | |
1263 {'8', '.', 0x248f}, | |
1264 {'9', '.', 0x2490}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1265 # define DG_START_DRAWING 0x2500 |
7 | 1266 {'h', 'h', 0x2500}, |
1267 {'H', 'H', 0x2501}, | |
1268 {'v', 'v', 0x2502}, | |
1269 {'V', 'V', 0x2503}, | |
1270 {'3', '-', 0x2504}, | |
1271 {'3', '_', 0x2505}, | |
1272 {'3', '!', 0x2506}, | |
1273 {'3', '/', 0x2507}, | |
1274 {'4', '-', 0x2508}, | |
1275 {'4', '_', 0x2509}, | |
1276 {'4', '!', 0x250a}, | |
1277 {'4', '/', 0x250b}, | |
1278 {'d', 'r', 0x250c}, | |
1279 {'d', 'R', 0x250d}, | |
1280 {'D', 'r', 0x250e}, | |
1281 {'D', 'R', 0x250f}, | |
1282 {'d', 'l', 0x2510}, | |
1283 {'d', 'L', 0x2511}, | |
1284 {'D', 'l', 0x2512}, | |
1285 {'L', 'D', 0x2513}, | |
1286 {'u', 'r', 0x2514}, | |
1287 {'u', 'R', 0x2515}, | |
1288 {'U', 'r', 0x2516}, | |
1289 {'U', 'R', 0x2517}, | |
1290 {'u', 'l', 0x2518}, | |
1291 {'u', 'L', 0x2519}, | |
1292 {'U', 'l', 0x251a}, | |
1293 {'U', 'L', 0x251b}, | |
1294 {'v', 'r', 0x251c}, | |
1295 {'v', 'R', 0x251d}, | |
1296 {'V', 'r', 0x2520}, | |
1297 {'V', 'R', 0x2523}, | |
1298 {'v', 'l', 0x2524}, | |
1299 {'v', 'L', 0x2525}, | |
1300 {'V', 'l', 0x2528}, | |
1301 {'V', 'L', 0x252b}, | |
1302 {'d', 'h', 0x252c}, | |
1303 {'d', 'H', 0x252f}, | |
1304 {'D', 'h', 0x2530}, | |
1305 {'D', 'H', 0x2533}, | |
1306 {'u', 'h', 0x2534}, | |
1307 {'u', 'H', 0x2537}, | |
1308 {'U', 'h', 0x2538}, | |
1309 {'U', 'H', 0x253b}, | |
1310 {'v', 'h', 0x253c}, | |
1311 {'v', 'H', 0x253f}, | |
1312 {'V', 'h', 0x2542}, | |
1313 {'V', 'H', 0x254b}, | |
1314 {'F', 'D', 0x2571}, | |
1315 {'B', 'D', 0x2572}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1316 # define DG_START_BLOCK 0x2580 |
7 | 1317 {'T', 'B', 0x2580}, |
1318 {'L', 'B', 0x2584}, | |
1319 {'F', 'B', 0x2588}, | |
1320 {'l', 'B', 0x258c}, | |
1321 {'R', 'B', 0x2590}, | |
1322 {'.', 'S', 0x2591}, | |
1323 {':', 'S', 0x2592}, | |
1324 {'?', 'S', 0x2593}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1325 # define DG_START_SHAPES 0x25a0 |
7 | 1326 {'f', 'S', 0x25a0}, |
1327 {'O', 'S', 0x25a1}, | |
1328 {'R', 'O', 0x25a2}, | |
1329 {'R', 'r', 0x25a3}, | |
1330 {'R', 'F', 0x25a4}, | |
1331 {'R', 'Y', 0x25a5}, | |
1332 {'R', 'H', 0x25a6}, | |
1333 {'R', 'Z', 0x25a7}, | |
1334 {'R', 'K', 0x25a8}, | |
1335 {'R', 'X', 0x25a9}, | |
1336 {'s', 'B', 0x25aa}, | |
1337 {'S', 'R', 0x25ac}, | |
1338 {'O', 'r', 0x25ad}, | |
1339 {'U', 'T', 0x25b2}, | |
1340 {'u', 'T', 0x25b3}, | |
1341 {'P', 'R', 0x25b6}, | |
1342 {'T', 'r', 0x25b7}, | |
1343 {'D', 't', 0x25bc}, | |
1344 {'d', 'T', 0x25bd}, | |
1345 {'P', 'L', 0x25c0}, | |
1346 {'T', 'l', 0x25c1}, | |
1347 {'D', 'b', 0x25c6}, | |
1348 {'D', 'w', 0x25c7}, | |
1349 {'L', 'Z', 0x25ca}, | |
1350 {'0', 'm', 0x25cb}, | |
1351 {'0', 'o', 0x25ce}, | |
1352 {'0', 'M', 0x25cf}, | |
1353 {'0', 'L', 0x25d0}, | |
1354 {'0', 'R', 0x25d1}, | |
1355 {'S', 'n', 0x25d8}, | |
1356 {'I', 'c', 0x25d9}, | |
1357 {'F', 'd', 0x25e2}, | |
1358 {'B', 'd', 0x25e3}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1359 # define DG_START_SYMBOLS 0x2605 |
7 | 1360 {'*', '2', 0x2605}, |
1361 {'*', '1', 0x2606}, | |
1362 {'<', 'H', 0x261c}, | |
1363 {'>', 'H', 0x261e}, | |
1364 {'0', 'u', 0x263a}, | |
1365 {'0', 'U', 0x263b}, | |
1366 {'S', 'U', 0x263c}, | |
1367 {'F', 'm', 0x2640}, | |
1368 {'M', 'l', 0x2642}, | |
1369 {'c', 'S', 0x2660}, | |
1370 {'c', 'H', 0x2661}, | |
1371 {'c', 'D', 0x2662}, | |
1372 {'c', 'C', 0x2663}, | |
1373 {'M', 'd', 0x2669}, | |
1374 {'M', '8', 0x266a}, | |
1375 {'M', '2', 0x266b}, | |
1376 {'M', 'b', 0x266d}, | |
1377 {'M', 'x', 0x266e}, | |
1378 {'M', 'X', 0x266f}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1379 # define DG_START_DINGBATS 0x2713 |
7 | 1380 {'O', 'K', 0x2713}, |
1381 {'X', 'X', 0x2717}, | |
1382 {'-', 'X', 0x2720}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1383 # define DG_START_CJK_SYMBOLS 0x3000 |
7 | 1384 {'I', 'S', 0x3000}, |
1385 {',', '_', 0x3001}, | |
1386 {'.', '_', 0x3002}, | |
1387 {'+', '"', 0x3003}, | |
1388 {'+', '_', 0x3004}, | |
1389 {'*', '_', 0x3005}, | |
1390 {';', '_', 0x3006}, | |
1391 {'0', '_', 0x3007}, | |
1392 {'<', '+', 0x300a}, | |
1393 {'>', '+', 0x300b}, | |
1394 {'<', '\'', 0x300c}, | |
1395 {'>', '\'', 0x300d}, | |
1396 {'<', '"', 0x300e}, | |
1397 {'>', '"', 0x300f}, | |
1398 {'(', '"', 0x3010}, | |
1399 {')', '"', 0x3011}, | |
1400 {'=', 'T', 0x3012}, | |
1401 {'=', '_', 0x3013}, | |
1402 {'(', '\'', 0x3014}, | |
1403 {')', '\'', 0x3015}, | |
1404 {'(', 'I', 0x3016}, | |
1405 {')', 'I', 0x3017}, | |
1406 {'-', '?', 0x301c}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1407 # define DG_START_HIRAGANA 0x3041 |
7 | 1408 {'A', '5', 0x3041}, |
1409 {'a', '5', 0x3042}, | |
1410 {'I', '5', 0x3043}, | |
1411 {'i', '5', 0x3044}, | |
1412 {'U', '5', 0x3045}, | |
1413 {'u', '5', 0x3046}, | |
1414 {'E', '5', 0x3047}, | |
1415 {'e', '5', 0x3048}, | |
1416 {'O', '5', 0x3049}, | |
1417 {'o', '5', 0x304a}, | |
1418 {'k', 'a', 0x304b}, | |
1419 {'g', 'a', 0x304c}, | |
1420 {'k', 'i', 0x304d}, | |
1421 {'g', 'i', 0x304e}, | |
1422 {'k', 'u', 0x304f}, | |
1423 {'g', 'u', 0x3050}, | |
1424 {'k', 'e', 0x3051}, | |
1425 {'g', 'e', 0x3052}, | |
1426 {'k', 'o', 0x3053}, | |
1427 {'g', 'o', 0x3054}, | |
1428 {'s', 'a', 0x3055}, | |
1429 {'z', 'a', 0x3056}, | |
1430 {'s', 'i', 0x3057}, | |
1431 {'z', 'i', 0x3058}, | |
1432 {'s', 'u', 0x3059}, | |
1433 {'z', 'u', 0x305a}, | |
1434 {'s', 'e', 0x305b}, | |
1435 {'z', 'e', 0x305c}, | |
1436 {'s', 'o', 0x305d}, | |
1437 {'z', 'o', 0x305e}, | |
1438 {'t', 'a', 0x305f}, | |
1439 {'d', 'a', 0x3060}, | |
1440 {'t', 'i', 0x3061}, | |
1441 {'d', 'i', 0x3062}, | |
1442 {'t', 'U', 0x3063}, | |
1443 {'t', 'u', 0x3064}, | |
1444 {'d', 'u', 0x3065}, | |
1445 {'t', 'e', 0x3066}, | |
1446 {'d', 'e', 0x3067}, | |
1447 {'t', 'o', 0x3068}, | |
1448 {'d', 'o', 0x3069}, | |
1449 {'n', 'a', 0x306a}, | |
1450 {'n', 'i', 0x306b}, | |
1451 {'n', 'u', 0x306c}, | |
1452 {'n', 'e', 0x306d}, | |
1453 {'n', 'o', 0x306e}, | |
1454 {'h', 'a', 0x306f}, | |
1455 {'b', 'a', 0x3070}, | |
1456 {'p', 'a', 0x3071}, | |
1457 {'h', 'i', 0x3072}, | |
1458 {'b', 'i', 0x3073}, | |
1459 {'p', 'i', 0x3074}, | |
1460 {'h', 'u', 0x3075}, | |
1461 {'b', 'u', 0x3076}, | |
1462 {'p', 'u', 0x3077}, | |
1463 {'h', 'e', 0x3078}, | |
1464 {'b', 'e', 0x3079}, | |
1465 {'p', 'e', 0x307a}, | |
1466 {'h', 'o', 0x307b}, | |
1467 {'b', 'o', 0x307c}, | |
1468 {'p', 'o', 0x307d}, | |
1469 {'m', 'a', 0x307e}, | |
1470 {'m', 'i', 0x307f}, | |
1471 {'m', 'u', 0x3080}, | |
1472 {'m', 'e', 0x3081}, | |
1473 {'m', 'o', 0x3082}, | |
1474 {'y', 'A', 0x3083}, | |
1475 {'y', 'a', 0x3084}, | |
1476 {'y', 'U', 0x3085}, | |
1477 {'y', 'u', 0x3086}, | |
1478 {'y', 'O', 0x3087}, | |
1479 {'y', 'o', 0x3088}, | |
1480 {'r', 'a', 0x3089}, | |
1481 {'r', 'i', 0x308a}, | |
1482 {'r', 'u', 0x308b}, | |
1483 {'r', 'e', 0x308c}, | |
1484 {'r', 'o', 0x308d}, | |
1485 {'w', 'A', 0x308e}, | |
1486 {'w', 'a', 0x308f}, | |
1487 {'w', 'i', 0x3090}, | |
1488 {'w', 'e', 0x3091}, | |
1489 {'w', 'o', 0x3092}, | |
1490 {'n', '5', 0x3093}, | |
1491 {'v', 'u', 0x3094}, | |
1492 {'"', '5', 0x309b}, | |
1493 {'0', '5', 0x309c}, | |
1494 {'*', '5', 0x309d}, | |
1495 {'+', '5', 0x309e}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1496 # define DG_START_KATAKANA 0x30a1 |
7 | 1497 {'a', '6', 0x30a1}, |
1498 {'A', '6', 0x30a2}, | |
1499 {'i', '6', 0x30a3}, | |
1500 {'I', '6', 0x30a4}, | |
1501 {'u', '6', 0x30a5}, | |
1502 {'U', '6', 0x30a6}, | |
1503 {'e', '6', 0x30a7}, | |
1504 {'E', '6', 0x30a8}, | |
1505 {'o', '6', 0x30a9}, | |
1506 {'O', '6', 0x30aa}, | |
1507 {'K', 'a', 0x30ab}, | |
1508 {'G', 'a', 0x30ac}, | |
1509 {'K', 'i', 0x30ad}, | |
1510 {'G', 'i', 0x30ae}, | |
1511 {'K', 'u', 0x30af}, | |
1512 {'G', 'u', 0x30b0}, | |
1513 {'K', 'e', 0x30b1}, | |
1514 {'G', 'e', 0x30b2}, | |
1515 {'K', 'o', 0x30b3}, | |
1516 {'G', 'o', 0x30b4}, | |
1517 {'S', 'a', 0x30b5}, | |
1518 {'Z', 'a', 0x30b6}, | |
1519 {'S', 'i', 0x30b7}, | |
1520 {'Z', 'i', 0x30b8}, | |
1521 {'S', 'u', 0x30b9}, | |
1522 {'Z', 'u', 0x30ba}, | |
1523 {'S', 'e', 0x30bb}, | |
1524 {'Z', 'e', 0x30bc}, | |
1525 {'S', 'o', 0x30bd}, | |
1526 {'Z', 'o', 0x30be}, | |
1527 {'T', 'a', 0x30bf}, | |
1528 {'D', 'a', 0x30c0}, | |
1529 {'T', 'i', 0x30c1}, | |
1530 {'D', 'i', 0x30c2}, | |
1531 {'T', 'U', 0x30c3}, | |
1532 {'T', 'u', 0x30c4}, | |
1533 {'D', 'u', 0x30c5}, | |
1534 {'T', 'e', 0x30c6}, | |
1535 {'D', 'e', 0x30c7}, | |
1536 {'T', 'o', 0x30c8}, | |
1537 {'D', 'o', 0x30c9}, | |
1538 {'N', 'a', 0x30ca}, | |
1539 {'N', 'i', 0x30cb}, | |
1540 {'N', 'u', 0x30cc}, | |
1541 {'N', 'e', 0x30cd}, | |
1542 {'N', 'o', 0x30ce}, | |
1543 {'H', 'a', 0x30cf}, | |
1544 {'B', 'a', 0x30d0}, | |
1545 {'P', 'a', 0x30d1}, | |
1546 {'H', 'i', 0x30d2}, | |
1547 {'B', 'i', 0x30d3}, | |
1548 {'P', 'i', 0x30d4}, | |
1549 {'H', 'u', 0x30d5}, | |
1550 {'B', 'u', 0x30d6}, | |
1551 {'P', 'u', 0x30d7}, | |
1552 {'H', 'e', 0x30d8}, | |
1553 {'B', 'e', 0x30d9}, | |
1554 {'P', 'e', 0x30da}, | |
1555 {'H', 'o', 0x30db}, | |
1556 {'B', 'o', 0x30dc}, | |
1557 {'P', 'o', 0x30dd}, | |
1558 {'M', 'a', 0x30de}, | |
1559 {'M', 'i', 0x30df}, | |
1560 {'M', 'u', 0x30e0}, | |
1561 {'M', 'e', 0x30e1}, | |
1562 {'M', 'o', 0x30e2}, | |
1563 {'Y', 'A', 0x30e3}, | |
1564 {'Y', 'a', 0x30e4}, | |
1565 {'Y', 'U', 0x30e5}, | |
1566 {'Y', 'u', 0x30e6}, | |
1567 {'Y', 'O', 0x30e7}, | |
1568 {'Y', 'o', 0x30e8}, | |
1569 {'R', 'a', 0x30e9}, | |
1570 {'R', 'i', 0x30ea}, | |
1571 {'R', 'u', 0x30eb}, | |
1572 {'R', 'e', 0x30ec}, | |
1573 {'R', 'o', 0x30ed}, | |
1574 {'W', 'A', 0x30ee}, | |
1575 {'W', 'a', 0x30ef}, | |
1576 {'W', 'i', 0x30f0}, | |
1577 {'W', 'e', 0x30f1}, | |
1578 {'W', 'o', 0x30f2}, | |
1579 {'N', '6', 0x30f3}, | |
1580 {'V', 'u', 0x30f4}, | |
1581 {'K', 'A', 0x30f5}, | |
1582 {'K', 'E', 0x30f6}, | |
1583 {'V', 'a', 0x30f7}, | |
1584 {'V', 'i', 0x30f8}, | |
1585 {'V', 'e', 0x30f9}, | |
1586 {'V', 'o', 0x30fa}, | |
1587 {'.', '6', 0x30fb}, | |
1588 {'-', '6', 0x30fc}, | |
1589 {'*', '6', 0x30fd}, | |
1590 {'+', '6', 0x30fe}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1591 # define DG_START_BOPOMOFO 0x3105 |
7 | 1592 {'b', '4', 0x3105}, |
1593 {'p', '4', 0x3106}, | |
1594 {'m', '4', 0x3107}, | |
1595 {'f', '4', 0x3108}, | |
1596 {'d', '4', 0x3109}, | |
1597 {'t', '4', 0x310a}, | |
1598 {'n', '4', 0x310b}, | |
1599 {'l', '4', 0x310c}, | |
1600 {'g', '4', 0x310d}, | |
1601 {'k', '4', 0x310e}, | |
1602 {'h', '4', 0x310f}, | |
1603 {'j', '4', 0x3110}, | |
1604 {'q', '4', 0x3111}, | |
1605 {'x', '4', 0x3112}, | |
1606 {'z', 'h', 0x3113}, | |
1607 {'c', 'h', 0x3114}, | |
1608 {'s', 'h', 0x3115}, | |
1609 {'r', '4', 0x3116}, | |
1610 {'z', '4', 0x3117}, | |
1611 {'c', '4', 0x3118}, | |
1612 {'s', '4', 0x3119}, | |
1613 {'a', '4', 0x311a}, | |
1614 {'o', '4', 0x311b}, | |
1615 {'e', '4', 0x311c}, | |
1616 {'a', 'i', 0x311e}, | |
1617 {'e', 'i', 0x311f}, | |
1618 {'a', 'u', 0x3120}, | |
1619 {'o', 'u', 0x3121}, | |
1620 {'a', 'n', 0x3122}, | |
1621 {'e', 'n', 0x3123}, | |
1622 {'a', 'N', 0x3124}, | |
1623 {'e', 'N', 0x3125}, | |
1624 {'e', 'r', 0x3126}, | |
1625 {'i', '4', 0x3127}, | |
1626 {'u', '4', 0x3128}, | |
1627 {'i', 'u', 0x3129}, | |
1628 {'v', '4', 0x312a}, | |
1629 {'n', 'G', 0x312b}, | |
1630 {'g', 'n', 0x312c}, | |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1631 # define DG_START_OTHER3 0x3220 |
7 | 1632 {'1', 'c', 0x3220}, |
1633 {'2', 'c', 0x3221}, | |
1634 {'3', 'c', 0x3222}, | |
1635 {'4', 'c', 0x3223}, | |
1636 {'5', 'c', 0x3224}, | |
1637 {'6', 'c', 0x3225}, | |
1638 {'7', 'c', 0x3226}, | |
1639 {'8', 'c', 0x3227}, | |
1640 {'9', 'c', 0x3228}, | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1641 // code points 0xe000 - 0xefff excluded, they have no assigned |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1642 // characters, only used in proposals. |
7 | 1643 {'f', 'f', 0xfb00}, |
1644 {'f', 'i', 0xfb01}, | |
1645 {'f', 'l', 0xfb02}, | |
1646 {'f', 't', 0xfb05}, | |
1647 {'s', 't', 0xfb06}, | |
1478 | 1648 |
7 | 1649 {NUL, NUL, NUL} |
1650 }; | |
1651 | |
27490
fb4c30606b4a
patch 8.2.4273: the EBCDIC support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
27028
diff
changeset
|
1652 # endif // OLD_DIGRAPHS |
21329
bb3f60b0aca0
patch 8.2.1215: Atari MiNT support is outdated
Bram Moolenaar <Bram@vim.org>
parents:
20751
diff
changeset
|
1653 #endif // !HPUX_DIGRAPHS |
7 | 1654 |
1655 /* | |
1656 * handle digraphs after typing a character | |
1657 */ | |
1658 int | |
7817
83861277e6a3
commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents:
7799
diff
changeset
|
1659 do_digraph(int c) |
7 | 1660 { |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1661 static int backspaced; // character before K_BS |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1662 static int lastchar; // last typed character |
7 | 1663 |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1664 if (c == -1) // init values |
7 | 1665 { |
1666 backspaced = -1; | |
1667 } | |
1668 else if (p_dg) | |
1669 { | |
1670 if (backspaced >= 0) | |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
1671 c = digraph_get(backspaced, c, FALSE); |
7 | 1672 backspaced = -1; |
1673 if ((c == K_BS || c == Ctrl_H) && lastchar >= 0) | |
1674 backspaced = lastchar; | |
1675 } | |
1676 lastchar = c; | |
1677 return c; | |
1678 } | |
1679 | |
1680 /* | |
13359
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1681 * Find a digraph for "val". If found return the string to display it. |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1682 * If not found return NULL. |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1683 */ |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1684 char_u * |
14083
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1685 get_digraph_for_char(int val_arg) |
13359
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1686 { |
14083
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1687 int val = val_arg; |
13359
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1688 int i; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1689 int use_defaults; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1690 digr_T *dp; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1691 static char_u r[3]; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1692 |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1693 #if defined(USE_UNICODE_DIGRAPHS) |
14083
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1694 if (!enc_utf8) |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1695 { |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1696 char_u buf[6], *to; |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1697 vimconv_T vc; |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1698 |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1699 // convert the character from 'encoding' to Unicode |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1700 i = mb_char2bytes(val, buf); |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1701 vc.vc_type = CONV_NONE; |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1702 if (convert_setup(&vc, p_enc, (char_u *)"utf-8") == OK) |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1703 { |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1704 vc.vc_fail = TRUE; |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1705 to = string_convert(&vc, buf, &i); |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1706 if (to != NULL) |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1707 { |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1708 val = utf_ptr2char(to); |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1709 vim_free(to); |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1710 } |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1711 (void)convert_setup(&vc, NULL, NULL); |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1712 } |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1713 } |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1714 #endif |
8a9a00357676
patch 8.1.0059: displayed digraph for "ga" wrong with 'encoding' "cp1251"
Christian Brabandt <cb@256bit.org>
parents:
13359
diff
changeset
|
1715 |
13359
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1716 for (use_defaults = 0; use_defaults <= 1; use_defaults++) |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1717 { |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1718 if (use_defaults == 0) |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1719 dp = (digr_T *)user_digraphs.ga_data; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1720 else |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1721 dp = digraphdefault; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1722 for (i = 0; use_defaults ? dp->char1 != NUL |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1723 : i < user_digraphs.ga_len; ++i) |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1724 { |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1725 if (dp->result == val) |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1726 { |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1727 r[0] = dp->char1; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1728 r[1] = dp->char2; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1729 r[2] = NUL; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1730 return r; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1731 } |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1732 ++dp; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1733 } |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1734 } |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1735 return NULL; |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1736 } |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1737 |
81c348d40312
patch 8.0.1553: cannot see what digraph is used to insert a character
Christian Brabandt <cb@256bit.org>
parents:
13121
diff
changeset
|
1738 /* |
7 | 1739 * Get a digraph. Used after typing CTRL-K on the command line or in normal |
1740 * mode. | |
1741 * Returns composed character, or NUL when ESC was used. | |
1742 */ | |
1743 int | |
7817
83861277e6a3
commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents:
7799
diff
changeset
|
1744 get_digraph( |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1745 int cmdline) // TRUE when called from the cmdline |
7 | 1746 { |
1747 int c, cc; | |
1748 | |
1749 ++no_mapping; | |
1750 ++allow_keys; | |
1389 | 1751 c = plain_vgetc(); |
7 | 1752 --no_mapping; |
1753 --allow_keys; | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1754 if (c != ESC) // ESC cancels CTRL-K |
7 | 1755 { |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1756 if (IS_SPECIAL(c)) // insert special key code |
7 | 1757 return c; |
1758 if (cmdline) | |
1759 { | |
1760 if (char2cells(c) == 1 | |
1761 #if defined(FEAT_CRYPT) || defined(FEAT_EVAL) | |
1762 && cmdline_star == 0 | |
1763 #endif | |
1764 ) | |
1765 putcmdline(c, TRUE); | |
1766 } | |
1767 #ifdef FEAT_CMDL_INFO | |
1768 else | |
1769 add_to_showcmd(c); | |
1770 #endif | |
1771 ++no_mapping; | |
1772 ++allow_keys; | |
1389 | 1773 cc = plain_vgetc(); |
7 | 1774 --no_mapping; |
1775 --allow_keys; | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1776 if (cc != ESC) // ESC cancels CTRL-K |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
1777 return digraph_get(c, cc, TRUE); |
7 | 1778 } |
1779 return NUL; | |
1780 } | |
1781 | |
1782 /* | |
1783 * Lookup the pair "char1", "char2" in the digraph tables. | |
1784 * If no match, return "char2". | |
3263 | 1785 * If "meta_char" is TRUE and "char1" is a space, return "char2" | 0x80. |
7 | 1786 */ |
1787 static int | |
7817
83861277e6a3
commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents:
7799
diff
changeset
|
1788 getexactdigraph(int char1, int char2, int meta_char) |
7 | 1789 { |
1790 int i; | |
1791 int retval = 0; | |
1792 digr_T *dp; | |
1793 | |
1794 if (IS_SPECIAL(char1) || IS_SPECIAL(char2)) | |
1795 return char2; | |
1796 | |
1797 /* | |
1798 * Search user digraphs first. | |
1799 */ | |
1800 dp = (digr_T *)user_digraphs.ga_data; | |
1801 for (i = 0; i < user_digraphs.ga_len; ++i) | |
1802 { | |
1803 if ((int)dp->char1 == char1 && (int)dp->char2 == char2) | |
1804 { | |
1805 retval = dp->result; | |
1806 break; | |
1807 } | |
1808 ++dp; | |
1809 } | |
1810 | |
1811 /* | |
1812 * Search default digraphs. | |
1813 */ | |
1814 if (retval == 0) | |
1815 { | |
1816 dp = digraphdefault; | |
1817 for (i = 0; dp->char1 != 0; ++i) | |
1818 { | |
1819 if ((int)dp->char1 == char1 && (int)dp->char2 == char2) | |
1820 { | |
1821 retval = dp->result; | |
1822 break; | |
1823 } | |
1824 ++dp; | |
1825 } | |
1826 } | |
15595
1ec942f1b648
patch 8.1.0805: too many #ifdefs
Bram Moolenaar <Bram@vim.org>
parents:
15470
diff
changeset
|
1827 #ifdef USE_UNICODE_DIGRAPHS |
7 | 1828 if (retval != 0 && !enc_utf8) |
1829 { | |
1830 char_u buf[6], *to; | |
1831 vimconv_T vc; | |
1832 | |
1833 /* | |
1834 * Convert the Unicode digraph to 'encoding'. | |
1835 */ | |
1836 i = utf_char2bytes(retval, buf); | |
1837 retval = 0; | |
1838 vc.vc_type = CONV_NONE; | |
1839 if (convert_setup(&vc, (char_u *)"utf-8", p_enc) == OK) | |
1840 { | |
1841 vc.vc_fail = TRUE; | |
1842 to = string_convert(&vc, buf, &i); | |
1843 if (to != NULL) | |
1844 { | |
1845 retval = (*mb_ptr2char)(to); | |
1846 vim_free(to); | |
1847 } | |
1848 (void)convert_setup(&vc, NULL, NULL); | |
1849 } | |
1850 } | |
15595
1ec942f1b648
patch 8.1.0805: too many #ifdefs
Bram Moolenaar <Bram@vim.org>
parents:
15470
diff
changeset
|
1851 #endif |
7 | 1852 |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1853 // Ignore multi-byte characters when not in multi-byte mode. |
7 | 1854 if (!has_mbyte && retval > 0xff) |
1855 retval = 0; | |
1856 | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1857 if (retval == 0) // digraph deleted or not found |
7 | 1858 { |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1859 if (char1 == ' ' && meta_char) // <space> <char> --> meta-char |
7 | 1860 return (char2 | 0x80); |
1861 return char2; | |
1862 } | |
1863 return retval; | |
1864 } | |
1865 | |
1866 /* | |
1867 * Get digraph. | |
1868 * Allow for both char1-char2 and char2-char1 | |
1869 */ | |
1870 int | |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
1871 digraph_get(int char1, int char2, int meta_char) |
7 | 1872 { |
1873 int retval; | |
1874 | |
3263 | 1875 if (((retval = getexactdigraph(char1, char2, meta_char)) == char2) |
7 | 1876 && (char1 != char2) |
3263 | 1877 && ((retval = getexactdigraph(char2, char1, meta_char)) == char1)) |
7 | 1878 return char2; |
1879 return retval; | |
1880 } | |
1881 | |
1882 /* | |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1883 * Add a digraph to the digraph table. |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1884 */ |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1885 static void |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1886 registerdigraph(int char1, int char2, int n) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1887 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1888 int i; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1889 digr_T *dp; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1890 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1891 // If the digraph already exists, replace "result". |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1892 dp = (digr_T *)user_digraphs.ga_data; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1893 for (i = 0; i < user_digraphs.ga_len; ++i) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1894 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1895 if ((int)dp->char1 == char1 && (int)dp->char2 == char2) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1896 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1897 dp->result = n; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1898 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1899 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1900 ++dp; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1901 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1902 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1903 // Add a new digraph to the table. |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1904 if (ga_grow(&user_digraphs, 1) == OK) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1905 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1906 dp = (digr_T *)user_digraphs.ga_data + user_digraphs.ga_len; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1907 dp->char1 = char1; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1908 dp->char2 = char2; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1909 dp->result = n; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1910 ++user_digraphs.ga_len; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1911 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1912 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1913 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1914 /* |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1915 * Check the characters are valid for a digraph. |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1916 * If they are valid, returns TRUE; otherwise, give an error message and |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1917 * returns FALSE. |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1918 */ |
25567
0082503ff2ff
patch 8.2.3320: some local functions are not static
Bram Moolenaar <Bram@vim.org>
parents:
25384
diff
changeset
|
1919 static int |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1920 check_digraph_chars_valid(int char1, int char2) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1921 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1922 if (char2 == 0) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1923 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1924 char_u msg[MB_MAXBYTES + 1]; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1925 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1926 msg[mb_char2bytes(char1, msg)] = NUL; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1927 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1928 semsg(_(e_digraph_must_be_just_two_characters_str), msg); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1929 return FALSE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1930 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1931 if (char1 == ESC || char2 == ESC) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1932 { |
26602
fac6673086df
patch 8.2.3830: error messages are spread out
Bram Moolenaar <Bram@vim.org>
parents:
25759
diff
changeset
|
1933 emsg(_(e_escape_not_allowed_in_digraph)); |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1934 return FALSE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1935 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1936 return TRUE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1937 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1938 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1939 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1940 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1941 /* |
7 | 1942 * Add the digraphs in the argument to the digraph table. |
1943 * format: {c1}{c2} char {c1}{c2} char ... | |
1944 */ | |
1945 void | |
7817
83861277e6a3
commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents:
7799
diff
changeset
|
1946 putdigraph(char_u *str) |
7 | 1947 { |
1948 int char1, char2, n; | |
1949 | |
1950 while (*str != NUL) | |
1951 { | |
1952 str = skipwhite(str); | |
1953 if (*str == NUL) | |
1954 return; | |
1955 char1 = *str++; | |
1956 char2 = *str++; | |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1957 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1958 if (!check_digraph_chars_valid(char1, char2)) |
7 | 1959 return; |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1960 |
7 | 1961 str = skipwhite(str); |
1962 if (!VIM_ISDIGIT(*str)) | |
1963 { | |
25306
078edc1821bf
patch 8.2.3190: error messages are spread out
Bram Moolenaar <Bram@vim.org>
parents:
25294
diff
changeset
|
1964 emsg(_(e_number_expected)); |
7 | 1965 return; |
1966 } | |
1967 n = getdigits(&str); | |
1968 | |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
1969 registerdigraph(char1, char2, n); |
7 | 1970 } |
1971 } | |
1972 | |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1973 #if defined(USE_UNICODE_DIGRAPHS) |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1974 static void |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1975 digraph_header(char *msg) |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1976 { |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1977 if (msg_col > 0) |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1978 msg_putchar('\n'); |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1979 msg_outtrans_attr((char_u *)msg, HL_ATTR(HLF_CM)); |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1980 msg_putchar('\n'); |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1981 } |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1982 #endif |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1983 |
7 | 1984 void |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1985 listdigraphs(int use_headers) |
7 | 1986 { |
1987 int i; | |
1988 digr_T *dp; | |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1989 result_T previous = 0; |
7 | 1990 |
1991 msg_putchar('\n'); | |
1992 | |
1993 dp = digraphdefault; | |
1994 for (i = 0; dp->char1 != NUL && !got_int; ++i) | |
1995 { | |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
1996 #if defined(USE_UNICODE_DIGRAPHS) |
7 | 1997 digr_T tmp; |
1998 | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
1999 // May need to convert the result to 'encoding'. |
7 | 2000 tmp.char1 = dp->char1; |
2001 tmp.char2 = dp->char2; | |
2002 tmp.result = getexactdigraph(tmp.char1, tmp.char2, FALSE); | |
2003 if (tmp.result != 0 && tmp.result != tmp.char2 | |
2004 && (has_mbyte || tmp.result <= 255)) | |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2005 printdigraph(&tmp, use_headers ? &previous : NULL); |
7 | 2006 #else |
2007 | |
2008 if (getexactdigraph(dp->char1, dp->char2, FALSE) == dp->result | |
15595
1ec942f1b648
patch 8.1.0805: too many #ifdefs
Bram Moolenaar <Bram@vim.org>
parents:
15470
diff
changeset
|
2009 && (has_mbyte || dp->result <= 255)) |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2010 printdigraph(dp, use_headers ? &previous : NULL); |
7 | 2011 #endif |
2012 ++dp; | |
2013 ui_breakcheck(); | |
2014 } | |
2015 | |
2016 dp = (digr_T *)user_digraphs.ga_data; | |
2017 for (i = 0; i < user_digraphs.ga_len && !got_int; ++i) | |
2018 { | |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2019 #if defined(USE_UNICODE_DIGRAPHS) |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2020 if (previous >= 0 && use_headers) |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2021 digraph_header(_("Custom")); |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2022 previous = -1; |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2023 #endif |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2024 printdigraph(dp, NULL); |
7 | 2025 ui_breakcheck(); |
2026 ++dp; | |
2027 } | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2028 must_redraw = CLEAR; // clear screen, because some digraphs may be |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2029 // wrong, in which case we messed up ScreenLines |
7 | 2030 } |
2031 | |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2032 static void |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2033 digraph_getlist_appendpair(digr_T *dp, list_T *l) |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2034 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2035 char_u buf[30]; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2036 char_u *p; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2037 list_T *l2; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2038 listitem_T *li, *li2; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2039 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2040 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2041 li = listitem_alloc(); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2042 if (li == NULL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2043 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2044 list_append(l, li); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2045 li->li_tv.v_type = VAR_LIST; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2046 li->li_tv.v_lock = 0; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2047 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2048 l2 = list_alloc(); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2049 li->li_tv.vval.v_list = l2; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2050 if (l2 == NULL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2051 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2052 ++l2->lv_refcount; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2053 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2054 li2 = listitem_alloc(); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2055 if (li2 == NULL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2056 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2057 list_append(l2, li2); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2058 li2->li_tv.v_type = VAR_STRING; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2059 li2->li_tv.v_lock = 0; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2060 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2061 buf[0] = dp->char1; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2062 buf[1] = dp->char2; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2063 buf[2] = NUL; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2064 li2->li_tv.vval.v_string = vim_strsave(&buf[0]); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2065 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2066 li2 = listitem_alloc(); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2067 if (li2 == NULL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2068 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2069 list_append(l2, li2); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2070 li2->li_tv.v_type = VAR_STRING; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2071 li2->li_tv.v_lock = 0; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2072 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2073 p = buf; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2074 if (has_mbyte) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2075 p += (*mb_char2bytes)(dp->result, p); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2076 else |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2077 *p++ = (char_u)dp->result; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2078 *p = NUL; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2079 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2080 li2->li_tv.vval.v_string = vim_strsave(buf); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2081 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2082 |
25567
0082503ff2ff
patch 8.2.3320: some local functions are not static
Bram Moolenaar <Bram@vim.org>
parents:
25384
diff
changeset
|
2083 static void |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2084 digraph_getlist_common(int list_all, typval_T *rettv) |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2085 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2086 int i; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2087 digr_T *dp; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2088 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2089 if (rettv_list_alloc(rettv) == FAIL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2090 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2091 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2092 if (list_all) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2093 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2094 dp = digraphdefault; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2095 for (i = 0; dp->char1 != NUL && !got_int; ++i) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2096 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2097 #ifdef USE_UNICODE_DIGRAPHS |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2098 digr_T tmp; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2099 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2100 tmp.char1 = dp->char1; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2101 tmp.char2 = dp->char2; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2102 tmp.result = getexactdigraph(tmp.char1, tmp.char2, FALSE); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2103 if (tmp.result != 0 && tmp.result != tmp.char2 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2104 && (has_mbyte || tmp.result <= 255)) |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2105 digraph_getlist_appendpair(&tmp, rettv->vval.v_list); |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2106 #else |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2107 if (getexactdigraph(dp->char1, dp->char2, FALSE) == dp->result |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2108 && (has_mbyte || dp->result <= 255)) |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2109 digraph_getlist_appendpair(dp, rettv->vval.v_list); |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2110 #endif |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2111 ++dp; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2112 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2113 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2114 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2115 dp = (digr_T *)user_digraphs.ga_data; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2116 for (i = 0; i < user_digraphs.ga_len && !got_int; ++i) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2117 { |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2118 digraph_getlist_appendpair(dp, rettv->vval.v_list); |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2119 ++dp; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2120 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2121 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2122 |
17789
0f7ae8010787
patch 8.1.1891: functions used in one file are global
Bram Moolenaar <Bram@vim.org>
parents:
17178
diff
changeset
|
2123 static struct dg_header_entry { |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2124 int dg_start; |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2125 char *dg_header; |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2126 } header_table[] = { |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2127 {DG_START_LATIN, N_("Latin supplement")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2128 {DG_START_GREEK, N_("Greek and Coptic")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2129 {DG_START_CYRILLIC, N_("Cyrillic")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2130 {DG_START_HEBREW, N_("Hebrew")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2131 {DG_START_ARABIC, N_("Arabic")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2132 {DG_START_LATIN_EXTENDED, N_("Latin extended")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2133 {DG_START_GREEK_EXTENDED, N_("Greek extended")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2134 {DG_START_PUNCTUATION, N_("Punctuation")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2135 {DG_START_SUB_SUPER, N_("Super- and subscripts")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2136 {DG_START_CURRENCY, N_("Currency")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2137 {DG_START_OTHER1, N_("Other")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2138 {DG_START_ROMAN, N_("Roman numbers")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2139 {DG_START_ARROWS, N_("Arrows")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2140 {DG_START_MATH, N_("Mathematical operators")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2141 {DG_START_TECHNICAL, N_("Technical")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2142 {DG_START_OTHER2, N_("Other")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2143 {DG_START_DRAWING, N_("Box drawing")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2144 {DG_START_BLOCK, N_("Block elements")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2145 {DG_START_SHAPES, N_("Geometric shapes")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2146 {DG_START_SYMBOLS, N_("Symbols")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2147 {DG_START_DINGBATS, N_("Dingbats")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2148 {DG_START_CJK_SYMBOLS, N_("CJK symbols and punctuation")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2149 {DG_START_HIRAGANA, N_("Hiragana")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2150 {DG_START_KATAKANA, N_("Katakana")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2151 {DG_START_BOPOMOFO, N_("Bopomofo")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2152 {DG_START_OTHER3, N_("Other")}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2153 {0xfffffff, NULL}, |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2154 }; |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2155 |
7 | 2156 static void |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2157 printdigraph(digr_T *dp, result_T *previous) |
7 | 2158 { |
2159 char_u buf[30]; | |
2160 char_u *p; | |
2161 | |
2162 int list_width; | |
2163 | |
15595
1ec942f1b648
patch 8.1.0805: too many #ifdefs
Bram Moolenaar <Bram@vim.org>
parents:
15470
diff
changeset
|
2164 if ((dy_flags & DY_UHEX) || has_mbyte) |
7 | 2165 list_width = 13; |
2166 else | |
2167 list_width = 11; | |
2168 | |
2169 if (dp->result != 0) | |
2170 { | |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2171 #if defined(USE_UNICODE_DIGRAPHS) |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2172 if (previous != NULL) |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2173 { |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2174 int i; |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2175 |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2176 for (i = 0; header_table[i].dg_header != NULL; ++i) |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2177 if (*previous < header_table[i].dg_start |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2178 && dp->result >= header_table[i].dg_start |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2179 && dp->result < header_table[i + 1].dg_start) |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2180 { |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2181 digraph_header(_(header_table[i].dg_header)); |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2182 break; |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2183 } |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2184 *previous = dp->result; |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2185 } |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2186 #endif |
7 | 2187 if (msg_col > Columns - list_width) |
2188 msg_putchar('\n'); | |
2189 if (msg_col) | |
2190 while (msg_col % list_width != 0) | |
2191 msg_putchar(' '); | |
2192 | |
2193 p = buf; | |
2194 *p++ = dp->char1; | |
2195 *p++ = dp->char2; | |
2196 *p++ = ' '; | |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2197 *p = NUL; |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2198 msg_outtrans(buf); |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2199 p = buf; |
7 | 2200 if (has_mbyte) |
2201 { | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2202 // add a space to draw a composing char on |
7 | 2203 if (enc_utf8 && utf_iscomposing(dp->result)) |
2204 *p++ = ' '; | |
2205 p += (*mb_char2bytes)(dp->result, p); | |
2206 } | |
2207 else | |
1869 | 2208 *p++ = (char_u)dp->result; |
15152
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2209 *p = NUL; |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2210 msg_outtrans_attr(buf, HL_ATTR(HLF_8)); |
1ef429366fd4
patch 8.1.0586: :digraph output is not easy to read
Bram Moolenaar <Bram@vim.org>
parents:
14862
diff
changeset
|
2211 p = buf; |
7 | 2212 if (char2cells(dp->result) == 1) |
2213 *p++ = ' '; | |
1869 | 2214 vim_snprintf((char *)p, sizeof(buf) - (p - buf), " %3d", dp->result); |
7 | 2215 msg_outtrans(buf); |
2216 } | |
2217 } | |
2218 | |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2219 # ifdef FEAT_EVAL |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2220 /* |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2221 * Get the two digraph characters from a typval. |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2222 * Return OK or FAIL. |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2223 */ |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2224 static int |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2225 get_digraph_chars(typval_T *arg, int *char1, int *char2) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2226 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2227 char_u buf_chars[NUMBUFLEN]; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2228 char_u *chars = tv_get_string_buf_chk(arg, buf_chars); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2229 char_u *p = chars; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2230 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2231 if (p != NULL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2232 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2233 if (*p != NUL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2234 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2235 *char1 = mb_cptr2char_adv(&p); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2236 if (*p != NUL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2237 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2238 *char2 = mb_cptr2char_adv(&p); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2239 if (*p == NUL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2240 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2241 if (check_digraph_chars_valid(*char1, *char2)) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2242 return OK; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2243 return FAIL; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2244 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2245 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2246 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2247 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2248 semsg(_(e_digraph_must_be_just_two_characters_str), chars); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2249 return FAIL; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2250 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2251 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2252 static int |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2253 digraph_set_common(typval_T *argchars, typval_T *argdigraph) |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2254 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2255 int char1, char2; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2256 char_u *digraph; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2257 char_u *p; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2258 char_u buf_digraph[NUMBUFLEN]; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2259 varnumber_T n; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2260 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2261 if (get_digraph_chars(argchars, &char1, &char2) == FAIL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2262 return FALSE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2263 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2264 digraph = tv_get_string_buf_chk(argdigraph, buf_digraph); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2265 if (digraph == NULL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2266 return FALSE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2267 p = digraph; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2268 n = mb_cptr2char_adv(&p); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2269 if (*p != NUL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2270 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2271 semsg(_(e_digraph_argument_must_be_one_character_str), digraph); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2272 return FALSE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2273 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2274 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2275 registerdigraph(char1, char2, (int)n); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2276 return TRUE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2277 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2278 # endif |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2279 |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2280 #endif // FEAT_DIGRAPHS |
7 | 2281 |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2282 #if defined(FEAT_EVAL) || defined(PROTO) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2283 /* |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2284 * "digraph_get()" function |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2285 */ |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2286 void |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2287 f_digraph_get(typval_T *argvars, typval_T *rettv) |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2288 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2289 # ifdef FEAT_DIGRAPHS |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2290 int code; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2291 char_u buf[NUMBUFLEN]; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2292 char_u *digraphs; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2293 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2294 rettv->v_type = VAR_STRING; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2295 rettv->vval.v_string = NULL; // Return empty string for failure |
25384
e8e2c4d33b9b
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Bram Moolenaar <Bram@vim.org>
parents:
25378
diff
changeset
|
2296 |
e8e2c4d33b9b
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Bram Moolenaar <Bram@vim.org>
parents:
25378
diff
changeset
|
2297 if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL) |
e8e2c4d33b9b
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Bram Moolenaar <Bram@vim.org>
parents:
25378
diff
changeset
|
2298 return; |
e8e2c4d33b9b
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Bram Moolenaar <Bram@vim.org>
parents:
25378
diff
changeset
|
2299 |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2300 digraphs = tv_get_string_chk(&argvars[0]); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2301 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2302 if (digraphs == NULL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2303 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2304 else if (STRLEN(digraphs) != 2) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2305 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2306 semsg(_(e_digraph_must_be_just_two_characters_str), digraphs); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2307 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2308 } |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2309 code = digraph_get(digraphs[0], digraphs[1], FALSE); |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2310 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2311 if (has_mbyte) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2312 buf[(*mb_char2bytes)(code, buf)] = NUL; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2313 else { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2314 buf[0] = code; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2315 buf[1] = NUL; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2316 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2317 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2318 rettv->vval.v_string = vim_strsave(buf); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2319 # else |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2320 emsg(_(e_no_digraphs_version)); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2321 # endif |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2322 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2323 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2324 /* |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2325 * "digraph_getlist()" function |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2326 */ |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2327 void |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2328 f_digraph_getlist(typval_T *argvars, typval_T *rettv) |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2329 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2330 # ifdef FEAT_DIGRAPHS |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2331 int flag_list_all; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2332 |
25759
ea0820d05257
patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents:
25567
diff
changeset
|
2333 if (in_vim9script() && check_for_opt_bool_arg(argvars, 0) == FAIL) |
25384
e8e2c4d33b9b
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Bram Moolenaar <Bram@vim.org>
parents:
25378
diff
changeset
|
2334 return; |
e8e2c4d33b9b
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Bram Moolenaar <Bram@vim.org>
parents:
25378
diff
changeset
|
2335 |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2336 if (argvars[0].v_type == VAR_UNKNOWN) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2337 flag_list_all = FALSE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2338 else |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2339 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2340 int error = FALSE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2341 varnumber_T flag = tv_get_number_chk(&argvars[0], &error); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2342 if (error) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2343 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2344 flag_list_all = flag ? TRUE : FALSE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2345 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2346 |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2347 digraph_getlist_common(flag_list_all, rettv); |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2348 # else |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2349 emsg(_(e_no_digraphs_version)); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2350 # endif |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2351 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2352 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2353 /* |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2354 * "digraph_set()" function |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2355 */ |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2356 void |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2357 f_digraph_set(typval_T *argvars, typval_T *rettv) |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2358 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2359 # ifdef FEAT_DIGRAPHS |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2360 rettv->v_type = VAR_BOOL; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2361 rettv->vval.v_number = VVAL_FALSE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2362 |
25384
e8e2c4d33b9b
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Bram Moolenaar <Bram@vim.org>
parents:
25378
diff
changeset
|
2363 if (in_vim9script() |
e8e2c4d33b9b
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Bram Moolenaar <Bram@vim.org>
parents:
25378
diff
changeset
|
2364 && (check_for_string_arg(argvars, 0) == FAIL |
25759
ea0820d05257
patch 8.2.3415: Vim9: not all function argument types are properly checked
Bram Moolenaar <Bram@vim.org>
parents:
25567
diff
changeset
|
2365 || check_for_string_arg(argvars, 1) == FAIL)) |
25384
e8e2c4d33b9b
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Bram Moolenaar <Bram@vim.org>
parents:
25378
diff
changeset
|
2366 return; |
e8e2c4d33b9b
patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Bram Moolenaar <Bram@vim.org>
parents:
25378
diff
changeset
|
2367 |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2368 if (!digraph_set_common(&argvars[0], &argvars[1])) |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2369 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2370 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2371 rettv->vval.v_number = VVAL_TRUE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2372 # else |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2373 emsg(_(e_no_digraphs_version)); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2374 # endif |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2375 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2376 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2377 /* |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2378 * "digraph_setlist()" function |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2379 */ |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2380 void |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2381 f_digraph_setlist(typval_T * argvars, typval_T *rettv) |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2382 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2383 # ifdef FEAT_DIGRAPHS |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2384 list_T *pl, *l; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2385 listitem_T *pli; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2386 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2387 rettv->v_type = VAR_BOOL; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2388 rettv->vval.v_number = VVAL_FALSE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2389 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2390 if (argvars[0].v_type != VAR_LIST) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2391 { |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2392 emsg(_(e_digraph_setlist_argument_must_be_list_of_lists_with_two_items)); |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2393 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2394 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2395 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2396 pl = argvars[0].vval.v_list; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2397 if (pl == NULL) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2398 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2399 // Empty list always results in success. |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2400 rettv->vval.v_number = VVAL_TRUE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2401 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2402 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2403 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2404 FOR_ALL_LIST_ITEMS(pl, pli) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2405 { |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2406 if (pli->li_tv.v_type != VAR_LIST) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2407 { |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2408 emsg(_(e_digraph_setlist_argument_must_be_list_of_lists_with_two_items)); |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2409 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2410 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2411 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2412 l = pli->li_tv.vval.v_list; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2413 if (l == NULL || l->lv_len != 2) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2414 { |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2415 emsg(_(e_digraph_setlist_argument_must_be_list_of_lists_with_two_items)); |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2416 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2417 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2418 |
25378
890fd8211202
patch 8.2.3226: new digraph functions use old naming scheme
Bram Moolenaar <Bram@vim.org>
parents:
25306
diff
changeset
|
2419 if (!digraph_set_common(&l->lv_first->li_tv, |
25294
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2420 &l->lv_first->li_next->li_tv)) |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2421 return; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2422 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2423 rettv->vval.v_number = VVAL_TRUE; |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2424 # else |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2425 emsg(_(e_no_digraphs_version)); |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2426 # endif |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2427 } |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2428 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2429 #endif // FEAT_EVAL |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2430 |
c626fd34b66f
patch 8.2.3184: cannot add a digraph with a leading space
Bram Moolenaar <Bram@vim.org>
parents:
22172
diff
changeset
|
2431 |
7 | 2432 #if defined(FEAT_KEYMAP) || defined(PROTO) |
2433 | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2434 // structure used for b_kmap_ga.ga_data |
7 | 2435 typedef struct |
2436 { | |
2437 char_u *from; | |
2438 char_u *to; | |
2439 } kmap_T; | |
2440 | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2441 #define KMAP_MAXLEN 20 // maximum length of "from" or "to" |
7 | 2442 |
7799
af3c41a3c53f
commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents:
7408
diff
changeset
|
2443 static void keymap_unload(void); |
7 | 2444 |
2445 /* | |
1869 | 2446 * Set up key mapping tables for the 'keymap' option. |
2447 * Returns NULL if OK, an error message for failure. This only needs to be | |
2448 * used when setting the option, not later when the value has already been | |
2449 * checked. | |
7 | 2450 */ |
15470
55ccc2d353bd
patch 8.1.0743: giving error messages is not flexible
Bram Moolenaar <Bram@vim.org>
parents:
15152
diff
changeset
|
2451 char * |
7817
83861277e6a3
commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents:
7799
diff
changeset
|
2452 keymap_init(void) |
7 | 2453 { |
2454 curbuf->b_kmap_state &= ~KEYMAP_INIT; | |
2455 | |
2456 if (*curbuf->b_p_keymap == NUL) | |
2457 { | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2458 // Stop any active keymap and clear the table. Also remove |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2459 // b:keymap_name, as no keymap is active now. |
7 | 2460 keymap_unload(); |
1308 | 2461 do_cmdline_cmd((char_u *)"unlet! b:keymap_name"); |
7 | 2462 } |
2463 else | |
2464 { | |
2465 char_u *buf; | |
1869 | 2466 size_t buflen; |
7 | 2467 |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2468 // Source the keymap file. It will contain a ":loadkeymap" command |
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2469 // which will call ex_loadkeymap() below. |
15595
1ec942f1b648
patch 8.1.0805: too many #ifdefs
Bram Moolenaar <Bram@vim.org>
parents:
15470
diff
changeset
|
2470 buflen = STRLEN(curbuf->b_p_keymap) + STRLEN(p_enc) + 14; |
16764
ef00b6bc186b
patch 8.1.1384: using "int" for alloc() often results in compiler warnings
Bram Moolenaar <Bram@vim.org>
parents:
15595
diff
changeset
|
2471 buf = alloc(buflen); |
7 | 2472 if (buf == NULL) |
25306
078edc1821bf
patch 8.2.3190: error messages are spread out
Bram Moolenaar <Bram@vim.org>
parents:
25294
diff
changeset
|
2473 return e_out_of_memory; |
7 | 2474 |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2475 // try finding "keymap/'keymap'_'encoding'.vim" in 'runtimepath' |
1869 | 2476 vim_snprintf((char *)buf, buflen, "keymap/%s_%s.vim", |
2477 curbuf->b_p_keymap, p_enc); | |
8524
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8212
diff
changeset
|
2478 if (source_runtime(buf, 0) == FAIL) |
7 | 2479 { |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2480 // try finding "keymap/'keymap'.vim" in 'runtimepath' |
1869 | 2481 vim_snprintf((char *)buf, buflen, "keymap/%s.vim", |
2482 curbuf->b_p_keymap); | |
8524
2f57bbe870ea
commit https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
Christian Brabandt <cb@256bit.org>
parents:
8212
diff
changeset
|
2483 if (source_runtime(buf, 0) == FAIL) |
7 | 2484 { |
2485 vim_free(buf); | |
26917
d91aea2a612c
patch 8.2.3987: error messages are spread out
Bram Moolenaar <Bram@vim.org>
parents:
26602
diff
changeset
|
2486 return N_(e_keymap_file_not_found); |
7 | 2487 } |
2488 } | |
2489 vim_free(buf); | |
2490 } | |
2491 | |
2492 return NULL; | |
2493 } | |
2494 | |
2495 /* | |
2496 * ":loadkeymap" command: load the following lines as the keymap. | |
2497 */ | |
2498 void | |
7817
83861277e6a3
commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents:
7799
diff
changeset
|
2499 ex_loadkeymap(exarg_T *eap) |
7 | 2500 { |
2501 char_u *line; | |
2502 char_u *p; | |
2503 char_u *s; | |
2504 kmap_T *kp; | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2505 #define KMAP_LLEN 200 // max length of "to" and "from" together |
7 | 2506 char_u buf[KMAP_LLEN + 11]; |
2507 int i; | |
2508 char_u *save_cpo = p_cpo; | |
2509 | |
28139
f34afadbef47
patch 8.2.4594: need to write script to a file to be able to source them
Bram Moolenaar <Bram@vim.org>
parents:
27490
diff
changeset
|
2510 if (!sourcing_a_script(eap)) |
7 | 2511 { |
26602
fac6673086df
patch 8.2.3830: error messages are spread out
Bram Moolenaar <Bram@vim.org>
parents:
25759
diff
changeset
|
2512 emsg(_(e_using_loadkeymap_not_in_sourced_file)); |
7 | 2513 return; |
2514 } | |
2515 | |
2516 /* | |
2517 * Stop any active keymap and clear the table. | |
2518 */ | |
2519 keymap_unload(); | |
2520 | |
2521 curbuf->b_kmap_state = 0; | |
27028
c9474ae175f4
patch 8.2.4043: using int for second argument of ga_init2()
Bram Moolenaar <Bram@vim.org>
parents:
26958
diff
changeset
|
2522 ga_init2(&curbuf->b_kmap_ga, sizeof(kmap_T), 20); |
7 | 2523 |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2524 // Set 'cpoptions' to "C" to avoid line continuation. |
7 | 2525 p_cpo = (char_u *)"C"; |
2526 | |
2527 /* | |
2528 * Get each line of the sourced file, break at the end. | |
2529 */ | |
2530 for (;;) | |
2531 { | |
17178
40c4cb095d53
patch 8.1.1588: in :let-heredoc line continuation is recognized
Bram Moolenaar <Bram@vim.org>
parents:
16764
diff
changeset
|
2532 line = eap->getline(0, eap->cookie, 0, TRUE); |
7 | 2533 if (line == NULL) |
2534 break; | |
2535 | |
2536 p = skipwhite(line); | |
2537 if (*p != '"' && *p != NUL && ga_grow(&curbuf->b_kmap_ga, 1) == OK) | |
2538 { | |
2539 kp = (kmap_T *)curbuf->b_kmap_ga.ga_data + curbuf->b_kmap_ga.ga_len; | |
2540 s = skiptowhite(p); | |
20751
d9a2e5dcfd9f
patch 8.2.0928: many type casts are used for vim_strnsave()
Bram Moolenaar <Bram@vim.org>
parents:
18777
diff
changeset
|
2541 kp->from = vim_strnsave(p, s - p); |
7 | 2542 p = skipwhite(s); |
2543 s = skiptowhite(p); | |
20751
d9a2e5dcfd9f
patch 8.2.0928: many type casts are used for vim_strnsave()
Bram Moolenaar <Bram@vim.org>
parents:
18777
diff
changeset
|
2544 kp->to = vim_strnsave(p, s - p); |
7 | 2545 |
2546 if (kp->from == NULL || kp->to == NULL | |
839 | 2547 || STRLEN(kp->from) + STRLEN(kp->to) >= KMAP_LLEN |
2548 || *kp->from == NUL || *kp->to == NUL) | |
7 | 2549 { |
839 | 2550 if (kp->to != NULL && *kp->to == NUL) |
26958
d92e0d85923f
patch 8.2.4008: error messages are spread out
Bram Moolenaar <Bram@vim.org>
parents:
26917
diff
changeset
|
2551 emsg(_(e_empty_keymap_entry)); |
7 | 2552 vim_free(kp->from); |
2553 vim_free(kp->to); | |
2554 } | |
2555 else | |
2556 ++curbuf->b_kmap_ga.ga_len; | |
2557 } | |
2558 vim_free(line); | |
2559 } | |
2560 | |
2561 /* | |
2562 * setup ":lnoremap" to map the keys | |
2563 */ | |
2564 for (i = 0; i < curbuf->b_kmap_ga.ga_len; ++i) | |
2565 { | |
274 | 2566 vim_snprintf((char *)buf, sizeof(buf), "<buffer> %s %s", |
7 | 2567 ((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].from, |
2568 ((kmap_T *)curbuf->b_kmap_ga.ga_data)[i].to); | |
2569 (void)do_map(2, buf, LANGMAP, FALSE); | |
2570 } | |
2571 | |
2572 p_cpo = save_cpo; | |
2573 | |
2574 curbuf->b_kmap_state |= KEYMAP_LOADED; | |
2575 status_redraw_curbuf(); | |
2576 } | |
2577 | |
2578 /* | |
2579 * Stop using 'keymap'. | |
2580 */ | |
2581 static void | |
7817
83861277e6a3
commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents:
7799
diff
changeset
|
2582 keymap_unload(void) |
7 | 2583 { |
2584 char_u buf[KMAP_MAXLEN + 10]; | |
2585 int i; | |
2586 char_u *save_cpo = p_cpo; | |
1624 | 2587 kmap_T *kp; |
7 | 2588 |
2589 if (!(curbuf->b_kmap_state & KEYMAP_LOADED)) | |
2590 return; | |
2591 | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2592 // Set 'cpoptions' to "C" to avoid line continuation. |
7 | 2593 p_cpo = (char_u *)"C"; |
2594 | |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2595 // clear the ":lmap"s |
1624 | 2596 kp = (kmap_T *)curbuf->b_kmap_ga.ga_data; |
7 | 2597 for (i = 0; i < curbuf->b_kmap_ga.ga_len; ++i) |
2598 { | |
1624 | 2599 vim_snprintf((char *)buf, sizeof(buf), "<buffer> %s", kp[i].from); |
7 | 2600 (void)do_map(1, buf, LANGMAP, FALSE); |
2601 } | |
13121
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2602 keymap_clear(&curbuf->b_kmap_ga); |
7 | 2603 |
2604 p_cpo = save_cpo; | |
2605 | |
2606 ga_clear(&curbuf->b_kmap_ga); | |
2607 curbuf->b_kmap_state &= ~KEYMAP_LOADED; | |
2608 status_redraw_curbuf(); | |
2609 } | |
2610 | |
13121
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2611 void |
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2612 keymap_clear(garray_T *kmap) |
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2613 { |
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2614 int i; |
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2615 kmap_T *kp = (kmap_T *)kmap->ga_data; |
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2616 |
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2617 for (i = 0; i < kmap->ga_len; ++i) |
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2618 { |
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2619 vim_free(kp[i].from); |
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2620 vim_free(kp[i].to); |
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2621 } |
3321582cae78
patch 8.0.1435: memory leak in test_arabic
Christian Brabandt <cb@256bit.org>
parents:
12716
diff
changeset
|
2622 } |
18777
3a68dc2a1bc1
patch 8.1.2378: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
17853
diff
changeset
|
2623 #endif // FEAT_KEYMAP |