(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:
parent
c97d79c0ee
commit
856dcb7c5c
2 changed files with 3 additions and 3 deletions
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue