mirror of
https://github.com/rfivet/uemacs.git
synced 2025-11-23 11:41:15 -05:00
describe-key displays keycode in hexadecimal.
mlwrite assume parameter is unsigned int when doing %x format. ostring output bytes > 0x7F as unsigned char.
This commit is contained in:
11
display.c
11
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]) ;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user