diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2006-12-21 18:06:03 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2006-12-21 18:06:03 +0000 |
commit | 5b121b514eb3593b3fc9268e241e72946f061783 (patch) | |
tree | 957b334db759043cc910c67b32f473dbd373d667 /usr.bin | |
parent | a8f56963b7fda33484acc4726c3f378751726d64 (diff) |
Eliminate BSMAP #ifdef (we didn't define it). This exposes bsmap-mode,
which swaps ^H and DEL.
ok jason@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mg/funmap.c | 4 | ||||
-rw-r--r-- | usr.bin/mg/kbd.c | 13 |
2 files changed, 7 insertions, 10 deletions
diff --git a/usr.bin/mg/funmap.c b/usr.bin/mg/funmap.c index 17aa08e18c6..df46ed3fdad 100644 --- a/usr.bin/mg/funmap.c +++ b/usr.bin/mg/funmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: funmap.c,v 1.25 2006/12/16 17:00:03 kjell Exp $ */ +/* $OpenBSD: funmap.c,v 1.26 2006/12/21 18:06:02 kjell Exp $ */ /* * Copyright (c) 2001 Artur Grabowski <art@openbsd.org>. All rights reserved. * @@ -54,9 +54,7 @@ static struct funmap functnames[] = { {gotobol, "beginning-of-line",}, {blinkparen, "blink-matching-paren",}, {showmatch, "blink-matching-paren-hack",}, -#ifdef BSMAP {bsmap, "bsmap-mode",}, -#endif /* BSMAP */ {NULL, "c-x 4 prefix",}, {NULL, "c-x prefix",}, #ifndef NO_MACRO diff --git a/usr.bin/mg/kbd.c b/usr.bin/mg/kbd.c index 929038ae1a8..0d75c1c68b5 100644 --- a/usr.bin/mg/kbd.c +++ b/usr.bin/mg/kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kbd.c,v 1.22 2006/04/03 02:43:22 kjell Exp $ */ +/* $OpenBSD: kbd.c,v 1.23 2006/12/21 18:06:02 kjell Exp $ */ /* This file is in the public domain. */ @@ -45,8 +45,8 @@ do_meta(int f, int n) return (TRUE); } -#ifdef BSMAP -static int bs_map = BSMAP; +static int bs_map = 0; + /* * Toggle backspace mapping */ @@ -60,7 +60,6 @@ bsmap(int f, int n) ewprintf("Backspace mapping %sabled", bs_map ? "en" : "dis"); return (TRUE); } -#endif /* BSMAP */ void ungetkey(int c) @@ -95,13 +94,13 @@ getkey(int flag) pushed = FALSE; } else c = ttgetc(); -#ifdef BSMAP - if (bs_map) + + if (bs_map) { if (c == CCHR('H')) c = CCHR('?'); else if (c == CCHR('?')) c = CCHR('H'); -#endif /* BSMAP */ + } if (use_metakey && (c & METABIT)) { pushedc = c & ~METABIT; pushed = TRUE; |