svn commit: r330738 - in stable/11/bin/cat: . tests

Eitan Adler eadler at FreeBSD.org
Sat Mar 10 08:51:02 UTC 2018


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 <netbsd-tests.test.mk>
 
+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 <bsd.test.mk>


More information about the svn-src-all mailing list