if (n > sizeof prog - 1)
n = sizeof prog - 1;
for (q = prog, i = 0; i < n; i++, p++)
- *q++ = isupper(*p) ? tolower(*p) : *p;
+ *q++ = tolower((unsigned char)*p);
*q = '\0';
return prog;
}
if (q != NULL) {
for (q++; *q != '\0'; q++) {
- if (!isdigit(*q))
+ if (!isdigit((unsigned char)*q))
return 1;
}
}
((ch >= 'a') && (ch <= 'z')) ||
(ch == '-') || (ch == '.') || (ch == '='))
#else
- while (isalnum(ch) || (ch == '-') || (ch == '.') || (ch == '='))
+ while (isalnum((unsigned char)ch) || (ch == '-') || (ch == '.')
+ || (ch == '='))
#endif
{
ch = *(++l);
for ( ; *in != '\0'; in++) {
char c = *in;
- if (!isdigit(c))
+ if (!isdigit((unsigned char)c))
return 0;
ret *= 10;
ret += (c - '0');
return -1;
}
*pr *= 10;
- if (!TEST_true(isdigit(*p))) {
+ if (!TEST_true(isdigit((unsigned char)*p))) {
TEST_error("Invalid character in string %s", value);
return -1;
}
if (l1 > 0) {
b1[n1 = l1 > width ? width : l1] = 0;
for (i = 0; i < n1; i++)
- b1[i] = isprint(m1[i]) ? m1[i] : '.';
+ b1[i] = isprint((unsigned char)m1[i]) ? m1[i] : '.';
}
if (l2 > 0) {
b2[n2 = l2 > width ? width : l2] = 0;
for (i = 0; i < n2; i++)
- b2[i] = isprint(m2[i]) ? m2[i] : '.';
+ b2[i] = isprint((unsigned char)m2[i]) ? m2[i] : '.';
}
diff = 0;
i = 0;
char *q;
/* Skip over leading spaces */
- while (*p && isspace(*p))
+ while (*p && isspace((unsigned char)*p))
p++;
if (!*p)
return NULL;
- for (q = p + strlen(p) - 1; q != p && isspace(*q); )
+ for (q = p + strlen(p) - 1; q != p && isspace((unsigned char)*q); )
*q-- = '\0';
return *p ? p : NULL;
}