From owner-freebsd-current Sat Jul 27 04:45:19 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA03238 for current-outgoing; Sat, 27 Jul 1996 04:45:19 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id EAA03197 for ; Sat, 27 Jul 1996 04:45:12 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id NAA21520; Sat, 27 Jul 1996 13:44:43 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id NAA27411; Sat, 27 Jul 1996 13:44:43 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id MAA29822; Sat, 27 Jul 1996 12:42:09 +0200 (MET DST) From: J Wunsch Message-Id: <199607271042.MAA29822@uriah.heep.sax.de> Subject: Re: Termcap problems To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Sat, 27 Jul 1996 12:42:09 +0200 (MET DST) Cc: dev@fgate.flevel.co.uk (Developer) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: from Developer at "Jul 26, 96 09:16:17 am" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk 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. ;-)