From 5b121b514eb3593b3fc9268e241e72946f061783 Mon Sep 17 00:00:00 2001 From: Kjell Wooding Date: Thu, 21 Dec 2006 18:06:03 +0000 Subject: Eliminate BSMAP #ifdef (we didn't define it). This exposes bsmap-mode, which swaps ^H and DEL. ok jason@ --- usr.bin/mg/funmap.c | 4 +--- usr.bin/mg/kbd.c | 13 ++++++------- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'usr.bin') 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 . 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; -- cgit v1.2.3