diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1997-09-15 00:17:38 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1997-09-15 00:17:38 +0000 |
commit | 07484d1f24bc1d323bb71b7e2a967ec02cd6f2cf (patch) | |
tree | c18cda2f5fddba8fe006ab9ab1222fcd9c08dbc0 /usr.bin/write | |
parent | 77caf2118fe24838df7171d737bb1be16614a9de (diff) | |
download | src-test-07484d1f24bc1d323bb71b7e2a967ec02cd6f2cf.tar.gz src-test-07484d1f24bc1d323bb71b7e2a967ec02cd6f2cf.zip |
Oops, fix upper controls test
Notes
Notes:
svn path=/head/; revision=29431
Diffstat (limited to 'usr.bin/write')
-rw-r--r-- | usr.bin/write/write.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/write/write.c b/usr.bin/write/write.c index 7d99c2c1eaf84..0fa94daeb843a 100644 --- a/usr.bin/write/write.c +++ b/usr.bin/write/write.c @@ -45,7 +45,7 @@ static const char copyright[] = static char sccsid[] = "@(#)write.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: write.c,v 1.7 1997/08/26 11:23:37 charnier Exp $"; + "$Id: write.c,v 1.8 1997/09/15 00:08:19 ache Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -310,7 +310,8 @@ wr_fputs(s) for (; *s != '\0'; ++s) { if (*s == '\n') { PUTC('\r'); - } else if (*s <= 0xA0 || /* disable upper controls */ + } else if (((*s & 0x80) && *s < 0xA0) || + /* disable upper controls */ (!isprint(*s) && !isspace(*s) && *s != '\007') ) { if (*s & 0x80) { |