version 1.37, 2016/04/25 17:05:53 |
version 1.38, 2016/05/26 14:49:48 |
|
|
{ |
{ |
static const char *other = "!#()+,-.0123456789:;<=>?'\r\t"; |
static const char *other = "!#()+,-.0123456789:;<=>?'\r\t"; |
key_code key; |
key_code key; |
u_short u; |
u_int u; |
int size; |
|
key_code modifiers; |
key_code modifiers; |
struct utf8_data ud; |
struct utf8_data ud; |
u_int i; |
u_int i; |
|
|
|
|
/* Is this a hexadecimal value? */ |
/* Is this a hexadecimal value? */ |
if (string[0] == '0' && string[1] == 'x') { |
if (string[0] == '0' && string[1] == 'x') { |
if (sscanf(string + 2, "%hx%n", &u, &size) != 1 || size > 4) |
if (sscanf(string + 2, "%x", &u) != 1) |
|
return (KEYC_UNKNOWN); |
|
if (u > 0x1fffff) |
return (KEYC_UNKNOWN); |
return (KEYC_UNKNOWN); |
return (u); |
return (u); |
} |
} |