diff options
author | lum <lum@cvs.openbsd.org> | 2012-04-12 04:48:00 +0000 |
---|---|---|
committer | lum <lum@cvs.openbsd.org> | 2012-04-12 04:48:00 +0000 |
commit | 7200ab5d40d844be49e9364bb1b12a79825463bf (patch) | |
tree | ba4ee06e33ddd0c5881ff3713836a57f4f292096 /usr.bin/mg/kbd.c | |
parent | 7d06e61d1ef69a6ce67fca8bfcec4eb20ec259a0 (diff) |
Remove the conditional directives NO_MACRO and NO_STARTUP.
They have not compiled for numerous years.
ok kjell@ millert@
Diffstat (limited to 'usr.bin/mg/kbd.c')
-rw-r--r-- | usr.bin/mg/kbd.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/usr.bin/mg/kbd.c b/usr.bin/mg/kbd.c index c0bd9e836aa..0eb3c360853 100644 --- a/usr.bin/mg/kbd.c +++ b/usr.bin/mg/kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kbd.c,v 1.24 2008/06/14 07:38:53 kjell Exp $ */ +/* $OpenBSD: kbd.c,v 1.25 2012/04/12 04:47:59 lum Exp $ */ /* This file is in the public domain. */ @@ -9,10 +9,7 @@ #include "def.h" #include "kbd.h" #include "key.h" - -#ifndef NO_MACRO #include "macro.h" -#endif /* !NO_MACRO */ #ifndef METABIT #define METABIT 0x80 @@ -160,10 +157,10 @@ doin(void) while ((funct = doscan(curmap, (key.k_chars[key.k_count++] = getkey(TRUE)), &curmap)) == NULL) /* nothing */; -#ifndef NO_MACRO + if (macrodef && macrocount < MAXMACRO) macro[macrocount++].m_funct = funct; -#endif /* !NO_MACRO */ + return (mgwrap(funct, 0, 1)); } @@ -192,12 +189,9 @@ rescan(int f, int n) getkey(TRUE), &curmap)) == NULL) /* nothing */; if (fp != rescan) { -#ifndef NO_MACRO if (macrodef && macrocount <= MAXMACRO) macro[macrocount - 1].m_funct = fp; -#endif /* !NO_MACRO */ - return (mgwrap(fp, f, n)); } } @@ -217,10 +211,8 @@ rescan(int f, int n) key.k_count = i; } if (fp != rescan && i >= key.k_count - 1) { -#ifndef NO_MACRO if (macrodef && macrocount <= MAXMACRO) macro[macrocount - 1].m_funct = fp; -#endif /* !NO_MACRO */ return (mgwrap(fp, f, n)); } } @@ -247,14 +239,12 @@ universal_argument(int f, int n) key.k_chars[key.k_count++] = c = getkey(TRUE); } if (funct != universal_argument) { -#ifndef NO_MACRO if (macrodef && macrocount < MAXMACRO - 1) { if (f & FFARG) macrocount--; macro[macrocount++].m_count = nn; macro[macrocount++].m_funct = funct; } -#endif /* !NO_MACRO */ return (mgwrap(funct, FFUNIV, nn)); } nn <<= 2; @@ -283,7 +273,6 @@ digit_argument(int f, int n) while ((funct = doscan(curmap, c, &curmap)) == NULL) { key.k_chars[key.k_count++] = c = getkey(TRUE); } -#ifndef NO_MACRO if (macrodef && macrocount < MAXMACRO - 1) { if (f & FFARG) macrocount--; @@ -292,7 +281,6 @@ digit_argument(int f, int n) macro[macrocount++].m_count = nn; macro[macrocount++].m_funct = funct; } -#endif /* !NO_MACRO */ return (mgwrap(funct, FFOTHARG, nn)); } @@ -321,7 +309,6 @@ negative_argument(int f, int n) while ((funct = doscan(curmap, c, &curmap)) == NULL) { key.k_chars[key.k_count++] = c = getkey(TRUE); } -#ifndef NO_MACRO if (macrodef && macrocount < MAXMACRO - 1) { if (f & FFARG) macrocount--; @@ -330,7 +317,6 @@ negative_argument(int f, int n) macro[macrocount++].m_count = nn; macro[macrocount++].m_funct = funct; } -#endif /* !NO_MACRO */ return (mgwrap(funct, FFNEGARG, nn)); } @@ -341,9 +327,7 @@ negative_argument(int f, int n) int selfinsert(int f, int n) { -#ifndef NO_MACRO struct line *lp; -#endif /* !NO_MACRO */ int c; int count; @@ -352,7 +336,7 @@ selfinsert(int f, int n) if (n == 0) return (TRUE); c = key.k_chars[key.k_count - 1]; -#ifndef NO_MACRO + if (macrodef && macrocount < MAXMACRO) { if (f & FFARG) macrocount -= 2; @@ -384,7 +368,6 @@ selfinsert(int f, int n) } thisflag |= CFINS; } -#endif /* !NO_MACRO */ if (c == '\n') { do { count = lnewline(); |