NetBSD Problem Report #14956

Received: (qmail 7611 invoked from network); 15 Dec 2001 09:04:38 -0000
Message-Id: <200112150904.fBF94Rt18372@ged.plethora.net>
Date: Sat, 15 Dec 2001 03:04:27 -0600 (CST)
From: seebs <seebs@ged.plethora.net>
Reply-To: seebs@ged.plethora.net
To: gnats-bugs@gnats.netbsd.org
Subject: top gratuitously cuts lines
X-Send-Pr-Version: 3.95

>Number:         14956
>Category:       bin
>Synopsis:       top cuts some lines to 80 characters
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 15 09:05:00 +0000 2001
>Closed-Date:    
>Last-Modified:  
>Originator:     seebs
>Release:        NetBSD 1.5Z
>Organization:
>Environment:
System: NetBSD ged.plethora.net 1.5Z NetBSD 1.5Z (GED) #0: Fri Nov 30 14:33:36 CST 2001 seebs@ged.plethora.net:/usr/src/sys/arch/i386/compile/GED i386
Architecture: i386
Machine: i386
>Description:
	On an 88-column screen, top is still trimming status lines at 80 chars.
	So, it confirms that screen_width is 87, and the clock in the upper right
	is in the right place, but the actual lines in the main display are all
	truncated early.

	This appears to be a result of a static format string.
>How-To-Repeat:
	Run top in an 88-column display.
>Fix:
	This is incorrect, but will work as long as no display has fewer than 67
	characters.  :)  It's at least a framework for a "real" solution.

*** m_netbsd15.c.orig	Sat Dec 15 03:01:31 2001
--- m_netbsd15.c	Sat Dec 15 03:02:19 2001
***************
*** 92,94 ****
  #define Proc_format \
! 	"%5d %-8.8s %3d %4d%7s %5s %-8.8s%7s %5.2f%% %5.2f%% %.12s"

--- 92,94 ----
  #define Proc_format \
! 	"%5d %-8.8s %3d %4d%7s %5s %-8.8s%7s %5.2f%% %5.2f%% %.*s"

***************
*** 188,189 ****
--- 188,190 ----
  #define pagetok(size) ((size) << pageshift)
+ extern int screen_width;

***************
*** 527,528 ****
--- 528,530 ----
  	    100.0 * pct,
+ 	    screen_width - 67,
  	    printable(pp->p_comm));
>Release-Note:
>Audit-Trail:
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.