From 9c84d34b9732b31c55c83b715b2ccaee15859baa Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 13 Jan 2003 17:47:16 +0000 Subject: [PATCH] Bugfix. --- ChangeLog | 7 +++++++ debian/changelog | 6 ++++++ ywho.c | 11 ++++++----- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a62211e..ba3e1d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-01-13 Martin Mares + + * Released as version 1.11. + + * ywho.c (LEFTSIZE): Forgot the old value of this constant when + changing design, causing incorrect truncation of long command lines. + 2002-07-06 Martin Mares * Released as version 1.10. diff --git a/debian/changelog b/debian/changelog index 8d88319..9796672 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ywho (1.11) unstable; urgency=low + + * New upstream version. + + -- Martin Mares Mon, 13 Jan 2003 18:46:57 +0100 + ywho (1.10) unstable; urgency=low * New upstream version. diff --git a/ywho.c b/ywho.c index 5c23a7f..c44cca6 100644 --- a/ywho.c +++ b/ywho.c @@ -1,7 +1,7 @@ /* - * Extended `who' command, version 1.10. + * Extended `who' command, version 1.11. * - * (c) 1996--2002 Martin Mares + * (c) 1996--2003 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU General Public License. See file COPYING in any of the GNU packages. @@ -365,12 +365,13 @@ readproc(void) DIR *d; struct dirent *e; struct winsize win; - unsigned cmdcols = 0; -#define LEFTSIZE 29 + unsigned cmdcols; +#define LEFTSIZE 35 if (!ioctl(1, TIOCGWINSZ, &win) && win.ws_col >= LEFTSIZE + maxhost + 10 && win.ws_col < 1024) cmdcols = win.ws_col; - else cmdcols = 80; + else + cmdcols = 80; cmdcols -= LEFTSIZE + maxhost; if (d = opendir("/proc")) { -- 2.39.2