summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1999-12-30 18:00:43 +0000
committerNiels Provos <provos@cvs.openbsd.org>1999-12-30 18:00:43 +0000
commitd042358131e2c7d91a210c2130f757b04476c1d3 (patch)
treef6ac0582cf3bed725ee3f21ad952acd9ff0bde65 /usr.bin
parent15d0188f4a2f00b037e80c578673ab1afb69cff8 (diff)
dont strip off international characters; fixes pr/1020
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/fmt/fmt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/fmt/fmt.c b/usr.bin/fmt/fmt.c
index 64531f4e9ba..408376ef1b8 100644
--- a/usr.bin/fmt/fmt.c
+++ b/usr.bin/fmt/fmt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fmt.c,v 1.14 1999/12/15 05:34:33 deraadt Exp $ */
+/* $OpenBSD: fmt.c,v 1.15 1999/12/30 18:00:42 provos Exp $ */
/* Sensible version of fmt
*
@@ -168,7 +168,7 @@
#ifndef lint
static const char rcsid[] =
- "$OpenBSD: fmt.c,v 1.14 1999/12/15 05:34:33 deraadt Exp $";
+ "$OpenBSD: fmt.c,v 1.15 1999/12/30 18:00:42 provos Exp $";
static const char copyright[] =
"Copyright (c) 1997 Gareth McCaughan. All rights reserved.\n";
#endif /* not lint */
@@ -604,7 +604,7 @@ get_line(FILE *stream, size_t *lengthp) {
if (buf==NULL) { length=100; buf=XMALLOC(length); }
while ((ch=getc(stream)) != '\n' && ch != EOF) {
if (ch==' ') ++spaces_pending;
- else if (isprint(ch)) {
+ else if (!iscntrl(ch)) {
while (len+spaces_pending >= length) {
length*=2; buf=xrealloc(buf, length);
}