-/* $OpenBSD: cmds.c,v 1.74 2015/01/30 04:45:45 tedu Exp $ */
+/* $OpenBSD: cmds.c,v 1.75 2015/10/18 03:04:11 mmcc Exp $ */
/* $NetBSD: cmds.c,v 1.27 1997/08/18 10:20:15 lukem Exp $ */
/*
if (mflag && confirm(argv[0], cp)) {
tp = cp;
if (mcase) {
- while (*tp && !islower(*tp)) {
+ while (*tp && !islower((unsigned char)*tp)) {
tp++;
}
if (!*tp) {
tp = cp;
tp2 = tmpbuf;
while ((*tp2 = *tp) != '\0') {
- if (isupper(*tp2)) {
+ if (isupper((unsigned char)*tp2)) {
*tp2 =
- tolower(*tp2);
+ tolower((unsigned char)*tp2);
}
tp++;
tp2++;
-/* $OpenBSD: complete.c,v 1.28 2015/01/16 06:40:08 deraadt Exp $ */
+/* $OpenBSD: complete.c,v 1.29 2015/10/18 03:04:11 mmcc Exp $ */
/* $NetBSD: complete.c,v 1.10 1997/08/18 10:20:18 lukem Exp $ */
/*-
/* check for 'continuation' completes (which are uppercase) */
if ((cursor_argc > celems) && (celems > 0)
- && isupper(c->c_complete[celems-1]))
+ && isupper((unsigned char)c->c_complete[celems - 1]))
cursor_argc = celems;
if (cursor_argc > celems)
-/* $OpenBSD: domacro.c,v 1.17 2009/05/05 19:35:30 martynas Exp $ */
+/* $OpenBSD: domacro.c,v 1.18 2015/10/18 03:04:11 mmcc Exp $ */
/* $NetBSD: domacro.c,v 1.10 1997/07/20 09:45:45 lukem Exp $ */
/*
TOP:
cp1 = macros[i].mac_start;
while (cp1 != macros[i].mac_end) {
- while (isspace(*cp1)) {
+ while (isspace((unsigned char)*cp1)) {
cp1++;
}
cp2 = line;
*cp2++ = *++cp1;
break;
case '$':
- if (isdigit(*(cp1+1))) {
+ if (isdigit((unsigned char)*(cp1 + 1))) {
j = 0;
- while (isdigit(*++cp1)) {
+ while (isdigit((unsigned char)*++cp1)) {
j = 10*j + *cp1 - '0';
}
cp1--;
-/* $OpenBSD: small.c,v 1.4 2015/01/30 04:45:45 tedu Exp $ */
+/* $OpenBSD: small.c,v 1.5 2015/10/18 03:04:11 mmcc Exp $ */
/* $NetBSD: cmds.c,v 1.27 1997/08/18 10:20:15 lukem Exp $ */
/*
if (loc && mcase) {
char *tp = argv[1], *tp2, tmpbuf[PATH_MAX];
- while (*tp && !islower(*tp)) {
+ while (*tp && !islower((unsigned char)*tp)) {
tp++;
}
if (!*tp) {
tp = argv[2];
tp2 = tmpbuf;
while ((*tp2 = *tp) != '\0') {
- if (isupper(*tp2)) {
- *tp2 = tolower(*tp2);
+ if (isupper((unsigned char)*tp2)) {
+ *tp2 = tolower((unsigned char)*tp2);
}
tp++;
tp2++;
break;
case '[':
LOOP:
- if (*++cp2 == '$' && isdigit(*(cp2+1))) {
+ if (*++cp2 == '$' && isdigit((unsigned char)*(cp2 + 1))) {
if (*++cp2 == '0') {
char *cp3 = name;
cp2++;
}
else if (*cp2 == '$' &&
- isdigit(*(cp2+1))) {
+ isdigit((unsigned char)*(cp2 + 1))) {
if (*++cp2 == '0') {
char *cp3 = name;
}
break;
case '$':
- if (isdigit(*(cp2 + 1))) {
+ if (isdigit((unsigned char)*(cp2 + 1))) {
if (*++cp2 == '0') {
char *cp3 = name;
-/* $OpenBSD: util.c,v 1.72 2015/03/17 19:31:30 millert Exp $ */
+/* $OpenBSD: util.c,v 1.73 2015/10/18 03:04:11 mmcc Exp $ */
/* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */
/*-
(void)fflush(ttyout);
if (fgets(str, sizeof(str), stdin) == NULL)
goto quit;
- switch (tolower(*str)) {
+ switch (tolower((unsigned char)*str)) {
case '?':
fprintf(ttyout,
"? help\n"
if (cp != NULL) {
cp++;
size = strtoq(cp, &ep, 10);
- if (*ep != '\0' && !isspace(*ep))
+ if (*ep != '\0' && !isspace((unsigned char)*ep))
size = -1;
}
} else if (noisy
char *timestr = reply_string;
/* Repair `19%02d' bug on server side */
- while (!isspace(*timestr))
+ while (!isspace((unsigned char)*timestr))
timestr++;
- while (isspace(*timestr))
+ while (isspace((unsigned char)*timestr))
timestr++;
if (strncmp(timestr, "191", 3) == 0) {
fprintf(ttyout,