From owner-svn-src-head@freebsd.org Sat Jul 7 21:08:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5409102B311; Sat, 7 Jul 2018 21:08:51 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1ABFC8C43A; Sat, 7 Jul 2018 21:08:50 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id buRifmhEzbP3IbuRkfZW2E; Sat, 07 Jul 2018 15:08:49 -0600 X-Authority-Analysis: v=2.3 cv=P64UeBIu c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=R9QF1RCXAYgA:10 a=v3ZZPjhaAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=VZAjDpALnvreuzWOkZAA:9 a=wPNLvfGTeEIA:10 a=CSZHitJkNe4A:10 a=EZ7zVjnluhUA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 5BE81252; Sat, 7 Jul 2018 14:08:45 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w67L8inJ051395; Sat, 7 Jul 2018 14:08:44 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w67L8irC051381; Sat, 7 Jul 2018 14:08:44 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807072108.w67L8irC051381@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: =?utf-8?B?5b6M6Jek5aSn5Zyw?= cc: Hiroki Sato , daichi@FreeBSD.org, Eitan Adler , gnn@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336028 - head/usr.bin/top In-Reply-To: Message from =?utf-8?B?5b6M6Jek5aSn5Zyw?= of "Sat, 07 Jul 2018 20:39:33 +0900." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Sat, 07 Jul 2018 14:08:44 -0700 X-CMAE-Envelope: MS4wfHyjYPornxyo1mUOspVRBOvxkvrWYF5DvKCSOX/d4b+eCeV0lnS2n/0dM5rsEf8soON0l1k0u8j0ApE6GqvSj+uUvfa/DT4uIVCpbKcZR/rJ1KLXWMcB cTM88aaHbfrXgvYt1G+81t9Trs8IiB+3ajYNI9tybWBCsZx8tpzLlARknc7LKV71YQeTrEXnoUMp+RTONjcU4k5ltib2QViPZBN7tmcgLW/IAsdGeKuNUW10 Rttlhk+BAt64zSORE+HO4ZbYPW/W265j6m5I0oHHncz5HaUrLDAr8hyLxPTJ3FKY2SEQRZie6wAUMw44v+hr017i/2gwzcyDchIs5oxf2yMYDUj0bQBPOGx0 yC4q33rrnb/dbM4/xNzESSpqbEaN7E57f7w8+Jd4QKz943wVw/OnUGLgpKP1VjiyCozMRH9e X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jul 2018 21:08:52 -0000 In message , =?utf-8?B?5b6M6Je k5aSn5Zyw?= writes: > > > 2018/07/07 8:53、Hiroki Sato のメール: > > > > Daichi GOTO wrote > > in <201807061207.w66C76CR043533@repo.freebsd.org>: > > > > da> Author: daichi > > da> Date: Fri Jul 6 12:07:06 2018 > > da> New Revision: 336028 > > da> URL: https://svnweb.freebsd.org/changeset/base/336028 > > da> > > da> Log: > > da> Changed to eliminate the upper limit of command length displayed > > da> by "-a" and expand to match terminal width > > da> > > da> Reviewed by: eadler > > da> Approved by: gnn (mentor) > > da> Differential Revision: https://reviews.freebsd.org/D16083 > > da> > > da> Modified: > > da> head/usr.bin/top/display.c > > da> head/usr.bin/top/machine.c > > da> head/usr.bin/top/screen.c > > da> head/usr.bin/top/top.h > > > > This change breaks displaying a prompt and messages in the > > interactive mode by new_message() when typing "o" or "p", for > > example. While r336031 fixed a warning in GCC, it does not fix the > > problem itself. Please fix it. > > OK. I will fix this problem first. This should circumvent the problem until you find a more permanent fix. Index: /opt/src/svn-current/usr.bin/top/display.c =================================================================== --- /opt/src/svn-current/usr.bin/top/display.c (revision 336075) +++ /opt/src/svn-current/usr.bin/top/display.c (working copy) @@ -960,7 +960,7 @@ va_start(args, msgfmt); /* first, format the message */ - vsnprintf(next_msg, strlen(next_msg), msgfmt, args); + vsnprintf(next_msg, screen_width + 5, msgfmt, args); va_end(args); > > > > I also think restructure of the buffer management is required first > > if we want to eliminate the column width limitation. Using sbuf(9) > > consistently may be better than incomplete conversion from static > > arrays to malloc(). > > I understand. Switching to sbuf(9) is the next step. > > > > > -- Hiroki > > > -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.