annotate src/arabic.c @ 9635:974a40c76e19

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