summaryrefslogtreecommitdiffstats
path: root/usr.bin/cut
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-03-21 00:26:32 +0000
committerache <ache@FreeBSD.org>1995-03-21 00:26:32 +0000
commit5955de08b086f13d6dce7a1df5591874b85353e0 (patch)
treebd528dc42688a5fe1bfa995fd7e5f1cf402e351c /usr.bin/cut
parentc9e5cb697a11e29fffb95a6f6368d1b97dad0a01 (diff)
downloadFreeBSD-src-5955de08b086f13d6dce7a1df5591874b85353e0.zip
FreeBSD-src-5955de08b086f13d6dce7a1df5591874b85353e0.tar.gz
Fix wrong separator output
Submitted by: julian Obtained from: newsgroup?
Diffstat (limited to 'usr.bin/cut')
-rw-r--r--usr.bin/cut/cut.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/cut/cut.c b/usr.bin/cut/cut.c
index 25ffdd3..2c887ff 100644
--- a/usr.bin/cut/cut.c
+++ b/usr.bin/cut/cut.c
@@ -218,7 +218,8 @@ f_cut(fp, fname)
int output;
char lbuf[_POSIX2_LINE_MAX + 1];
- for (sep = dchar, output = 0; fgets(lbuf, sizeof(lbuf), fp);) {
+ for (sep = dchar; fgets(lbuf, sizeof(lbuf), fp);) {
+ output = 0;
for (isdelim = 0, p = lbuf;; ++p) {
if (!(ch = *p))
err("%s: line too long.\n", fname);
OpenPOWER on IntegriCloud