Module Name: src Committed By: dsl Date: Sun Nov 1 22:08:14 UTC 2009
Modified Files: src/usr.bin/systat: globalcmds.c Log Message: Correctly count number of chars output so that help isn't blank if the terminal is too narrow. Not ideal since the last command isn't shown on 80 column terminals. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/systat/globalcmds.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/systat/globalcmds.c diff -u src/usr.bin/systat/globalcmds.c:1.14 src/usr.bin/systat/globalcmds.c:1.15 --- src/usr.bin/systat/globalcmds.c:1.14 Mon Apr 13 23:20:27 2009 +++ src/usr.bin/systat/globalcmds.c Sun Nov 1 22:08:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: globalcmds.c,v 1.14 2009/04/13 23:20:27 lukem Exp $ */ +/* $NetBSD: globalcmds.c,v 1.15 2009/11/01 22:08:14 dsl Exp $ */ /*- * Copyright (c) 1999 @@ -34,7 +34,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: globalcmds.c,v 1.14 2009/04/13 23:20:27 lukem Exp $"); +__RCSID("$NetBSD: globalcmds.c,v 1.15 2009/11/01 22:08:14 dsl Exp $"); #endif /* not lint */ #include <curses.h> @@ -94,7 +94,8 @@ len = strlen(name); if (col + len > COLS) break; - addstr(name); col += len; + addstr(name); + col += len + 1; if (col + 1 < COLS) addch(' '); if (prev)