ado@elsie.UUCP (Arthur David Olson) (09/15/84)
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)