]> mj.ucw.cz Git - ywho.git/commitdiff
Bugfix.
authorMartin Mares <mj@ucw.cz>
Mon, 13 Jan 2003 17:47:16 +0000 (17:47 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 13 Jan 2003 17:47:16 +0000 (17:47 +0000)
ChangeLog
debian/changelog
ywho.c

index a62211e06d3f7abd6e83501f72a827d63fb1f18c..ba3e1d98502247cc5b49fc727f7de1c9c593a88c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-01-13  Martin Mares  <mj@atrey.karlin.mff.cuni.cz>
+
+       * 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  <mj@atrey.karlin.mff.cuni.cz>
 
        * Released as version 1.10.
index 8d88319646ffc4b8b37ff2b177ee3b8e8d9e015d..97966720d377284eaad39509f213d92f539c7296 100644 (file)
@@ -1,3 +1,9 @@
+ywho (1.11) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Martin Mares <mj@atrey.karlin.mff.cuni.cz>  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 5c23a7f5f4586268daf5467653f552d68bfc1658..c44cca60b7d01ca9f200e124c6990e232307c4af 100644 (file)
--- 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 <mj@ucw.cz>
+ *     (c) 1996--2003 Martin Mares <mj@ucw.cz>
  *
  *     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"))
     {