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 }, // <20>
{ 'A', '^', 162 }, // <20>
{ 'E', '`', 163 }, // <20>
{ 'E', '^', 164 }, // <20>
{ 'E', '"', 165 }, // <20>
{ 'I', '^', 166 }, // <20>
{ 'I', '"', 167 }, // <20>
{ '\'', '\'', 168 }, // <20>
{ '`', '`', 169 }, // <20>
{ '^', '^', 170 }, // <20>
{ '"', '"', 171 }, // <20>
{ '~', '~', 172 }, // <20>
{ 'U', '`', 173 }, // <20>
{ 'U', '^', 174 }, // <20>
{ 'L', '=', 175 }, // <20>
{ '~', '_', 176 }, // <20>
{ 'Y', '\'', 177 }, // <20>
{ 'y', '\'', 178 }, // <20>
{ '~', 'o', 179 }, // <20>
{ 'C', ',', 180 }, // <20>
{ 'c', ',', 181 }, // <20>
{ 'N', '~', 182 }, // <20>
{ 'n', '~', 183 }, // <20>
{ '~', '!', 184 }, // <20>
{ '~', '?', 185 }, // <20>
{ 'o', 'x', 186 }, // <20>
{ 'L', '-', 187 }, // <20>
{ 'Y', '=', 188 }, // <20>
{ 'p', 'p', 189 }, // <20>
{ 'f', 'l', 190 }, // <20>
{ 'c', '|', 191 }, // <20>
{ 'a', '^', 192 }, // <20>
{ 'e', '^', 193 }, // <20>
{ 'o', '^', 194 }, // <20>
{ 'u', '^', 195 }, // <20>
{ 'a', '\'', 196 }, // <20>
{ 'e', '\'', 197 }, // <20>
{ 'o', '\'', 198 }, // <20>
{ 'u', '\'', 199 }, // <20>
{ 'a', '`', 200 }, // <20>
{ 'e', '`', 201 }, // <20>
{ 'o', '`', 202 }, // <20>
{ 'u', '`', 203 }, // <20>
{ 'a', '"', 204 }, // <20>
{ 'e', '"', 205 }, // <20>
{ 'o', '"', 206 }, // <20>
{ 'u', '"', 207 }, // <20>
{ 'A', 'o', 208 }, // <20>
{ 'i', '^', 209 }, // <20>
{ 'O', '/', 210 }, // <20>
{ 'A', 'E', 211 }, // <20>
{ 'a', 'o', 212 }, // <20>
{ 'i', '\'', 213 }, // <20>
{ 'o', '/', 214 }, // <20>
{ 'a', 'e', 215 }, // <20>
{ 'A', '"', 216 }, // <20>
{ 'i', '`', 217 }, // <20>
{ 'O', '"', 218 }, // <20>
{ 'U', '"', 219 }, // <20>
{ 'E', '\'', 220 }, // <20>
{ 'i', '"', 221 }, // <20>
{ 's', 's', 222 }, // <20>
{ 'O', '^', 223 }, // <20>
{ 'A', '\'', 224 }, // <20>
{ 'A', '~', 225 }, // <20>
{ 'a', '~', 226 }, // <20>
{ 'D', '-', 227 }, // <20>
{ 'd', '-', 228 }, // <20>
{ 'I', '\'', 229 }, // <20>
{ 'I', '`', 230 }, // <20>
{ 'O', '\'', 231 }, // <20>
{ 'O', '`', 232 }, // <20>
{ 'O', '~', 233 }, // <20>
{ 'o', '~', 234 }, // <20>
{ 'S', '~', 235 }, // <20>
{ 's', '~', 236 }, // <20>
{ 'U', '\'', 237 }, // <20>
{ 'Y', '"', 238 }, // <20>
{ 'y', '"', 239 }, // <20>
{ 'p', '-', 240 }, // <20>
{ 'p', '~', 241 }, // <20>
{ '~', '.', 242 }, // <20>
{ 'j', 'u', 243 }, // <20>
{ 'P', 'p', 244 }, // <20>
{ '3', '4', 245 }, // <20>
{ '-', '-', 246 }, // <20>
{ '1', '4', 247 }, // <20>
{ '1', '2', 248 }, // <20>
{ 'a', '_', 249 }, // <20>
{ 'o', '_', 250 }, // <20>
{ '<', '<', 251 }, // <20>
{ 'x', 'x', 252 }, // <20>
{ '>', '>', 253 }, // <20>
{ '+', '-', 254 }, // <20>
{ 'n', 'u', 255 }, // x XX
{ NUL, NUL, NUL } };
#else // !HPUX_DIGRAPHS
# ifdef OLD_DIGRAPHS
// digraphs compatible with Vim 5.x
{ { '~', '!', 161 }, // <20>
{ 'c', '|', 162 }, // <20>
{ '$', '$', 163 }, // <20>
{ 'o', 'x', 164 }, // <20> - currency symbol in ISO 8859-1
{ 'e', '=', 164 }, // <20> - euro symbol in ISO 8859-15
{ 'Y', '-', 165 }, // <20>
{ '|', '|', 166 }, // <20>
{ 'p', 'a', 167 }, // <20>
{ '"', '"', 168 }, // <20>
{ 'c', 'O', 169 }, // <20>
{ 'a', '-', 170 }, // <20>
{ '<', '<', 171 }, // <20>
{ '-', ',', 172 }, // <20>
{ '-', '-', 173 }, // <20>
{ 'r', 'O', 174 }, // <20>
{ '-', '=', 175 }, // <20>
{ '~', 'o', 176 }, // <20>
{ '+', '-', 177 }, // <20>
{ '2', '2', 178 }, // <20>
{ '3', '3', 179 }, // <20>
{ '\'', '\'', 180 }, // <20>
{ 'j', 'u', 181 }, // <20>
{ 'p', 'p', 182 }, // <20>
{ '~', '.', 183 }, // <20>
{ ',', ',', 184 }, // <20>
{ '1', '1', 185 }, // <20>
{ 'o', '-', 186 }, // <20>
{ '>', '>', 187 }, // <20>
{ '1', '4', 188 }, // <20>
{ '1', '2', 189 }, // <20>
{ '3', '4', 190 }, // <20>
{ '~', '?', 191 }, // <20>
{ 'A', '`', 192 }, // <20>
{ 'A', '\'', 193 }, // <20>
{ 'A', '^', 194 }, // <20>
{ 'A', '~', 195 }, // <20>
{ 'A', '"', 196 }, // <20>
{ 'A', '@', 197 }, // <20>
{ 'A', 'A', 197 }, // <20>
{ 'A', 'E', 198 }, // <20>
{ 'C', ',', 199 }, // <20>
{ 'E', '`', 200 }, // <20>
{ 'E', '\'', 201 }, // <20>
{ 'E', '^', 202 }, // <20>
{ 'E', '"', 203 }, // <20>
{ 'I', '`', 204 }, // <20>
{ 'I', '\'', 205 }, // <20>
{ 'I', '^', 206 }, // <20>
{ 'I', '"', 207 }, // <20>
{ 'D', '-', 208 }, // <20>
{ 'N', '~', 209 }, // <20>
{ 'O', '`', 210 }, // <20>
{ 'O', '\'', 211 }, // <20>
{ 'O', '^', 212 }, // <20>
{ 'O', '~', 213 }, // <20>
{ 'O', '"', 214 }, // <20>
{ '/', '\\', 215 }, // <20> - multiplication symbol in ISO 8859-1
{ 'O', 'E', 215 }, // <20> - OE in ISO 8859-15
{ 'O', '/', 216 }, // <20>
{ 'U', '`', 217 }, // <20>
{ 'U', '\'', 218 }, // <20>
{ 'U', '^', 219 }, // <20>
{ 'U', '"', 220 }, // <20>
{ 'Y', '\'', 221 }, // <20>
{ 'I', 'p', 222 }, // <20>
{ 's', 's', 223 }, // <20>
{ 'a', '`', 224 }, // <20>
{ 'a', '\'', 225 }, // <20>
{ 'a', '^', 226 }, // <20>
{ 'a', '~', 227 }, // <20>
{ 'a', '"', 228 }, // <20>
{ 'a', '@', 229 }, // <20>
{ 'a', 'a', 229 }, // <20>
{ 'a', 'e', 230 }, // <20>
{ 'c', ',', 231 }, // <20>
{ 'e', '`', 232 }, // <20>
{ 'e', '\'', 233 }, // <20>
{ 'e', '^', 234 }, // <20>
{ 'e', '"', 235 }, // <20>
{ 'i', '`', 236 }, // <20>
{ 'i', '\'', 237 }, // <20>
{ 'i', '^', 238 }, // <20>
{ 'i', '"', 239 }, // <20>
{ 'd', '-', 240 }, // <20>
{ 'n', '~', 241 }, // <20>
{ 'o', '`', 242 }, // <20>
{ 'o', '\'', 243 }, // <20>
{ 'o', '^', 244 }, // <20>
{ 'o', '~', 245 }, // <20>
{ 'o', '"', 246 }, // <20>
{ ':', '-', 247 }, // <20> - division symbol in ISO 8859-1
{ 'o', 'e', 247 }, // <20> - oe in ISO 8859-15
{ 'o', '/', 248 }, // <20>
{ 'u', '`', 249 }, // <20>
{ 'u', '\'', 250 }, // <20>
{ 'u', '^', 251 }, // <20>
{ 'u', '"', 252 }, // <20>
{ 'y', '\'', 253 }, // <20>
{ 'i', 'p', 254 }, // <20>
{ '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();
}