boolean plural = (reason[strlen(reason) - 1] == 's') ? 1 : 0;
/* avoid "The" Orcus's sting was poisoned... */
- pline("%s%s %s poisoned!", isupper(*reason) ? "" : "The ", reason,
+ pline("%s%s %s poisoned!",
+ isupper((uchar) *reason) ? "" : "The ", reason,
plural ? "were" : "was");
}
if (Poison_resistance) {
* whitespace, do not change the value of SAVEF.
*/
for (bp = buf; *bp; bp++)
- if (!isspace(*bp)) {
+ if (!isspace((uchar) *bp)) {
strncpy(SAVEF, bp, PATHLEN);
break;
}
if (vk == 0xBF)
ch = M('?');
else
- ch = M(tolower(keycode));
+ ch = M(tolower((uchar) keycode));
}
if (ch == '\r')
ch = '\n';
if (vk == 0xBF)
ch = M('?');
else
- ch = M(tolower(keycode));
+ ch = M(tolower((uchar) keycode));
}
/* Attempt to work better with international keyboards. */
else {
if (vk == 0xBF)
ch = M('?');
else
- ch = M(tolower(keycode));
+ ch = M(tolower((uchar) keycode));
} else if (ch < 32 && !isnumkeypad(scan)) {
/* Control code; ReadConsole seems to filter some of these,
* including ESC */
char *ptr;
char drive;
if ((ptr = index(str, ':')) != (char *) 0) {
- drive = toupper(*(ptr - 1));
+ drive = toupper((uchar) *(ptr - 1));
_chdrive((drive - 'A') + 1);
}
}
{
struct grep_var *rv;
- while (*id && isspace(*id))
+ while (*id && isspace((uchar) *id))
id++;
if (!*id) {
Fprintf(stderr, "missing identifier in line %d", grep_lineno);
int isif = 1;
char *buf0 = buf;
#if 1
- if (isspace(buf[0]))
+ if (isspace((uchar) buf[0]))
return &buf[-1]; /* XXX see docs above */
#else
- while (buf[0] && isspace(buf[0]))
+ while (buf[0] && isspace((uchar) buf[0]))
buf++;
#endif
switch (buf[0]) {
default: {
char str[10];
- if (isprint(buf[0])) {
+ if (isprint((uchar) buf[0])) {
str[0] = buf[0];
str[1] = '\0';
} else {
/* DICE again... it doesn't seem to eat whitespace after the } like
* it should, so we have to do so manually.
*/
- while ((*c = fgetc(txtfile)) != EOF && isspace(*c))
+ while ((*c = fgetc(txtfile)) != EOF && isspace((uchar) *c))
;
ungetc(*c, txtfile);
#endif
}
}
- if (isdigit(ch)) {
+ if (isdigit((uchar) ch)) {
int count;
i = ListView_GetNextItem(hwndList, -1, LVNI_FOCUSED);
if (i >= 0) {
/* check if the string is empty */
for (p = data->window_text[MSG_LINES - 1].text;
- *p && isspace(*p); p++)
+ *p && isspace((uchar) *p); p++)
;
if (*p) {
(WPARAM) MSNH_MSG_CARET, (LPARAM) &createcaret);
/* display selection in the message window */
- if (isprint(ch) && ch != '#') {
+ if (isprint((uchar) ch) && ch != '#') {
res_ch[0] = ch;
res_ch[1] = '\x0';
mswin_putstr_ex(WIN_MESSAGE, ATR_BOLD, res_ch, 1);
if (next_message)
next_message++;
if (p)
- while (p >= retval && isspace(*p))
+ while (p >= retval && isspace((uchar) *p))
*p-- = (char) 0; /* delete trailing whitespace */
return retval;
}
if (strlen(++colorstring) != 6)
return;
- red_value = (int) (index(hexadecimals, tolower(*colorstring++))
+ red_value = (int) (index(hexadecimals, tolower((uchar) *colorstring))
- hexadecimals);
+ ++colorstring;
red_value *= 16;
- red_value += (int) (index(hexadecimals, tolower(*colorstring++))
+ red_value += (int) (index(hexadecimals, tolower((uchar) *colorstring))
- hexadecimals);
+ ++colorstring;
- green_value = (int) (index(hexadecimals, tolower(*colorstring++))
+ green_value = (int) (index(hexadecimals,
+ tolower((uchar) *colorstring))
- hexadecimals);
+ ++colorstring;
green_value *= 16;
- green_value += (int) (index(hexadecimals, tolower(*colorstring++))
+ green_value += (int) (index(hexadecimals,
+ tolower((uchar) *colorstring))
- hexadecimals);
+ ++colorstring;
- blue_value = (int) (index(hexadecimals, tolower(*colorstring++))
+ blue_value = (int) (index(hexadecimals, tolower((uchar) *colorstring))
- hexadecimals);
+ ++colorstring;
blue_value *= 16;
- blue_value += (int) (index(hexadecimals, tolower(*colorstring++))
+ blue_value += (int) (index(hexadecimals,
+ tolower((uchar) *colorstring))
- hexadecimals);
+ ++colorstring;
*colorptr = RGB(red_value, green_value, blue_value);
} else {