summaryrefslogtreecommitdiff
path: root/src/regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regexp.c')
-rw-r--r--src/regexp.c46
1 files changed, 1 insertions, 45 deletions
diff --git a/src/regexp.c b/src/regexp.c
index 29c2d3882..81ca51492 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -231,21 +231,11 @@ init_class_tab(void)
class_tab[i] = RI_DIGIT + RI_HEX + RI_WORD;
else if (i >= 'a' && i <= 'f')
class_tab[i] = RI_HEX + RI_WORD + RI_HEAD + RI_ALPHA + RI_LOWER;
-#ifdef EBCDIC
- else if ((i >= 'g' && i <= 'i') || (i >= 'j' && i <= 'r')
- || (i >= 's' && i <= 'z'))
-#else
else if (i >= 'g' && i <= 'z')
-#endif
class_tab[i] = RI_WORD + RI_HEAD + RI_ALPHA + RI_LOWER;
else if (i >= 'A' && i <= 'F')
class_tab[i] = RI_HEX + RI_WORD + RI_HEAD + RI_ALPHA + RI_UPPER;
-#ifdef EBCDIC
- else if ((i >= 'G' && i <= 'I') || ( i >= 'J' && i <= 'R')
- || (i >= 'S' && i <= 'Z'))
-#else
else if (i >= 'G' && i <= 'Z')
-#endif
class_tab[i] = RI_WORD + RI_HEAD + RI_ALPHA + RI_UPPER;
else if (i == '_')
class_tab[i] = RI_WORD + RI_HEAD;
@@ -300,9 +290,6 @@ static int reg_strict; // "[abc" is illegal
* META contains all characters that may be magic, except '^' and '$'.
*/
-#ifdef EBCDIC
-static char_u META[] = "%&()*+.123456789<=>?@ACDFHIKLMOPSUVWX[_acdfhiklmnopsuvwxz{|~";
-#else
// META[] is used often enough to justify turning it into a table.
static char_u META_flags[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -320,7 +307,6 @@ static char_u META_flags[] = {
// p s u v w x z { | ~
1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1
};
-#endif
static int curchr; // currently parsed character
// Previous character. Note: prevchr is sometimes -1 when we are not at the
@@ -409,30 +395,6 @@ get_equi_class(char_u **pp)
return 0;
}
-#ifdef EBCDIC
-/*
- * Table for equivalence class "c". (IBM-1047)
- */
-static char *EQUIVAL_CLASS_C[16] = {
- "A\x62\x63\x64\x65\x66\x67",
- "C\x68",
- "E\x71\x72\x73\x74",
- "I\x75\x76\x77\x78",
- "N\x69",
- "O\xEB\xEC\xED\xEE\xEF\x80",
- "U\xFB\xFC\xFD\xFE",
- "Y\xBA",
- "a\x42\x43\x44\x45\x46\x47",
- "c\x48",
- "e\x51\x52\x53\x54",
- "i\x55\x56\x57\x58",
- "n\x49",
- "o\xCB\xCC\xCD\xCE\xCF\x70",
- "u\xDB\xDC\xDD\xDE",
- "y\x8D\xDF",
-};
-#endif
-
/*
* Check for a collating element "[.a.]". "pp" points to the '['.
* Returns a character. Zero means that no item was recognized. Otherwise
@@ -788,13 +750,7 @@ peekchr(void)
if (c == NUL)
curchr = '\\'; // trailing '\'
- else if (
-#ifdef EBCDIC
- vim_strchr(META, c)
-#else
- c <= '~' && META_flags[c]
-#endif
- )
+ else if (c <= '~' && META_flags[c])
{
/*
* META contains everything that may be magic sometimes,