26 lines
769 B
Plaintext
26 lines
769 B
Plaintext
$NetBSD: patch-ad,v 1.4 2014/07/07 18:06:58 jperkin Exp $
|
|
|
|
- use toupper() correctly
|
|
- suppress initialization warning that sometimes (?) arises with gcc 4.5
|
|
- include limits.h for INT_{MIN,MAX}
|
|
|
|
--- extend.c.orig 2011-06-18 09:18:54.000000000 +0000
|
|
+++ extend.c
|
|
@@ -12,6 +12,7 @@
|
|
|
|
#include <sys/types.h>
|
|
#include <ctype.h>
|
|
+#include <limits.h>
|
|
|
|
#ifndef NO_MACRO
|
|
#include "macro.h"
|
|
@@ -445,7 +446,7 @@ dobindkey(KEYMAP *map, const char *func,
|
|
for (i = 0; *str && i < MAXKEY; i++) {
|
|
/* XXX - convert numbers w/ strol()? */
|
|
if (*str == '^' && *(str + 1) != '\0') {
|
|
- key.k_chars[i] = CCHR(toupper(*++str));
|
|
+ key.k_chars[i] = CCHR(toupper((unsigned char)*++str));
|
|
} else if (*str == '\\' && *(str + 1) != '\0') {
|
|
switch (*++str) {
|
|
case '^':
|