From owner-svn-src-all@freebsd.org Sat Mar 10 08:51:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCB76F2DAA0; Sat, 10 Mar 2018 08:51:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F6B16A805; Sat, 10 Mar 2018 08:51:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A3963B11; Sat, 10 Mar 2018 08:51:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2A8p2tL070841; Sat, 10 Mar 2018 08:51:02 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2A8p284070839; Sat, 10 Mar 2018 08:51:02 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201803100851.w2A8p284070839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 10 Mar 2018 08:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r330738 - in stable/11/bin/cat: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in stable/11/bin/cat: . tests X-SVN-Commit-Revision: 330738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 08:51:02 -0000 Author: eadler Date: Sat Mar 10 08:51:02 2018 New Revision: 330738 URL: https://svnweb.freebsd.org/changeset/base/330738 Log: Revert MFC of r323865 While this behavior can be viewed as a bug fix, due to the fundamental nature of cat(1), leave this change only for a major version. PR: 210607 Requested by: sevan Modified: stable/11/bin/cat/cat.c stable/11/bin/cat/tests/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/cat/cat.c ============================================================================== --- stable/11/bin/cat/cat.c Sat Mar 10 04:17:01 2018 (r330737) +++ stable/11/bin/cat/cat.c Sat Mar 10 08:51:02 2018 (r330738) @@ -225,16 +225,10 @@ cook_cat(FILE *fp) } else gobble = 0; } - if (nflag) { - if (!bflag || ch != '\n') { - (void)fprintf(stdout, "%6d\t", ++line); - if (ferror(stdout)) - break; - } else if (eflag) { - (void)fprintf(stdout, "%6s\t", ""); - if (ferror(stdout)) - break; - } + if (nflag && (!bflag || ch != '\n')) { + (void)fprintf(stdout, "%6d\t", ++line); + if (ferror(stdout)) + break; } } if (ch == '\n') { Modified: stable/11/bin/cat/tests/Makefile ============================================================================== --- stable/11/bin/cat/tests/Makefile Sat Mar 10 04:17:01 2018 (r330737) +++ stable/11/bin/cat/tests/Makefile Sat Mar 10 08:51:02 2018 (r330738) @@ -17,4 +17,10 @@ ${PACKAGE}FILES+= d_vt_output.out .include +d_align.out: ${TESTSRC}/d_align.out + sed -E -e 's,^[[:space:]]{7}\$$$$,\$$,' < ${.ALLSRC} > ${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} + +CLEANFILES+= d_align.out d_align.out.tmp + .include