unsigned char _vntolower[256] = { 0 , 1 , 198 , 3 , 4 , 199 , 231 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 214 , 21 , 22 , 23 , 24 , 219 , 26 , 27 , 28 , 29 , 220 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 , 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 , 64 , 97 , 98 , 99 , 100 , 101 , 102 , 103 , 104 , 105 , 106 , 107 , 108 , 109 , 110 , 111 , 112 , 113 , 114 , 115 , 116 , 117 , 118 , 119 , 120 , 121 , 122 , 91 , 92 , 93 , 94 , 95 , 96 , 97 , 98 , 99 , 100 , 101 , 102 , 103 , 104 , 105 , 106 , 107 , 108 , 109 , 110 , 111 , 112 , 113 , 114 , 115 , 116 , 117 , 118 , 119 , 120 , 121 , 122 , 123 , 124 , 125 , 126 , 127 , 213 , 161 , 162 , 163 , 164 , 165 , 166 , 167 , 168 , 169 , 170 , 171 , 172 , 173 , 174 , 175 , 176 , 177 , 178 , 181 , 254 , 190 , 182 , 183 , 184 , 246 , 247 , 239 , 252 , 251 , 248 , 207 , 245 , 161 , 162 , 163 , 164 , 165 , 166 , 167 , 168 , 169 , 170 , 171 , 172 , 173 , 174 , 175 , 176 , 177 , 178 , 222 , 189 , 181 , 182 , 183 , 184 , 241 , 209 , 215 , 216 , 189 , 190 , 223 , 224 , 225 , 226 , 227 , 228 , 229 , 198 , 199 , 232 , 233 , 234 , 235 , 236 , 237 , 238 , 207 , 240 , 209 , 242 , 243 , 244 , 213 , 214 , 215 , 216 , 249 , 250 , 219 , 220 , 253 , 222 , 223 , 224 , 225 , 226 , 227 , 228 , 229 , 230 , 231 , 232 , 233 , 234 , 235 , 236 , 237 , 238 , 239 , 240 , 241 , 242 , 243 , 244 , 245 , 246 , 247 , 248 , 249 , 250 , 251 , 252 , 253 , 254 , 230 , }; unsigned char _vntoupper[256] = { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 , 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 , 64 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , 80 , 81 , 82 , 83 , 84 , 85 , 86 , 87 , 88 , 89 , 90 , 91 , 92 , 93 , 94 , 95 , 96 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , 80 , 81 , 82 , 83 , 84 , 85 , 86 , 87 , 88 , 89 , 90 , 123 , 124 , 125 , 126 , 127 , 128 , 129 , 130 , 131 , 132 , 133 , 134 , 135 , 136 , 137 , 138 , 139 , 140 , 141 , 142 , 143 , 144 , 145 , 146 , 147 , 148 , 149 , 150 , 151 , 152 , 153 , 154 , 155 , 156 , 157 , 158 , 159 , 160 , 129 , 130 , 131 , 132 , 133 , 134 , 135 , 136 , 137 , 138 , 139 , 140 , 141 , 142 , 143 , 144 , 145 , 146 , 179 , 180 , 147 , 150 , 151 , 152 , 185 , 186 , 187 , 188 , 180 , 149 , 191 , 192 , 193 , 194 , 195 , 196 , 197 , 2 , 5 , 200 , 201 , 202 , 203 , 204 , 205 , 206 , 159 , 208 , 186 , 210 , 211 , 212 , 128 , 20 , 187 , 188 , 217 , 218 , 25 , 30 , 221 , 179 , 191 , 192 , 193 , 194 , 195 , 196 , 197 , 255 , 6 , 200 , 201 , 202 , 203 , 204 , 205 , 206 , 155 , 208 , 185 , 210 , 211 , 212 , 160 , 153 , 154 , 158 , 217 , 218 , 157 , 156 , 221 , 148 , 255 , }; unsigned int _pvntype[256] = { 0x20 , 0x20 , 0x01|0x100|0x800|0x1000 , 0x20 , 0x20 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x20 , 0x20 , 0x20|0x08 , 0x20|0x08 , 0x20|0x08 , 0x20|0x08 , 0x20|0x08 , 0x20 , 0x20 , 0x20 , 0x20 , 0x20 , 0x20 , 0x01|0x100|0x1000 , 0x20 , 0x20 , 0x20 , 0x20 , 0x01|0x100|0x1000 , 0x20 , 0x20 , 0x20 , 0x20 , 0x01|0x100|0x1000 , 0x20 , 0x08|0x80 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10|0x400 , 0x10|0x200 , 0x10 , 0x10 , 0x10|0x200 , 0x10 , 0x10 , 0x10|0x400 , 0x10 , 0x04|0x40 , 0x04|0x40 , 0x04|0x40 , 0x04|0x40 , 0x04|0x40 , 0x04|0x40 , 0x04|0x40 , 0x04|0x40 , 0x04|0x40 , 0x04|0x40 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10|0x400 , 0x10 , 0x01|0x100 , 0x01 , 0x01 , 0x01 , 0x01|0x100 , 0x01 , 0x01 , 0x01 , 0x01|0x100 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01|0x100 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01 , 0x01|0x100 , 0x01 , 0x01 , 0x01 , 0x01|0x100 , 0x01 , 0x10 , 0x10 , 0x10 , 0x10|0x200 , 0x10 , 0x10|0x400 , 0x02|0x100 , 0x02 , 0x02 , 0x02 , 0x02|0x100 , 0x02 , 0x02 , 0x02 , 0x02|0x100 , 0x02 , 0x02 , 0x02 , 0x02 , 0x02 , 0x02|0x100 , 0x02 , 0x02 , 0x02 , 0x02 , 0x02 , 0x02|0x100 , 0x02 , 0x02 , 0x02 , 0x02|0x100 , 0x02 , 0x10 , 0x10 , 0x10 , 0x10|0x400 , 0x20 , 0x01|0x100|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , 0x02|0x100|0x800 , 0x02|0x100|0x800|0x1000 , 0x01|0x100|0x800 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x800 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x800 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x800 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x02|0x100|0x1000 , 0x01 , 0x02|0x100|0x800|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x800 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x01|0x100|0x1000 , 0x01|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x01|0x100|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x800 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x800 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02 , 0x02|0x100|0x800|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x800 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x1000 , 0x02|0x100|0x800|0x1000 , 0x01|0x100|0x800|0x1000 , }; static Vk_Fsm Id[VK_MAX_FSMS]; static u_char Fsm_in_use[VK_MAX_FSMS]; static Vk_State State[VK_MAX_FSMS]; static Vk_State Prev_State[VK_MAX_FSMS]; static u_char Com[VK_MAX_FSMS]; /* composition announcer key */ static u_char Bs[VK_MAX_FSMS]; /* configurable backspace */ static u_char Batch[VK_MAX_FSMS]; /* batch or interactive, def = batch */ static u_char Prev_temp[VK_MAX_FSMS]; /* for EXPLICIT_COMPOSE state */ /* Make Co_data publicly available for diacritic manipulations! */ Co_Data FAR Co_data[VK_MAX_FSMS]; /* storage area for composition machiner y */ #define output_ch(ch, outchars, outcount) \ (outchars)[(*(outcount))++] = (ch) static u_char _8to7map[256][4]; /* at most <^><'> */ /* short-hand definitions */ #define C_state (Co_data->state) #define C1 (Co_data->c1) #define C2 (Co_data->c2) #define C3 (Co_data->c3) #define I1 (Co_data->i1) #define I2 (Co_data->i2) #define I3 (Co_data->i3) static u_char orig_icode[256]; static u_char icode[256]; /*********** RHcode **********/ static u_char RHcode[37] = { /* RHcode[all others] */ 0x00, /* RHcode[C_D] */ 0x40, /* RHcode[C_A] */ 0x1f, /* RHcode[C_A_breve] */ 0x07, /* RHcode[C_A_circumflex] */ 0x07, /* skipped */ 0x00, /* RHcode[C_E] */ 0x17, /* RHcode[C_I] */ 0x07, /* RHcode[C_E_circumflex] */ 0x07, /* RHcode[C_O] */ 0x37, /* RHcode[C_U] */ 0x27, /* RHcode[C_O_circumflex] */ 0x07, /* RHcode[C_O_horn] */ 0x07, /* RHcode[C_U_horn] */ 0x07, /* RHcode[C_Y] */ 0x07, /* RHcode[C_d] */ 0x40, /* RHcode[C_a] */ 0x1f, /* RHcode[C_a_breve] */ 0x07, /* RHcode[C_a_circumflex] */ 0x07, /* skipped */ 0x00, /* RHcode[C_e] */ 0x17, /* RHcode[C_i] */ 0x07, /* RHcode[C_e_circumflex] */ 0x07, /* RHcode[C_o] */ 0x37, /* RHcode[C_u] */ 0x27, /* RHcode[C_o_circumflex] */ 0x07, /* RHcode[C_o_horn] */ 0x07, /* RHcode[C_u_horn] */ 0x07, /* RHcode[C_y] */ 0x07, /* RHcode[CO_ACUTE] */ 0x00, /* RHcode[CO_GRAVE] */ 0x00, /* RHcode[CO_HOOK_ABOVE] */ 0x00, /* RHcode[CO_TILDE] */ 0x00, /* RHcode[CO_DOT_BELOW] */ 0x00, /* RHcode[CO_BREVE] */ 0x07, /* RHcode[CO_CIRCUMFLEX] */ 0x07, /* RHcode[CO_HORN] */ 0x07, }; /*********** LHcode **********/ static u_char LHcode[37] = { /* LHcode[all others] */ 0x00, /* LHcode[C_D] */ 0x40, /* LHcode[C_A] */ 0x00, /* LHcode[C_A_breve] */ 0x00, /* LHcode[C_A_circumflex] */ 0x00, /* skipped */ 0x00, /* LHcode[C_E] */ 0x00, /* LHcode[C_I] */ 0x00, /* LHcode[C_E_circumflex] */ 0x00, /* LHcode[C_O] */ 0x00, /* LHcode[C_U] */ 0x00, /* LHcode[C_O_circumflex] */ 0x00, /* LHcode[C_O_horn] */ 0x00, /* LHcode[C_U_horn] */ 0x00, /* LHcode[C_Y] */ 0x00, /* LHcode[C_d] */ 0x40, /* LHcode[C_a] */ 0x00, /* LHcode[C_a_breve] */ 0x00, /* LHcode[C_a_circumflex] */ 0x00, /* skipped */ 0x00, /* LHcode[C_e] */ 0x00, /* LHcode[C_i] */ 0x00, /* LHcode[C_e_circumflex] */ 0x00, /* LHcode[C_o] */ 0x00, /* LHcode[C_u] */ 0x00, /* LHcode[C_o_circumflex] */ 0x00, /* LHcode[C_o_horn] */ 0x00, /* LHcode[C_u_horn] */ 0x00, /* LHcode[C_y] */ 0x00, /* LHcode[CO_ACUTE] */ 0x01, /* LHcode[CO_GRAVE] */ 0x02, /* LHcode[CO_HOOK_ABOVE] */ 0x03, /* LHcode[CO_TILDE] */ 0x04, /* LHcode[CO_DOT_BELOW] */ 0x05, /* LHcode[CO_BREVE] */ 0x08, /* LHcode[CO_CIRCUMFLEX] */ 0x10, /* LHcode[CO_HORN] */ 0x20, }; /*********** offset **********/ static u_char offset[37] = { /* offset[all others] */ 0, /* offset[C_D] */ 4, /* offset[C_A] */ 0, /* offset[C_A_breve] */ 0, /* offset[C_A_circumflex] */ 0, /* skipped */ 0, /* offset[C_E] */ 0, /* offset[C_I] */ 0, /* offset[C_E_circumflex] */ 0, /* offset[C_O] */ 0, /* offset[C_U] */ 0, /* offset[C_O_circumflex] */ 0, /* offset[C_O_horn] */ 0, /* offset[C_U_horn] */ 0, /* offset[C_Y] */ 0, /* offset[C_d] */ 4, /* offset[C_a] */ 0, /* offset[C_a_breve] */ 0, /* offset[C_a_circumflex] */ 0, /* skipped */ 0, /* offset[C_e] */ 0, /* offset[C_i] */ 0, /* offset[C_e_circumflex] */ 0, /* offset[C_o] */ 0, /* offset[C_u] */ 0, /* offset[C_o_circumflex] */ 0, /* offset[C_o_horn] */ 0, /* offset[C_u_horn] */ 0, /* offset[C_y] */ 0, /* offset[CO_ACUTE] */ 0, /* offset[CO_GRAVE] */ 0, /* offset[CO_HOOK_ABOVE] */ 0, /* offset[CO_TILDE] */ 0, /* offset[CO_DOT_BELOW] */ 0, /* offset[CO_BREVE] */ 1, /* offset[CO_CIRCUMFLEX] */ 2, /* offset[CO_HORN] */ 3, }; /****** Resultant table *******/ static u_char table[29][6] = { /* 00 */ { 0, 0, 0, 0, 0, 0 }, /* save a subtraction to get the index */ /****** upper case *******/ /* 01 */ { C_D, 0, 0, 0, 0, 0}, /* 02 */ { C_A, C_A_acute, C_A_grave, C_A_hook_above, C_A_tilde, C_A_dot_below }, /* 03 */ { C_A_breve, C_A_breve_acute, C_A_breve_grave, C_A_breve_hook_above, C_A_breve_tilde, C_A_breve_dot_below }, /* 04 */ { C_A_circumflex, C_A_circumflex_acute, C_A_circumflex_grave, C_A_circumflex_hook_above, C_A_circumflex_tilde, C_A_circumflex_dot_below }, /* 05 */ { C_D_bar, 0, 0, 0, 0, 0}, /* 06 */ { C_E, C_E_acute, C_E_grave, C_E_hook_above, C_E_tilde, C_E_dot_below }, /* 07 */ { C_I, C_I_acute, C_I_grave, C_I_hook_above, C_I_tilde, C_I_dot_below }, /* 08 */ { C_E_circumflex, C_E_circumflex_acute, C_E_circumflex_grave, C_E_circumflex_hook_above, C_E_circumflex_tilde, C_E_circumflex_dot_below }, /* 09 */ { C_O, C_O_acute, C_O_grave, C_O_hook_above, C_O_tilde, C_O_dot_below }, /* 10 */ { C_U, C_U_acute, C_U_grave, C_U_hook_above, C_U_tilde, C_U_dot_below }, /* 11 */ { C_O_circumflex, C_O_circumflex_acute, C_O_circumflex_grave, C_O_circumflex_hook_above, C_O_circumflex_tilde, C_O_circumflex_dot_below }, /* 12 */ { C_O_horn, C_O_horn_acute, C_O_horn_grave, C_O_horn_hook_above, C_O_horn_tilde, C_O_horn_dot_below }, /* 13 */ { C_U_horn, C_U_horn_acute, C_U_horn_grave, C_U_horn_hook_above, C_U_horn_tilde, C_U_horn_dot_below }, /* 14 */ { C_Y, C_Y_acute, C_Y_grave, C_Y_hook_above, C_Y_tilde, C_Y_dot_below }, /******* lower case ******/ /* 15 */ { C_d, 0, 0, 0, 0, 0}, /* 16 */ { C_a, C_a_acute, C_a_grave, C_a_hook_above, C_a_tilde, C_a_dot_below }, /* 17 */ { C_a_breve, C_a_breve_acute, C_a_breve_grave, C_a_breve_hook_above, C_a_breve_tilde, C_a_breve_dot_below }, /* 18 */ { C_a_circumflex, C_a_circumflex_acute, C_a_circumflex_grave, C_a_circumflex_hook_above, C_a_circumflex_tilde, C_a_circumflex_dot_below }, /* 19 */ { C_d_bar, 0, 0, 0, 0, 0}, /* 20 */ { C_e, C_e_acute, C_e_grave, C_e_hook_above, C_e_tilde, C_e_dot_below }, /* 21 */ { C_i, C_i_acute, C_i_grave, C_i_hook_above, C_i_tilde, C_i_dot_below }, /* 22 */ { C_e_circumflex, C_e_circumflex_acute, C_e_circumflex_grave, C_e_circumflex_hook_above, C_e_circumflex_tilde, C_e_circumflex_dot_below }, /* 23 */ { C_o, C_o_acute, C_o_grave, C_o_hook_above, C_o_tilde, C_o_dot_below }, /* 24 */ { C_u, C_u_acute, C_u_grave, C_u_hook_above, C_u_tilde, C_u_dot_below }, /* 25 */ { C_o_circumflex, C_o_circumflex_acute, C_o_circumflex_grave, C_o_circumflex_hook_above, C_o_circumflex_tilde, C_o_circumflex_dot_below }, /* 26 */ { C_o_horn, C_o_horn_acute, C_o_horn_grave, C_o_horn_hook_above, C_o_horn_tilde, C_o_horn_dot_below }, /* 27 */ { C_u_horn, C_u_horn_acute, C_u_horn_grave, C_u_horn_hook_above, C_u_horn_tilde, C_u_horn_dot_below }, /* 28 */ { C_y, C_y_acute, C_y_grave, C_y_hook_above, C_y_tilde, C_y_dot_below }, }; /* end of table[][] */ u_char FAR PASCAL