annotate src/arabic.c @ 8857:df68de6b6f1c v7.4.1716

commit https://github.com/vim/vim/commit/baec5c1768098f9dd867b465aaabfdfb294f10c2 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 6 23:06:23 2016 +0200 patch 7.4.1716 Problem: 'autochdir' doesn't work for the first file. (Rob Hoelz) Solution: Call DO_AUTOCHDIR after startup. (Christian Brabandt, closes https://github.com/vim/vim/issues/704)
author Christian Brabandt <cb@256bit.org>
date Wed, 06 Apr 2016 23:15:04 +0200
parents 83861277e6a3
children 9b048dced116
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 /* vi:set ts=8 sts=4 sw=4:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 * Do ":help uganda" in Vim to read copying and usage conditions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 * Do ":help credits" in Vim to see a list of people who contributed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 * See README.txt for an overview of the Vim source code.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 * arabic.c: functions for Arabic language
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 * Included by main.c, when FEAT_ARABIC & FEAT_GUI is defined.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 * --
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 * Author: Nadim Shaikli & Isam Bayazidi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
7799
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
21 static int A_is_a(int cur_c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
22 static int A_is_s(int cur_c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
23 static int A_is_f(int cur_c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
24 static int chg_c_a2s(int cur_c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
25 static int chg_c_a2i(int cur_c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
26 static int chg_c_a2m(int cur_c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
27 static int chg_c_a2f(int cur_c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
28 static int chg_c_i2m(int cur_c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
29 static int chg_c_f2m(int cur_c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
30 static int chg_c_laa2i(int hid_c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
31 static int chg_c_laa2f(int hid_c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
32 static int half_shape(int c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
33 static int A_firstc_laa(int c1, int c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
34 static int A_is_harakat(int c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
35 static int A_is_iso(int c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
36 static int A_is_formb(int c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
37 static int A_is_ok(int c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
38 static int A_is_valid(int c);
af3c41a3c53f commit https://github.com/vim/vim/commit/f28dbcea371b3a35727d91afc90fb90e0527d78a
Christian Brabandt <cb@256bit.org>
parents: 3549
diff changeset
39 static int A_is_special(int c);
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 * Returns True if c is an ISO-8859-6 shaped ARABIC letter (user entered)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
46 A_is_a(int cur_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 switch (cur_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 case a_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 case a_ALEF_MADDA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 case a_ALEF_HAMZA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 case a_WAW_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 case a_ALEF_HAMZA_BELOW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 case a_YEH_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 case a_ALEF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 case a_BEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 case a_TEH_MARBUTA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 case a_TEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 case a_THEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 case a_JEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 case a_HAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 case a_KHAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 case a_DAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 case a_THAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 case a_REH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 case a_ZAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 case a_SEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 case a_SHEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 case a_SAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 case a_DAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 case a_TAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 case a_ZAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 case a_AIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 case a_GHAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 case a_TATWEEL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 case a_FEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 case a_QAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 case a_KAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 case a_LAM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 case a_MEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 case a_NOON:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 case a_HEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 case a_WAW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 case a_ALEF_MAKSURA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 case a_YEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 return TRUE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 return FALSE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 * Returns True if c is an Isolated Form-B ARABIC letter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
98 A_is_s(int cur_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 switch (cur_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 case a_s_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 case a_s_ALEF_MADDA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 case a_s_ALEF_HAMZA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 case a_s_WAW_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 case a_s_ALEF_HAMZA_BELOW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 case a_s_YEH_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 case a_s_ALEF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 case a_s_BEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 case a_s_TEH_MARBUTA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 case a_s_TEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 case a_s_THEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 case a_s_JEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 case a_s_HAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 case a_s_KHAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 case a_s_DAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 case a_s_THAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 case a_s_REH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 case a_s_ZAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 case a_s_SEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 case a_s_SHEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 case a_s_SAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 case a_s_DAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 case a_s_TAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 case a_s_ZAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 case a_s_AIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 case a_s_GHAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 case a_s_FEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 case a_s_QAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 case a_s_KAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 case a_s_LAM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 case a_s_MEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 case a_s_NOON:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 case a_s_HEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 case a_s_WAW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 case a_s_ALEF_MAKSURA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 case a_s_YEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 return TRUE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 return FALSE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 * Returns True if c is a Final shape of an ARABIC letter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
149 A_is_f(int cur_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 switch (cur_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 case a_f_ALEF_MADDA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 case a_f_ALEF_HAMZA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 case a_f_WAW_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 case a_f_ALEF_HAMZA_BELOW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 case a_f_YEH_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 case a_f_ALEF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 case a_f_BEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 case a_f_TEH_MARBUTA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 case a_f_TEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 case a_f_THEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 case a_f_JEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 case a_f_HAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 case a_f_KHAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 case a_f_DAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 case a_f_THAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 case a_f_REH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 case a_f_ZAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 case a_f_SEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 case a_f_SHEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 case a_f_SAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 case a_f_DAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 case a_f_TAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 case a_f_ZAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 case a_f_AIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 case a_f_GHAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 case a_f_FEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 case a_f_QAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 case a_f_KAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 case a_f_LAM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 case a_f_MEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 case a_f_NOON:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 case a_f_HEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 case a_f_WAW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 case a_f_ALEF_MAKSURA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 case a_f_YEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 case a_f_LAM_ALEF_MADDA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 case a_f_LAM_ALEF_HAMZA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 case a_f_LAM_ALEF_HAMZA_BELOW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 case a_f_LAM_ALEF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 return TRUE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 return FALSE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 * Change shape - from ISO-8859-6/Isolated to Form-B Isolated
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
202 chg_c_a2s(int cur_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 int tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 switch (cur_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 case a_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 tempc = a_s_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 case a_ALEF_MADDA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 tempc = a_s_ALEF_MADDA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 case a_ALEF_HAMZA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 tempc = a_s_ALEF_HAMZA_ABOVE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 case a_WAW_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 tempc = a_s_WAW_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 case a_ALEF_HAMZA_BELOW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 tempc = a_s_ALEF_HAMZA_BELOW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 case a_YEH_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 tempc = a_s_YEH_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 case a_ALEF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 tempc = a_s_ALEF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 case a_TEH_MARBUTA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 tempc = a_s_TEH_MARBUTA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 case a_DAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 tempc = a_s_DAL;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 case a_THAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 tempc = a_s_THAL;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 case a_REH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 tempc = a_s_REH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 case a_ZAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 tempc = a_s_ZAIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 case a_TATWEEL: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 tempc = cur_c;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 case a_WAW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 tempc = a_s_WAW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 case a_ALEF_MAKSURA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 tempc = a_s_ALEF_MAKSURA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 case a_BEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 tempc = a_s_BEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 case a_TEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 tempc = a_s_TEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 case a_THEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 tempc = a_s_THEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 case a_JEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 tempc = a_s_JEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 case a_HAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 tempc = a_s_HAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 case a_KHAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 tempc = a_s_KHAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 case a_SEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 tempc = a_s_SEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 case a_SHEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 tempc = a_s_SHEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 case a_SAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278 tempc = a_s_SAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280 case a_DAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281 tempc = a_s_DAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283 case a_TAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284 tempc = a_s_TAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286 case a_ZAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 tempc = a_s_ZAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289 case a_AIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290 tempc = a_s_AIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 case a_GHAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293 tempc = a_s_GHAIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295 case a_FEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 tempc = a_s_FEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 case a_QAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 tempc = a_s_QAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
301 case a_KAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302 tempc = a_s_KAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
304 case a_LAM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
305 tempc = a_s_LAM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
306 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
307 case a_MEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
308 tempc = a_s_MEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
310 case a_NOON:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311 tempc = a_s_NOON;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313 case a_HEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314 tempc = a_s_HEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316 case a_YEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317 tempc = a_s_YEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
319 default:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320 tempc = 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323 return tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
324 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
326
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
327 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328 * Change shape - from ISO-8859-6/Isolated to Initial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
331 chg_c_a2i(int cur_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
333 int tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335 switch (cur_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337 case a_YEH_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338 tempc = a_i_YEH_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340 case a_HAMZA: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341 tempc = a_s_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343 case a_ALEF_MADDA: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344 tempc = a_s_ALEF_MADDA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
346 case a_ALEF_HAMZA_ABOVE: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347 tempc = a_s_ALEF_HAMZA_ABOVE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
348 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
349 case a_WAW_HAMZA: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
350 tempc = a_s_WAW_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
351 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352 case a_ALEF_HAMZA_BELOW: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
353 tempc = a_s_ALEF_HAMZA_BELOW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
354 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355 case a_ALEF: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
356 tempc = a_s_ALEF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
358 case a_TEH_MARBUTA: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
359 tempc = a_s_TEH_MARBUTA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
360 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
361 case a_DAL: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
362 tempc = a_s_DAL;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364 case a_THAL: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 tempc = a_s_THAL;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367 case a_REH: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368 tempc = a_s_REH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
370 case a_ZAIN: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
371 tempc = a_s_ZAIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373 case a_TATWEEL: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
374 tempc = cur_c;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
375 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
376 case a_WAW: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
377 tempc = a_s_WAW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
378 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379 case a_ALEF_MAKSURA: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
380 tempc = a_s_ALEF_MAKSURA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
381 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
382 case a_BEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
383 tempc = a_i_BEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
385 case a_TEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
386 tempc = a_i_TEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
387 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388 case a_THEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
389 tempc = a_i_THEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
390 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391 case a_JEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
392 tempc = a_i_JEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
393 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
394 case a_HAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
395 tempc = a_i_HAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
396 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
397 case a_KHAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398 tempc = a_i_KHAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
399 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
400 case a_SEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
401 tempc = a_i_SEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403 case a_SHEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
404 tempc = a_i_SHEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
405 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406 case a_SAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
407 tempc = a_i_SAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
409 case a_DAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
410 tempc = a_i_DAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
411 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
412 case a_TAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
413 tempc = a_i_TAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
414 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
415 case a_ZAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
416 tempc = a_i_ZAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
417 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
418 case a_AIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
419 tempc = a_i_AIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
420 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
421 case a_GHAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
422 tempc = a_i_GHAIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424 case a_FEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425 tempc = a_i_FEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
427 case a_QAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428 tempc = a_i_QAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430 case a_KAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431 tempc = a_i_KAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433 case a_LAM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434 tempc = a_i_LAM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
435 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436 case a_MEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
437 tempc = a_i_MEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
439 case a_NOON:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
440 tempc = a_i_NOON;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442 case a_HEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443 tempc = a_i_HEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
445 case a_YEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
446 tempc = a_i_YEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448 default:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
449 tempc = 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
450 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452 return tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
454
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
455
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457 * Change shape - from ISO-8859-6/Isolated to Medial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
459 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
460 chg_c_a2m(int cur_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
462 int tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
463
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
464 switch (cur_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
465 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466 case a_HAMZA: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
467 tempc = a_s_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
468 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
469 case a_ALEF_MADDA: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
470 tempc = a_f_ALEF_MADDA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
472 case a_ALEF_HAMZA_ABOVE: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 tempc = a_f_ALEF_HAMZA_ABOVE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
475 case a_WAW_HAMZA: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
476 tempc = a_f_WAW_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
477 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478 case a_ALEF_HAMZA_BELOW: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
479 tempc = a_f_ALEF_HAMZA_BELOW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
481 case a_YEH_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482 tempc = a_m_YEH_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
484 case a_ALEF: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
485 tempc = a_f_ALEF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
486 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
487 case a_BEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
488 tempc = a_m_BEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
489 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
490 case a_TEH_MARBUTA: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
491 tempc = a_f_TEH_MARBUTA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
492 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
493 case a_TEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
494 tempc = a_m_TEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
495 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
496 case a_THEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
497 tempc = a_m_THEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
498 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
499 case a_JEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
500 tempc = a_m_JEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
501 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
502 case a_HAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
503 tempc = a_m_HAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
504 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
505 case a_KHAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
506 tempc = a_m_KHAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
507 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
508 case a_DAL: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
509 tempc = a_f_DAL;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
510 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
511 case a_THAL: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
512 tempc = a_f_THAL;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
513 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
514 case a_REH: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
515 tempc = a_f_REH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
516 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
517 case a_ZAIN: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
518 tempc = a_f_ZAIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
519 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
520 case a_SEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
521 tempc = a_m_SEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
522 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
523 case a_SHEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
524 tempc = a_m_SHEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
525 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
526 case a_SAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
527 tempc = a_m_SAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
528 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
529 case a_DAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
530 tempc = a_m_DAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
531 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
532 case a_TAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
533 tempc = a_m_TAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
534 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
535 case a_ZAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
536 tempc = a_m_ZAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
537 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
538 case a_AIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
539 tempc = a_m_AIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
540 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
541 case a_GHAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
542 tempc = a_m_GHAIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
543 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
544 case a_TATWEEL: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
545 tempc = cur_c;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
546 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
547 case a_FEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
548 tempc = a_m_FEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
549 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
550 case a_QAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
551 tempc = a_m_QAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
552 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
553 case a_KAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
554 tempc = a_m_KAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
555 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
556 case a_LAM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
557 tempc = a_m_LAM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
558 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
559 case a_MEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
560 tempc = a_m_MEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
561 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
562 case a_NOON:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
563 tempc = a_m_NOON;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
564 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
565 case a_HEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
566 tempc = a_m_HEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
567 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
568 case a_WAW: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
569 tempc = a_f_WAW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
570 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
571 case a_ALEF_MAKSURA: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
572 tempc = a_f_ALEF_MAKSURA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
573 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
574 case a_YEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
575 tempc = a_m_YEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
576 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
577 default:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
578 tempc = 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
579 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
580
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
581 return tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
582 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
583
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
584
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
585 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
586 * Change shape - from ISO-8859-6/Isolated to final
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
587 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
588 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
589 chg_c_a2f(int cur_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
590 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
591 int tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
592
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
593 /* NOTE: these encodings need to be accounted for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
594
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
595 a_f_ALEF_MADDA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
596 a_f_ALEF_HAMZA_ABOVE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
597 a_f_ALEF_HAMZA_BELOW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
598 a_f_LAM_ALEF_MADDA_ABOVE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
599 a_f_LAM_ALEF_HAMZA_ABOVE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
600 a_f_LAM_ALEF_HAMZA_BELOW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
601 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
602
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
603 switch (cur_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
604 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
605 case a_HAMZA: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
606 tempc = a_s_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
607 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
608 case a_ALEF_MADDA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
609 tempc = a_f_ALEF_MADDA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
610 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
611 case a_ALEF_HAMZA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
612 tempc = a_f_ALEF_HAMZA_ABOVE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
613 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
614 case a_WAW_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
615 tempc = a_f_WAW_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
616 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
617 case a_ALEF_HAMZA_BELOW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
618 tempc = a_f_ALEF_HAMZA_BELOW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
619 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
620 case a_YEH_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
621 tempc = a_f_YEH_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
622 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
623 case a_ALEF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
624 tempc = a_f_ALEF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
625 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
626 case a_BEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
627 tempc = a_f_BEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
628 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
629 case a_TEH_MARBUTA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
630 tempc = a_f_TEH_MARBUTA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
631 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
632 case a_TEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
633 tempc = a_f_TEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
634 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
635 case a_THEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
636 tempc = a_f_THEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
637 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
638 case a_JEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
639 tempc = a_f_JEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
640 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
641 case a_HAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
642 tempc = a_f_HAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
643 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
644 case a_KHAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
645 tempc = a_f_KHAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
646 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
647 case a_DAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
648 tempc = a_f_DAL;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
649 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
650 case a_THAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
651 tempc = a_f_THAL;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
652 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
653 case a_REH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
654 tempc = a_f_REH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
655 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
656 case a_ZAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
657 tempc = a_f_ZAIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
658 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
659 case a_SEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
660 tempc = a_f_SEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
661 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
662 case a_SHEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
663 tempc = a_f_SHEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
664 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
665 case a_SAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
666 tempc = a_f_SAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
667 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
668 case a_DAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
669 tempc = a_f_DAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
670 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
671 case a_TAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
672 tempc = a_f_TAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
673 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
674 case a_ZAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
675 tempc = a_f_ZAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
676 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
677 case a_AIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
678 tempc = a_f_AIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
679 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
680 case a_GHAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
681 tempc = a_f_GHAIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
682 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
683 case a_TATWEEL: /* exception */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
684 tempc = cur_c;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
685 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
686 case a_FEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
687 tempc = a_f_FEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
688 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
689 case a_QAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
690 tempc = a_f_QAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
691 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
692 case a_KAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
693 tempc = a_f_KAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
694 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
695 case a_LAM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
696 tempc = a_f_LAM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
697 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
698 case a_MEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
699 tempc = a_f_MEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
700 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
701 case a_NOON:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
702 tempc = a_f_NOON;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
703 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
704 case a_HEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
705 tempc = a_f_HEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
706 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
707 case a_WAW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
708 tempc = a_f_WAW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
709 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
710 case a_ALEF_MAKSURA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
711 tempc = a_f_ALEF_MAKSURA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
712 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
713 case a_YEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
714 tempc = a_f_YEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
715 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
716 default:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
717 tempc = 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
718 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
719
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
720 return tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
721 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
722
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
723
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
724 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
725 * Change shape - from Initial to Medial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
726 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
727 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
728 chg_c_i2m(int cur_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
729 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
730 int tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
731
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
732 switch (cur_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
733 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
734 case a_i_YEH_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
735 tempc = a_m_YEH_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
736 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
737 case a_i_BEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
738 tempc = a_m_BEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
739 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
740 case a_i_TEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
741 tempc = a_m_TEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
742 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
743 case a_i_THEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
744 tempc = a_m_THEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
745 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
746 case a_i_JEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
747 tempc = a_m_JEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
748 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
749 case a_i_HAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
750 tempc = a_m_HAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
751 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
752 case a_i_KHAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
753 tempc = a_m_KHAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
754 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
755 case a_i_SEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
756 tempc = a_m_SEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
757 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
758 case a_i_SHEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
759 tempc = a_m_SHEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
760 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
761 case a_i_SAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
762 tempc = a_m_SAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
763 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
764 case a_i_DAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
765 tempc = a_m_DAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
766 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
767 case a_i_TAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
768 tempc = a_m_TAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
769 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
770 case a_i_ZAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
771 tempc = a_m_ZAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
772 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
773 case a_i_AIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
774 tempc = a_m_AIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
775 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
776 case a_i_GHAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
777 tempc = a_m_GHAIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
778 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
779 case a_i_FEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
780 tempc = a_m_FEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
781 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
782 case a_i_QAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
783 tempc = a_m_QAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
784 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
785 case a_i_KAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
786 tempc = a_m_KAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
787 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
788 case a_i_LAM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
789 tempc = a_m_LAM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
790 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
791 case a_i_MEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
792 tempc = a_m_MEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
793 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
794 case a_i_NOON:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
795 tempc = a_m_NOON;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
796 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
797 case a_i_HEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
798 tempc = a_m_HEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
799 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
800 case a_i_YEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
801 tempc = a_m_YEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
802 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
803 default:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
804 tempc = 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
805 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
806
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
807 return tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
808 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
809
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
810
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
811 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
812 * Change shape - from Final to Medial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
813 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
814 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
815 chg_c_f2m(int cur_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
816 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
817 int tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
818
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
819 switch (cur_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
820 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
821 /* NOTE: these encodings are multi-positional, no ?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
822 case a_f_ALEF_MADDA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
823 case a_f_ALEF_HAMZA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
824 case a_f_ALEF_HAMZA_BELOW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
825 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
826 case a_f_YEH_HAMZA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
827 tempc = a_m_YEH_HAMZA;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
828 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
829 case a_f_WAW_HAMZA: /* exceptions */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
830 case a_f_ALEF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
831 case a_f_TEH_MARBUTA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
832 case a_f_DAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
833 case a_f_THAL:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
834 case a_f_REH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
835 case a_f_ZAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
836 case a_f_WAW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
837 case a_f_ALEF_MAKSURA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
838 tempc = cur_c;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
839 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
840 case a_f_BEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
841 tempc = a_m_BEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
842 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
843 case a_f_TEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
844 tempc = a_m_TEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
845 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
846 case a_f_THEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
847 tempc = a_m_THEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
848 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
849 case a_f_JEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
850 tempc = a_m_JEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
851 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
852 case a_f_HAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
853 tempc = a_m_HAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
854 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
855 case a_f_KHAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
856 tempc = a_m_KHAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
857 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
858 case a_f_SEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
859 tempc = a_m_SEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
860 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
861 case a_f_SHEEN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
862 tempc = a_m_SHEEN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
863 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
864 case a_f_SAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
865 tempc = a_m_SAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
866 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
867 case a_f_DAD:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
868 tempc = a_m_DAD;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
869 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
870 case a_f_TAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
871 tempc = a_m_TAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
872 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
873 case a_f_ZAH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
874 tempc = a_m_ZAH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
875 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
876 case a_f_AIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
877 tempc = a_m_AIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
878 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
879 case a_f_GHAIN:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
880 tempc = a_m_GHAIN;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
881 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
882 case a_f_FEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
883 tempc = a_m_FEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
884 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
885 case a_f_QAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
886 tempc = a_m_QAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
887 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
888 case a_f_KAF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
889 tempc = a_m_KAF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
890 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
891 case a_f_LAM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
892 tempc = a_m_LAM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
893 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
894 case a_f_MEEM:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
895 tempc = a_m_MEEM;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
896 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
897 case a_f_NOON:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
898 tempc = a_m_NOON;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
899 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
900 case a_f_HEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
901 tempc = a_m_HEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
902 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
903 case a_f_YEH:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
904 tempc = a_m_YEH;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
905 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
906 /* NOTE: these encodings are multi-positional, no ?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
907 case a_f_LAM_ALEF_MADDA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
908 case a_f_LAM_ALEF_HAMZA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
909 case a_f_LAM_ALEF_HAMZA_BELOW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
910 case a_f_LAM_ALEF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
911 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
912 default:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
913 tempc = 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
914 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
915
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
916 return tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
917 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
918
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
919
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
920 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
921 * Change shape - from Combination (2 char) to an Isolated
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
922 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
923 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
924 chg_c_laa2i(int hid_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
925 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
926 int tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
927
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
928 switch (hid_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
929 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
930 case a_ALEF_MADDA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
931 tempc = a_s_LAM_ALEF_MADDA_ABOVE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
932 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
933 case a_ALEF_HAMZA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
934 tempc = a_s_LAM_ALEF_HAMZA_ABOVE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
935 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
936 case a_ALEF_HAMZA_BELOW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
937 tempc = a_s_LAM_ALEF_HAMZA_BELOW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
938 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
939 case a_ALEF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
940 tempc = a_s_LAM_ALEF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
941 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
942 default:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
943 tempc = 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
944 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
945
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
946 return tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
947 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
948
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
949
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
950 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
951 * Change shape - from Combination-Isolated to Final
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
952 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
953 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
954 chg_c_laa2f(int hid_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
955 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
956 int tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
957
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
958 switch (hid_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
959 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
960 case a_ALEF_MADDA:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
961 tempc = a_f_LAM_ALEF_MADDA_ABOVE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
962 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
963 case a_ALEF_HAMZA_ABOVE:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
964 tempc = a_f_LAM_ALEF_HAMZA_ABOVE;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
965 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
966 case a_ALEF_HAMZA_BELOW:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
967 tempc = a_f_LAM_ALEF_HAMZA_BELOW;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
968 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
969 case a_ALEF:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
970 tempc = a_f_LAM_ALEF;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
971 break;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
972 default:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
973 tempc = 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
974 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
975
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
976 return tempc;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
977 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
978
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
979 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
980 * Do "half-shaping" on character "c". Return zero if no shaping.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
981 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
982 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
983 half_shape(int c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
984 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
985 if (A_is_a(c))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
986 return chg_c_a2i(c);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
987 if (A_is_valid(c) && A_is_f(c))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
988 return chg_c_f2m(c);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
989 return 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
990 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
991
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
992 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
993 * Do Arabic shaping on character "c". Returns the shaped character.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
994 * out: "ccp" points to the first byte of the character to be shaped.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
995 * in/out: "c1p" points to the first composing char for "c".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
996 * in: "prev_c" is the previous character (not shaped)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
997 * in: "prev_c1" is the first composing char for the previous char
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
998 * (not shaped)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
999 * in: "next_c" is the next character (not shaped).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1000 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1001 int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1002 arabic_shape(
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1003 int c,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1004 int *ccp,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1005 int *c1p,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1006 int prev_c,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1007 int prev_c1,
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1008 int next_c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1009 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1010 int curr_c;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1011 int shape_c;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1012 int curr_laa;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1013 int prev_laa;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1014
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1015 /* Deal only with Arabic character, pass back all others */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1016 if (!A_is_ok(c))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1017 return c;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1018
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1019 /* half-shape current and previous character */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1020 shape_c = half_shape(prev_c);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1021
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1022 /* Save away current character */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1023 curr_c = c;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1024
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1025 curr_laa = A_firstc_laa(c, *c1p);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1026 prev_laa = A_firstc_laa(prev_c, prev_c1);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1027
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1028 if (curr_laa)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1029 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1030 if (A_is_valid(prev_c) && !A_is_f(shape_c)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1031 && !A_is_s(shape_c) && !prev_laa)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1032 curr_c = chg_c_laa2f(curr_laa);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1033 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1034 curr_c = chg_c_laa2i(curr_laa);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1035
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1036 /* Remove the composing character */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1037 *c1p = 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1038 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1039 else if (!A_is_valid(prev_c) && A_is_valid(next_c))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1040 curr_c = chg_c_a2i(c);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1041 else if (!shape_c || A_is_f(shape_c) || A_is_s(shape_c) || prev_laa)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1042 curr_c = A_is_valid(next_c) ? chg_c_a2i(c) : chg_c_a2s(c);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1043 else if (A_is_valid(next_c))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1044 curr_c = A_is_iso(c) ? chg_c_a2m(c) : chg_c_i2m(c);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1045 else if (A_is_valid(prev_c))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1046 curr_c = chg_c_a2f(c);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1047 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1048 curr_c = chg_c_a2s(c);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1049
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1050 /* Sanity check -- curr_c should, in the future, never be 0.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1051 * We should, in the future, insert a fatal error here. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1052 if (curr_c == NUL)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1053 curr_c = c;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1054
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1055 if (curr_c != c && ccp != NULL)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1056 {
3549
f52d2ea0f81c updated for version 7.3.535
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
1057 char_u buf[MB_MAXBYTES + 1];
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1058
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1059 /* Update the first byte of the character. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1060 (*mb_char2bytes)(curr_c, buf);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1061 *ccp = buf[0];
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1062 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1063
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1064 /* Return the shaped character */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1065 return curr_c;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1066 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1067
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1068
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1069 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1070 * A_firstc_laa returns first character of LAA combination if it exists
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1071 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1072 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1073 A_firstc_laa(
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1074 int c, /* base character */
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1075 int c1) /* first composing character */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1076 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1077 if (c1 != NUL && c == a_LAM && !A_is_harakat(c1))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1078 return c1;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1079 return 0;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1080 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1081
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1082
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1083 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1084 * A_is_harakat returns TRUE if 'c' is an Arabic Harakat character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1085 * (harakat/tanween)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1086 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1087 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1088 A_is_harakat(int c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1089 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1090 return (c >= a_FATHATAN && c <= a_SUKUN);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1091 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1092
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1093
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1094 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1095 * A_is_iso returns TRUE if 'c' is an Arabic ISO-8859-6 character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1096 * (alphabet/number/punctuation)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1097 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1098 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1099 A_is_iso(int c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1100 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1101 return ((c >= a_HAMZA && c <= a_GHAIN)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1102 || (c >= a_TATWEEL && c <= a_HAMZA_BELOW)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1103 || c == a_MINI_ALEF);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1104 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1107 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1108 * A_is_formb returns TRUE if 'c' is an Arabic 10646-1 FormB character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1109 * (alphabet/number/punctuation)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1110 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1111 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1112 A_is_formb(int c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1113 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1114 return ((c >= a_s_FATHATAN && c <= a_s_DAMMATAN)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1115 || c == a_s_KASRATAN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1116 || (c >= a_s_FATHA && c <= a_f_LAM_ALEF)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1117 || c == a_BYTE_ORDER_MARK);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1118 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1121 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1122 * A_is_ok returns TRUE if 'c' is an Arabic 10646 (8859-6 or Form-B)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1123 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1124 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1125 A_is_ok(int c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1126 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1127 return (A_is_iso(c) || A_is_formb(c));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1128 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1130
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1131 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1132 * A_is_valid returns TRUE if 'c' is an Arabic 10646 (8859-6 or Form-B)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1133 * with some exceptions/exclusions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1134 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1135 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1136 A_is_valid(int c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1137 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1138 return (A_is_ok(c) && !A_is_special(c));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1139 }
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1141
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1142 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1143 * A_is_special returns TRUE if 'c' is not a special Arabic character.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1144 * Specials don't adhere to most of the rules.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1145 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1146 static int
7817
83861277e6a3 commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Christian Brabandt <cb@256bit.org>
parents: 7799
diff changeset
1147 A_is_special(int c)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1148 {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1149 return (c == a_HAMZA || c == a_s_HAMZA);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1150 }