1/* vi:set ts=8 sts=4 sw=4: 2 * 3 * VIM - Vi IMproved by Bram Moolenaar 4 * 5 * Do ":help uganda" in Vim to read copying and usage conditions. 6 * Do ":help credits" in Vim to see a list of people who contributed. 7 */ 8 9/* 10 * Farsi characters are categorized into following types: 11 * 12 * TyA (for capital letter representation) 13 * TyB (for types that look like _X e.g. AYN) 14 * TyC (for types that look like X_ e.g. YE_) 15 * TyD (for types that look like _X_ e.g. _AYN_) 16 * TyE (for types that look like X e.g. RE) 17 */ 18 19/* 20 * Farsi character set definition 21 */ 22 23/* 24 * Begin of the non-standard part 25 */ 26 27#define TEE_ 0x80 28#define ALEF_U_H_ 0x81 29#define ALEF_ 0x82 30#define _BE 0x83 31#define _PE 0x84 32#define _TE 0x85 33#define _SE 0x86 34#define _JIM 0x87 35#define _CHE 0x88 36#define _HE_J 0x89 37#define _XE 0x8a 38#define _SIN 0x8b 39#define _SHIN 0x8c 40#define _SAD 0x8d 41#define _ZAD 0x8e 42#define _AYN 0x8f 43#define _AYN_ 0x90 44#define AYN_ 0x91 45#define _GHAYN 0x92 46#define _GHAYN_ 0x93 47#define GHAYN_ 0x94 48#define _FE 0x95 49#define _GHAF 0x96 50#define _KAF 0x97 51#define _GAF 0x98 52#define _LAM 0x99 53#define LA 0x9a 54#define _MIM 0x9b 55#define _NOON 0x9c 56#define _HE 0x9d 57#define _HE_ 0x9e 58#define _YE 0x9f 59#define _IE 0xec 60#define IE_ 0xed 61#define IE 0xfb 62#define _YEE 0xee 63#define YEE_ 0xef 64#define YE_ 0xff 65 66/* 67 * End of the non-standard part 68 */ 69 70/* 71 * Standard part 72 */ 73 74#define F_BLANK 0xa0 /* Farsi ' ' (SP) character */ 75#define F_PSP 0xa1 /* PSP for capitalizing of a character */ 76#define F_PCN 0xa2 /* PCN for redefining of the hamye meaning */ 77#define F_EXCL 0xa3 /* Farsi ! character */ 78#define F_CURRENCY 0xa4 /* Farsi Rial character */ 79#define F_PERCENT 0xa5 /* Farsi % character */ 80#define F_PERIOD 0xa6 /* Farsi '.' character */ 81#define F_COMMA 0xa7 /* Farsi ',' character */ 82#define F_LPARENT 0xa8 /* Farsi '(' character */ 83#define F_RPARENT 0xa9 /* Farsi ')' character */ 84#define F_MUL 0xaa /* Farsi 'x' character */ 85#define F_PLUS 0xab /* Farsi '+' character */ 86#define F_BCOMMA 0xac /* Farsi comma character */ 87#define F_MINUS 0xad /* Farsi '-' character */ 88#define F_DIVIDE 0xae /* Farsi divide (/) character */ 89#define F_SLASH 0xaf /* Farsi '/' character */ 90 91#define FARSI_0 0xb0 92#define FARSI_1 0xb1 93#define FARSI_2 0xb2 94#define FARSI_3 0xb3 95#define FARSI_4 0xb4 96#define FARSI_5 0xb5 97#define FARSI_6 0xb6 98#define FARSI_7 0xb7 99#define FARSI_8 0xb8 100#define FARSI_9 0xb9 101 102#define F_DCOLON 0xba /* Farsi ':' character */ 103#define F_SEMICOLON 0xbb /* Farsi ';' character */ 104#define F_GREATER 0xbc /* Farsi '>' character */ 105#define F_EQUALS 0xbd /* Farsi '=' character */ 106#define F_LESS 0xbe /* Farsi '<' character */ 107#define F_QUESTION 0xbf /* Farsi ? character */ 108 109#define ALEF_A 0xc0 110#define ALEF 0xc1 111#define HAMZE 0xc2 112#define BE 0xc3 113#define PE 0xc4 114#define TE 0xc5 115#define SE 0xc6 116#define JIM 0xc7 117#define CHE 0xc8 118#define HE_J 0xc9 119#define XE 0xca 120#define DAL 0xcb 121#define ZAL 0xcc 122#define RE 0xcd 123#define ZE 0xce 124#define JE 0xcf 125#define SIN 0xd0 126#define SHIN 0xd1 127#define SAD 0xd2 128#define ZAD 0xd3 129#define _TA 0xd4 130#define _ZA 0xd5 131#define AYN 0xd6 132#define GHAYN 0xd7 133#define FE 0xd8 134#define GHAF 0xd9 135#define KAF 0xda 136#define GAF 0xdb 137#define LAM 0xdc 138#define MIM 0xdd 139#define NOON 0xde 140#define WAW 0xdf 141#define F_HE 0xe0 /* F_ added for name clash with Perl */ 142#define YE 0xe1 143#define TEE 0xfc 144#define _KAF_H 0xfd 145#define YEE 0xfe 146 147#define F_LBRACK 0xe2 /* Farsi '[' character */ 148#define F_RBRACK 0xe3 /* Farsi ']' character */ 149#define F_LBRACE 0xe4 /* Farsi '{' character */ 150#define F_RBRACE 0xe5 /* Farsi '}' character */ 151#define F_LQUOT 0xe6 /* Farsi left quotation character */ 152#define F_RQUOT 0xe7 /* Farsi right quotation character */ 153#define F_STAR 0xe8 /* Farsi '*' character */ 154#define F_UNDERLINE 0xe9 /* Farsi '_' character */ 155#define F_PIPE 0xea /* Farsi '|' character */ 156#define F_BSLASH 0xeb /* Farsi '\' character */ 157 158#define MAD 0xf0 159#define JAZR 0xf1 160#define OW 0xf2 161#define MAD_N 0xf3 162#define JAZR_N 0xf4 163#define OW_OW 0xf5 164#define TASH 0xf6 165#define OO 0xf7 166#define ALEF_U_H 0xf8 167#define WAW_H 0xf9 168#define ALEF_D_H 0xfa 169 170/* 171 * global definitions 172 * ================== 173 */ 174 175#define SRC_EDT 0 176#define SRC_CMD 1 177 178#define AT_CURSOR 0 179 180/* 181 * definitions for the window dependent functions (w_farsi). 182 */ 183#define W_CONV 0x1 184#define W_R_L 0x2 185 186 187/* special Farsi text messages */ 188 189EXTERN char_u farsi_text_1[] 190#ifdef DO_INIT 191 = { YE_, _SIN, RE, ALEF_, _FE, ' ', 'V', 'I', 'M', 192 ' ', F_HE, _BE, ' ', SHIN, RE, _GAF, DAL,' ', NOON, 193 ALEF_, _YE, ALEF_, _PE, '\0'} 194#endif 195 ; 196 197EXTERN char_u farsi_text_2[] 198#ifdef DO_INIT 199 = { YE_, _SIN, RE, ALEF_, _FE, ' ', FARSI_3, FARSI_3, 200 FARSI_4, FARSI_2, ' ', DAL, RE, ALEF, DAL, _NOON, 201 ALEF_, _TE, _SIN, ALEF, ' ', F_HE, _BE, ' ', SHIN, 202 RE, _GAF, DAL, ' ', NOON, ALEF_, _YE, ALEF_, _PE, '\0'} 203#endif 204 ; 205 206EXTERN char_u farsi_text_3[] 207#ifdef DO_INIT 208 = { DAL, WAW, _SHIN, _YE, _MIM, _NOON, ' ', YE_, _NOON, 209 ALEF_,_BE, _YE, _TE, _SHIN, _PE, ' ', 'R','E','P','L', 210 'A','C','E', ' ', NOON, ALEF_, _MIM, RE, _FE, ZE, ALEF, 211 ' ', 'R', 'E', 'V', 'E', 'R', 'S', 'E', ' ', 'I', 'N', 212 'S', 'E', 'R', 'T', ' ', SHIN, WAW, RE, ' ', ALEF_, _BE, 213 ' ', YE_, _SIN, RE, ALEF_, _FE, ' ', RE, DAL, ' ', RE, 214 ALEF_, _KAF,' ', MIM, ALEF_, _GAF, _NOON, _HE, '\0'} 215#endif 216 ; 217 218#if 0 /* not used */ 219EXTERN char_u farsi_text_4[] 220#ifdef DO_INIT 221 = { DAL, WAW, _SHIN, _YE, _MIM, _NOON, ' ', YE_, _NOON, 222 ALEF_, _BE, _YE, _TE, _SHIN, _PE, ' ', '<', 'C','T','R', 223 'L','-','B','>', ' ', NOON, ALEF_, _MIM, RE, _FE, ZE, 224 ALEF, ' ', YE_, _SIN, RE, ALEF_, _FE, ' ', RE, DAL, ' ', 225 RE, ALEF_, _KAF,' ', MIM, ALEF_, _GAF, _NOON, _HE, '\0'} 226#endif 227 ; 228#endif 229 230EXTERN char_u farsi_text_5[] 231#ifdef DO_INIT 232 = { ' ', YE_, _SIN, RE, ALEF_, _FE, '\0'} 233#endif 234 ; 235