diff options
| author | dsl <dsl@NetBSD.org> | 2004-11-05 20:45:48 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2004-11-05 20:45:48 +0000 |
| commit | c68edd41b3096be2bf32ea4de03be257b9dbc4c0 (patch) | |
| tree | 734526c8de6083ce7c882da64ac5e881bf950613 /usr.bin/msgc | |
| parent | 0e378e47725fdda1c1cef14907fdc0538ff491f2 (diff) | |
Add (unsigned char) cast to ctype functions
Fixes problems displaying German 'sharp-s', see PR install/27281
Diffstat (limited to 'usr.bin/msgc')
| -rw-r--r-- | usr.bin/msgc/msg_sys.def | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/msgc/msg_sys.def b/usr.bin/msgc/msg_sys.def index 8bc90eeae25..f5b6d5b2d62 100644 --- a/usr.bin/msgc/msg_sys.def +++ b/usr.bin/msgc/msg_sys.def @@ -1,4 +1,4 @@ -/* $NetBSD: msg_sys.def,v 1.30 2004/10/16 12:49:14 dsl Exp $ */ +/* $NetBSD: msg_sys.def,v 1.31 2004/11/05 20:45:48 dsl Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -187,10 +187,10 @@ _msg_vprintf(int auto_fill, const char *fmt, va_list ap) for (wstart = afterw = cbuffer; *wstart; wstart = afterw) { /* eat one space, or a whole word of non-spaces */ - if (isspace(*afterw)) + if (isspace((unsigned char)*afterw)) afterw++; else - while (*afterw && !isspace(*afterw)) + while (*afterw && !isspace((unsigned char)*afterw)) afterw++; /* this is an nl: special formatting necessary */ @@ -235,7 +235,7 @@ _msg_vprintf(int auto_fill, const char *fmt, va_list ap) /* this is a space: ignore it but set flags */ last_i_was_nl = 0; /* all newlines handled above */ - last_i_was_space = isspace(*wstart); + last_i_was_space = isspace((unsigned char)*wstart); if (last_i_was_space) continue; @@ -399,9 +399,9 @@ _msg_vprompt(const char *fmt, int flags, const char *def, char *val, * the 'word' aren't killed. */ npos = pos; - while (npos > 0 && isspace(ibuf[npos - 1])) + while (npos > 0 && isspace((unsigned char)ibuf[npos - 1])) npos--; - while (npos > 0 && !isspace(ibuf[npos - 1])) + while (npos > 0 && !isspace((unsigned char)ibuf[npos - 1])) npos--; memmove(ibuf + npos, ibuf + pos, len - pos); len -= pos - npos; |
