diff options
author | Vincent Lefevre <vincent@vinc17.net> | 2003-07-24 18:40:50 +0000 |
---|---|---|
committer | Vincent Lefevre <vincent@vinc17.net> | 2003-07-24 18:40:50 +0000 |
commit | 553ef91d6b72bf403c608b81d00f5112bae6da46 (patch) | |
tree | 3e37980522ca3dff6edbf237a7cc4ef7c3378147 /keymap.c | |
parent | 8fe7e1b4e615dbbc655a96e292af24f045987282 (diff) |
Some functions/macros like isspace take an int and require the
argument to have the value of an unsigned char (or EOF). Under
Solaris, gcc complains when the argument is a char (as this is a
possible bug, on platforms where char is signed, like Solaris). The
attached patch fixes such problems (well, perhaps I've changed more
than necessary, but this doesn't hurt).
Diffstat (limited to 'keymap.c')
-rw-r--r-- | keymap.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -120,7 +120,10 @@ static int parse_fkey(char *s) */ static int parse_keycode (const char *s) { - if (isdigit (s[1]) && isdigit (s[2]) && isdigit (s[3]) && s[4] == '>') + if (isdigit ((unsigned char) s[1]) && + isdigit ((unsigned char) s[2]) && + isdigit ((unsigned char) s[3]) && + s[4] == '>') { return (s[3] - '0') + (s[2] - '0') * 8 + (s[1] - '0') * 64; } |