Fixed wrong use of the <ctype.h> functions by adding (unsigned char) casts.
This commit is contained in:
parent
cb5d6856d5
commit
42627098be
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: edit.c,v 1.14 2004/07/07 19:20:09 mycroft Exp $ */
|
||||
/* $NetBSD: edit.c,v 1.15 2005/05/23 08:03:25 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Command line editing - common code
|
||||
@ -7,7 +7,7 @@
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: edit.c,v 1.14 2004/07/07 19:20:09 mycroft Exp $");
|
||||
__RCSID("$NetBSD: edit.c,v 1.15 2005/05/23 08:03:25 rillig Exp $");
|
||||
#endif
|
||||
|
||||
|
||||
@ -907,7 +907,8 @@ x_longest_prefix(nwords, words)
|
||||
prefix_len = strlen(words[0]);
|
||||
for (i = 1; i < nwords; i++)
|
||||
for (j = 0, p = words[i]; j < prefix_len; j++)
|
||||
if (FILECHCONV(p[j]) != FILECHCONV(words[0][j])) {
|
||||
if (FILECHCONV((unsigned char)p[j])
|
||||
!= FILECHCONV((unsigned char)words[0][j])) {
|
||||
prefix_len = j;
|
||||
break;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: emacs.c,v 1.27 2005/02/11 06:21:21 simonb Exp $ */
|
||||
/* $NetBSD: emacs.c,v 1.28 2005/05/23 08:03:25 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Emacs-like command line editing and history
|
||||
@ -10,7 +10,7 @@
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: emacs.c,v 1.27 2005/02/11 06:21:21 simonb Exp $");
|
||||
__RCSID("$NetBSD: emacs.c,v 1.28 2005/05/23 08:03:25 rillig Exp $");
|
||||
#endif
|
||||
|
||||
|
||||
@ -1908,7 +1908,7 @@ x_e_getc()
|
||||
unget_char = -1;
|
||||
} else {
|
||||
if (macroptr) {
|
||||
c = *macroptr++;
|
||||
c = (unsigned char) *macroptr++;
|
||||
if (!*macroptr)
|
||||
macroptr = (char *) 0;
|
||||
} else
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* $NetBSD: var.c,v 1.10 2004/10/28 20:15:37 dsl Exp $ */
|
||||
/* $NetBSD: var.c,v 1.11 2005/05/23 08:03:25 rillig Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: var.c,v 1.10 2004/10/28 20:15:37 dsl Exp $");
|
||||
__RCSID("$NetBSD: var.c,v 1.11 2005/05/23 08:03:25 rillig Exp $");
|
||||
#endif
|
||||
|
||||
|
||||
@ -451,7 +451,7 @@ getint(vp, nump)
|
||||
base = 10;
|
||||
num = 0;
|
||||
neg = 0;
|
||||
for (c = *s++; c ; c = *s++) {
|
||||
for (c = (unsigned char)*s++; c ; c = (unsigned char)*s++) {
|
||||
if (c == '-') {
|
||||
neg++;
|
||||
} else if (c == '#') {
|
||||
|
Loading…
Reference in New Issue
Block a user