Date: Sat, 27 Jul 1996 12:42:09 +0200 (MET DST) From: J Wunsch <j@uriah.heep.sax.de> To: freebsd-current@FreeBSD.org (FreeBSD-current users) Cc: dev@fgate.flevel.co.uk (Developer) Subject: Re: Termcap problems Message-ID: <199607271042.MAA29822@uriah.heep.sax.de> In-Reply-To: <Pine.BSI.3.93.960726091520.12815A-100000@fgate.flevel.co.uk> from Developer at "Jul 26, 96 09:16:17 am"
next in thread | previous in thread | raw e-mail | index | archive | help
As Developer wrote: > > Perhaps a miscalculation that only hits in some special case. I bet > > if you turn off the -F, it will look normally. > > > > You could have a look into the column number calculation, and file a > > PR once you've got a fix. :-)) > > I see - you think the bug might be in ls? The strange thing is if I put on > an old termcap from FreeBSD2.0 release I don`t get this problem. It doesn't even remotely touch TERMCAP, it's not linked against -ltermcap either. The variable `termwidth' is set in ls.c, basically the tty's window size gets precedence if output is a tty, otherwise if COLUMNS is set this one is used, otherwise it falls back to assuming 80 columns. The logic with considering COLUMNS even for non-tty's wasn't always there, it is so you can say something like: env COLUMNS=132 ls -CF | lpr -Psome-wide-printer The actual output formatting happens inside print.c. Simply run it through a debugger and have a close look at the few variables that affect formatting. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607271042.MAA29822>