diff --git a/bind.c b/bind.c index 32781c8..bd5c2a6 100644 --- a/bind.c +++ b/bind.c @@ -81,7 +81,9 @@ int deskey(int f, int n) /* get the command sequence to describe change it to something we can print as well */ - cmdstr(c = getckey(FALSE), &outseq[0]); + c = getckey( FALSE) ; + mlwrite( ": describe-key 0x%x, ", c) ; + cmdstr( c, &outseq[ 0]) ; /* and dump it out */ ostring(outseq); diff --git a/display.c b/display.c index 62f939b..8f007b8 100644 --- a/display.c +++ b/display.c @@ -1456,19 +1456,22 @@ static void mlputs( char *s) { */ static void mlputi( int i, int r) { int q ; + unsigned u ; static char hexdigits[] = "0123456789ABCDEF" ; - if( i < 0) { - i = -i ; + if( r == 16 || i >= 0) + u = i ; + else { + u = -i ; mlputc( '-') ; } - q = i / r ; + q = u / r ; if( q != 0) mlputi( q, r) ; - mlputc( hexdigits[ i % r]) ; + mlputc( hexdigits[ u % r]) ; } /* diff --git a/input.c b/input.c index 6e6c45d..1f0c64a 100644 --- a/input.c +++ b/input.c @@ -737,9 +737,9 @@ void outstring(char *s) * * char *s; string to output */ -void ostring(char *s) +void ostring( char *s) { if (discmd) while (*s) - TTputc(*s++); + TTputc( *s++ & 0xFF) ; }