Remove HPUX and Vim 5.x compatible digraphs

This commit is contained in:
John Schmidt 2014-03-17 17:52:50 +01:00 committed by Thiago de Arruda
parent 44a6f194b4
commit fe7160b1d7

View File

@ -35,214 +35,6 @@ static garray_T user_digraphs = {0, 0, (int)sizeof(digr_T), 10, NULL};
/// Note: Characters marked with XX are not included literally, because some
/// compilers cannot handle them (Amiga SAS/C is the most picky one).
static digr_T digraphdefault[] =
#ifdef HPUX_DIGRAPHS
/// different HPUX digraphs
{ { 'A', '`', 161 }, // ¡
{ 'A', '^', 162 }, // ¢
{ 'E', '`', 163 }, // £
{ 'E', '^', 164 }, // ¤
{ 'E', '"', 165 }, // ¥
{ 'I', '^', 166 }, // ¦
{ 'I', '"', 167 }, // §
{ '\'', '\'', 168 }, // ¨
{ '`', '`', 169 }, // ©
{ '^', '^', 170 }, // ª
{ '"', '"', 171 }, // «
{ '~', '~', 172 }, // ¬
{ 'U', '`', 173 }, // ­
{ 'U', '^', 174 }, // ®
{ 'L', '=', 175 }, // ¯
{ '~', '_', 176 }, // °
{ 'Y', '\'', 177 }, // ±
{ 'y', '\'', 178 }, // ²
{ '~', 'o', 179 }, // ³
{ 'C', ',', 180 }, // ´
{ 'c', ',', 181 }, // µ
{ 'N', '~', 182 }, // ¶
{ 'n', '~', 183 }, // ·
{ '~', '!', 184 }, // ¸
{ '~', '?', 185 }, // ¹
{ 'o', 'x', 186 }, // º
{ 'L', '-', 187 }, // »
{ 'Y', '=', 188 }, // ¼
{ 'p', 'p', 189 }, // ½
{ 'f', 'l', 190 }, // ¾
{ 'c', '|', 191 }, // ¿
{ 'a', '^', 192 }, // À
{ 'e', '^', 193 }, // Á
{ 'o', '^', 194 }, // Â
{ 'u', '^', 195 }, // Ã
{ 'a', '\'', 196 }, // Ä
{ 'e', '\'', 197 }, // Å
{ 'o', '\'', 198 }, // Æ
{ 'u', '\'', 199 }, // Ç
{ 'a', '`', 200 }, // È
{ 'e', '`', 201 }, // É
{ 'o', '`', 202 }, // Ê
{ 'u', '`', 203 }, // Ë
{ 'a', '"', 204 }, // Ì
{ 'e', '"', 205 }, // Í
{ 'o', '"', 206 }, // Î
{ 'u', '"', 207 }, // Ï
{ 'A', 'o', 208 }, // Ð
{ 'i', '^', 209 }, // Ñ
{ 'O', '/', 210 }, // Ò
{ 'A', 'E', 211 }, // Ó
{ 'a', 'o', 212 }, // Ô
{ 'i', '\'', 213 }, // Õ
{ 'o', '/', 214 }, // Ö
{ 'a', 'e', 215 }, // ×
{ 'A', '"', 216 }, // Ø
{ 'i', '`', 217 }, // Ù
{ 'O', '"', 218 }, // Ú
{ 'U', '"', 219 }, // Û
{ 'E', '\'', 220 }, // Ü
{ 'i', '"', 221 }, // Ý
{ 's', 's', 222 }, // Þ
{ 'O', '^', 223 }, // ß
{ 'A', '\'', 224 }, // à
{ 'A', '~', 225 }, // á
{ 'a', '~', 226 }, // â
{ 'D', '-', 227 }, // ã
{ 'd', '-', 228 }, // ä
{ 'I', '\'', 229 }, // å
{ 'I', '`', 230 }, // æ
{ 'O', '\'', 231 }, // ç
{ 'O', '`', 232 }, // è
{ 'O', '~', 233 }, // é
{ 'o', '~', 234 }, // ê
{ 'S', '~', 235 }, // ë
{ 's', '~', 236 }, // ì
{ 'U', '\'', 237 }, // í
{ 'Y', '"', 238 }, // î
{ 'y', '"', 239 }, // ï
{ 'p', '-', 240 }, // ð
{ 'p', '~', 241 }, // ñ
{ '~', '.', 242 }, // ò
{ 'j', 'u', 243 }, // ó
{ 'P', 'p', 244 }, // ô
{ '3', '4', 245 }, // õ
{ '-', '-', 246 }, // ö
{ '1', '4', 247 }, // ÷
{ '1', '2', 248 }, // ø
{ 'a', '_', 249 }, // ù
{ 'o', '_', 250 }, // ú
{ '<', '<', 251 }, // û
{ 'x', 'x', 252 }, // ü
{ '>', '>', 253 }, // ý
{ '+', '-', 254 }, // þ
{ 'n', 'u', 255 }, // x XX
{ NUL, NUL, NUL } };
#else // !HPUX_DIGRAPHS
# ifdef OLD_DIGRAPHS
// digraphs compatible with Vim 5.x
{ { '~', '!', 161 }, // ¡
{ 'c', '|', 162 }, // ¢
{ '$', '$', 163 }, // £
{ 'o', 'x', 164 }, // ¤ - currency symbol in ISO 8859-1
{ 'e', '=', 164 }, // ¤ - euro symbol in ISO 8859-15
{ 'Y', '-', 165 }, // ¥
{ '|', '|', 166 }, // ¦
{ 'p', 'a', 167 }, // §
{ '"', '"', 168 }, // ¨
{ 'c', 'O', 169 }, // ©
{ 'a', '-', 170 }, // ª
{ '<', '<', 171 }, // «
{ '-', ',', 172 }, // ¬
{ '-', '-', 173 }, // ­
{ 'r', 'O', 174 }, // ®
{ '-', '=', 175 }, // ¯
{ '~', 'o', 176 }, // °
{ '+', '-', 177 }, // ±
{ '2', '2', 178 }, // ²
{ '3', '3', 179 }, // ³
{ '\'', '\'', 180 }, // ´
{ 'j', 'u', 181 }, // µ
{ 'p', 'p', 182 }, // ¶
{ '~', '.', 183 }, // ·
{ ',', ',', 184 }, // ¸
{ '1', '1', 185 }, // ¹
{ 'o', '-', 186 }, // º
{ '>', '>', 187 }, // »
{ '1', '4', 188 }, // ¼
{ '1', '2', 189 }, // ½
{ '3', '4', 190 }, // ¾
{ '~', '?', 191 }, // ¿
{ 'A', '`', 192 }, // À
{ 'A', '\'', 193 }, // Á
{ 'A', '^', 194 }, // Â
{ 'A', '~', 195 }, // Ã
{ 'A', '"', 196 }, // Ä
{ 'A', '@', 197 }, // Å
{ 'A', 'A', 197 }, // Å
{ 'A', 'E', 198 }, // Æ
{ 'C', ',', 199 }, // Ç
{ 'E', '`', 200 }, // È
{ 'E', '\'', 201 }, // É
{ 'E', '^', 202 }, // Ê
{ 'E', '"', 203 }, // Ë
{ 'I', '`', 204 }, // Ì
{ 'I', '\'', 205 }, // Í
{ 'I', '^', 206 }, // Î
{ 'I', '"', 207 }, // Ï
{ 'D', '-', 208 }, // Ð
{ 'N', '~', 209 }, // Ñ
{ 'O', '`', 210 }, // Ò
{ 'O', '\'', 211 }, // Ó
{ 'O', '^', 212 }, // Ô
{ 'O', '~', 213 }, // Õ
{ 'O', '"', 214 }, // Ö
{ '/', '\\', 215 }, // × - multiplication symbol in ISO 8859-1
{ 'O', 'E', 215 }, // × - OE in ISO 8859-15
{ 'O', '/', 216 }, // Ø
{ 'U', '`', 217 }, // Ù
{ 'U', '\'', 218 }, // Ú
{ 'U', '^', 219 }, // Û
{ 'U', '"', 220 }, // Ü
{ 'Y', '\'', 221 }, // Ý
{ 'I', 'p', 222 }, // Þ
{ 's', 's', 223 }, // ß
{ 'a', '`', 224 }, // à
{ 'a', '\'', 225 }, // á
{ 'a', '^', 226 }, // â
{ 'a', '~', 227 }, // ã
{ 'a', '"', 228 }, // ä
{ 'a', '@', 229 }, // å
{ 'a', 'a', 229 }, // å
{ 'a', 'e', 230 }, // æ
{ 'c', ',', 231 }, // ç
{ 'e', '`', 232 }, // è
{ 'e', '\'', 233 }, // é
{ 'e', '^', 234 }, // ê
{ 'e', '"', 235 }, // ë
{ 'i', '`', 236 }, // ì
{ 'i', '\'', 237 }, // í
{ 'i', '^', 238 }, // î
{ 'i', '"', 239 }, // ï
{ 'd', '-', 240 }, // ð
{ 'n', '~', 241 }, // ñ
{ 'o', '`', 242 }, // ò
{ 'o', '\'', 243 }, // ó
{ 'o', '^', 244 }, // ô
{ 'o', '~', 245 }, // õ
{ 'o', '"', 246 }, // ö
{ ':', '-', 247 }, // ÷ - division symbol in ISO 8859-1
{ 'o', 'e', 247 }, // ÷ - oe in ISO 8859-15
{ 'o', '/', 248 }, // ø
{ 'u', '`', 249 }, // ù
{ 'u', '\'', 250 }, // ú
{ 'u', '^', 251 }, // û
{ 'u', '"', 252 }, // ü
{ 'y', '\'', 253 }, // ý
{ 'i', 'p', 254 }, // þ
{ 'y', '"', 255 }, // x XX
{ NUL, NUL, NUL } };
# else // OLD_DIGRAPHS
// digraphs for Unicode from RFC1345
// (also work for ISO-8859-1 aka latin1)
@ -422,8 +214,6 @@ static digr_T digraphdefault[] =
{ 't', 'h', 0xfe },
{ 'y', ':', 0xff },
# define USE_UNICODE_DIGRAPHS
{ 'A', '-', 0x0100 },
{ 'a', '-', 0x0101 },
{ 'A', '(', 0x0102 },
@ -1613,10 +1403,6 @@ static digr_T digraphdefault[] =
{ NUL, NUL, NUL }
};
# endif // OLD_DIGRAPHS
#endif // !HPUX_DIGRAPHS
/// handle digraphs after typing a character
///
/// @param c
@ -1725,7 +1511,6 @@ static int getexactdigraph(int char1, int char2, int meta_char)
++dp;
}
}
#ifdef USE_UNICODE_DIGRAPHS
if ((retval != 0) && !enc_utf8) {
char_u buf[6], *to;
@ -1747,7 +1532,6 @@ static int getexactdigraph(int char1, int char2, int meta_char)
(void)convert_setup(&vc, NULL, NULL);
}
}
#endif // ifdef USE_UNICODE_DIGRAPHS
// Ignore multi-byte characters when not in multi-byte mode.
if (!has_mbyte && (retval > 0xff)) {
@ -1855,7 +1639,6 @@ void listdigraphs(void)
dp = digraphdefault;
for (i = 0; dp->char1 != NUL && !got_int; ++i) {
#if defined(USE_UNICODE_DIGRAPHS) && defined(FEAT_MBYTE)
digr_T tmp;
// May need to convert the result to 'encoding'.
@ -1868,13 +1651,6 @@ void listdigraphs(void)
&& (has_mbyte || (tmp.result <= 255))) {
printdigraph(&tmp);
}
#else // if defined(USE_UNICODE_DIGRAPHS) && defined(FEAT_MBYTE)
if ((getexactdigraph(dp->char1, dp->char2, FALSE) == dp->result)
&& (has_mbyte || (dp->result <= 255))) {
printdigraph(dp);
}
#endif // if defined(USE_UNICODE_DIGRAPHS) && defined(FEAT_MBYTE)
dp++;
ui_breakcheck();
}