(journal_entry): Add unsigned char cast to isprint() call.

(parse): Add unsigned char cast to isspace() call.
Portability bug fix for WIN32.
This commit is contained in:
Ron Koenderink 2007-03-10 18:12:29 +00:00
parent c97d79c0ee
commit 856dcb7c5c
2 changed files with 3 additions and 3 deletions

View file

@ -85,7 +85,7 @@ journal_entry(char *fmt, ...)
va_end(ap);
for (i = n; buf[i]; ++i) {
if (!isprint(buf[i]))
if (!isprint((unsigned char)buf[i]))
buf[i] = '?'; /* FIXME replace by escape */
}
buf[i++] = '\n';

View file

@ -64,7 +64,7 @@ parse(char *buf, char **arg, char **condp, char *space, char **redir)
if (condp != NULL)
*condp = NULL;
for (argnum = 0; *buf && argnum < 127;) {
while (isspace(*buf))
while (isspace((unsigned char)*buf))
buf++;
if (!*buf)
break;
@ -74,7 +74,7 @@ parse(char *buf, char **arg, char **condp, char *space, char **redir)
}
quoted = 0;
for (bp2 = bp1; *buf;) {
if (!quoted && isspace(*buf)) {
if (!quoted && isspace((unsigned char)*buf)) {
buf++;
break;
}