summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-12-28 16:31:23 +0000
committerache <ache@FreeBSD.org>1995-12-28 16:31:23 +0000
commita1a68e9a51e2ba172fb998a1ed5b577b8b6c2673 (patch)
treea3ef209a0f715519f8b0d6728cff50293ba4d522 /usr.bin
parent985b2705b5819a93a05cfc48833a6187683fb16b (diff)
downloadFreeBSD-src-a1a68e9a51e2ba172fb998a1ed5b577b8b6c2673.zip
FreeBSD-src-a1a68e9a51e2ba172fb998a1ed5b577b8b6c2673.tar.gz
Use more complicated printable test to remove unnecessary 8bit chars
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/strings/strings.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/strings/strings.c b/usr.bin/strings/strings.c
index af33b5e..8878420 100644
--- a/usr.bin/strings/strings.c
+++ b/usr.bin/strings/strings.c
@@ -54,7 +54,9 @@ static char sccsid[] = "@(#)strings.c 8.2 (Berkeley) 1/28/94";
#include <unistd.h>
#define DEF_LEN 4 /* default minimum string length */
-#define ISSTR(ch) (isalnum(ch) || ispunct(ch) || isascii(ch) && isprint(ch) || ch == '\t')
+#define ISSTR(ch) (isalnum(ch) || ispunct(ch) || \
+ isspace(ch) && (!iscntrl(ch) || ch == '\t') || \
+ isascii(ch) && isprint(ch))
typedef struct exec EXEC; /* struct exec cast */
OpenPOWER on IntegriCloud