=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/extend.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- src/usr.bin/mg/extend.c 2014/12/06 23:20:17 1.58 +++ src/usr.bin/mg/extend.c 2015/03/17 18:08:52 1.59 @@ -1,4 +1,4 @@ -/* $OpenBSD: extend.c,v 1.58 2014/12/06 23:20:17 krw Exp $ */ +/* $OpenBSD: extend.c,v 1.59 2015/03/17 18:08:52 bcallah Exp $ */ /* This file is in the public domain. */ @@ -16,12 +16,10 @@ #include "macro.h" -#ifdef FKEYS #include "key.h" #ifndef BINDKEY #define BINDKEY /* bindkey is used by FKEYS startup code */ #endif /* !BINDKEY */ -#endif /* FKEYS */ static int remap(KEYMAP *, int, PF, KEYMAP *); static KEYMAP *reallocmap(KEYMAP *); @@ -433,7 +431,6 @@ return (remap(curmap, c, funct, pref_map)); } -#ifdef FKEYS /* * Wrapper for bindkey() that converts escapes. */ @@ -478,7 +475,6 @@ key.k_count = i; return (bindkey(&map, func, key.k_chars, key.k_count)); } -#endif /* FKEYS */ #endif /* BINDKEY */ /* @@ -694,9 +690,7 @@ } /* - * excline - run a line from a load file or eval-expression. If FKEYS is - * defined, duplicate functionality of dobind so function key values don't - * have to fit in type char. + * excline - run a line from a load file or eval-expression. */ int excline(char *line) @@ -707,7 +701,6 @@ char *funcp, *tmp; char *argp = NULL; long nl; -#ifdef FKEYS int bind; KEYMAP *curmap; #define BINDARG 0 /* this arg is key to bind (local/global set key) */ @@ -715,9 +708,6 @@ #define BINDNEXT 2 /* next arg " (define-key) */ #define BINDDO 3 /* already found key to bind */ #define BINDEXT 1 /* space for trailing \0 */ -#else /* FKEYS */ -#define BINDEXT 0 -#endif /* FKEYS */ lp = NULL; @@ -754,7 +744,6 @@ ewprintf("Unknown function: %s", funcp); return (FALSE); } -#ifdef FKEYS if (fp == bindtokey || fp == unbindtokey) { bind = BINDARG; curmap = fundamental_map; @@ -765,7 +754,6 @@ bind = BINDNEXT; else bind = BINDNO; -#endif /* FKEYS */ /* Pack away all the args now... */ if ((np = lalloc(0)) == FALSE) return (FALSE); @@ -784,28 +772,22 @@ goto cleanup; } bcopy(argp, ltext(lp), (int)(line - argp)); -#ifdef FKEYS /* don't count BINDEXT */ lp->l_used--; if (bind == BINDARG) bind = BINDNO; -#endif /* FKEYS */ } else { /* quoted strings are special */ ++argp; -#ifdef FKEYS if (bind != BINDARG) { -#endif /* FKEYS */ lp = lalloc((int)(line - argp) + BINDEXT); if (lp == NULL) { status = FALSE; goto cleanup; } lp->l_used = 0; -#ifdef FKEYS } else key.k_count = 0; -#endif /* FKEYS */ while (*argp != '"' && *argp != '\0') { if (*argp != '\\') c = *argp++; @@ -857,7 +839,6 @@ } } break; -#ifdef FKEYS case 'f': case 'F': c = *++argp - '0'; @@ -867,24 +848,20 @@ } c += KFIRST; break; -#endif /* FKEYS */ default: c = CHARMASK(*argp); break; } argp++; } -#ifdef FKEYS if (bind == BINDARG) key.k_chars[key.k_count++] = c; else -#endif /* FKEYS */ lp->l_text[lp->l_used++] = c; } if (*line) line++; } -#ifdef FKEYS switch (bind) { case BINDARG: bind = BINDDO; @@ -902,16 +879,12 @@ bind = BINDARG; break; default: -#endif /* FKEYS */ lp->l_fp = np->l_fp; lp->l_bp = np; np->l_fp = lp; np = lp; -#ifdef FKEYS } -#endif /* FKEYS */ } -#ifdef FKEYS switch (bind) { default: dobeep(); @@ -928,14 +901,11 @@ key.k_count); break; case BINDNO: -#endif /* FKEYS */ inmacro = TRUE; maclcur = maclcur->l_fp; status = (*fp)(f, n); inmacro = FALSE; -#ifdef FKEYS } -#endif /* FKEYS */ cleanup: lp = maclcur->l_fp; while (lp != maclcur) {