Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site elsie.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!hplabs!hao!seismo!umcp-cs!cvl!elsie!ado
From: ado@elsie.UUCP (Arthur David Olson)
Newsgroups: net.bugs.4bsd
Subject: Bug in 4.1bsd "ls" (already fixed in 4.2) (with 4.1 fix) (reposting)
Message-ID: <1213@elsie.UUCP>
Date: Fri, 14-Sep-84 19:01:29 EDT
Article-I.D.: elsie.1213
Posted: Fri Sep 14 19:01:29 1984
Date-Received: Tue, 25-Sep-84 02:30:53 EDT
Organization: NIH-LEC, Bethesda, MD
Lines: 32

Subject--	/usr/src/cmd/ls/ucbls.c

Challenge--	"ls" sometimes does columnar output incorrectly.

Example--	On an eighty-column terminal,

		mkdir dummy
		cd dummy
		tee a b c dddddddd e ff < /dev/null
		ls a b c dddddddd e ff

		and note that an eighty-one character long line is produced.
		Be sure to
		cd ..
		rm -f -r dummy

Solution--	ed /usr/src/cmd/ls/ucbls.c
		/colwidth = fixedwidth + filewidth/a
		#ifndef OLDVERSION
			if (tabflg)
				if (colwidth <= 9)
					colwidth = 8;
				else if (colwidth <= 17)
					colwidth = 16;
		#endif
		.
		w
		q
--
	...decvax!seismo!umcp-cs!elsie!ado	(301) 496-5688
	(DEC, VAX and Elsie are Digital Equipment Corp. and Borden's trademarks)
	(We're your gateway to Montgomery County, MD--where bureaucrats live)