From: Eric S. Raymond Date: Thu, 21 Oct 2010 23:21:57 +0000 (-0400) Subject: Consistency fix. X-Git-Tag: 1.5~5 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=148f94cabdb7d1cff18ed9b91ec1be07fb52eebe;p=showkey.git Consistency fix. --- diff --git a/showkey.c b/showkey.c index d6aa4d4..9de84d7 100644 --- a/showkey.c +++ b/showkey.c @@ -35,7 +35,7 @@ THE SOFTWARE.

#include #include -#define META 0x80 +#define ALT 0x80 #define ESC 0x1b static char *lowchars[] = @@ -57,18 +57,18 @@ static void catcher(const int sig) char *visualize(int c) { static char buf[32]; - int meta; + int alt; - if (meta = (c & META)) - c &=~ META; + if (alt = (c & ALT)) + c &=~ ALT; if (c <= ' ') (void) snprintf(buf, sizeof(buf), - "<%s%s>", meta ? "ALT-" : "", lowchars[c]); + "<%s%s>", alt ? "ALT-" : "", lowchars[c]); else if (c == 0x3F) (void) snprintf(buf, sizeof(buf), - "<%sDEL>", meta ? "ALT-" : ""); - else if (meta) + "<%sDEL>", alt ? "ALT-" : ""); + else if (alt) (void) snprintf(buf, sizeof(buf), "", c); else {