Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/systat Correctly count number of chars output so tha...
details: https://anonhg.NetBSD.org/src/rev/e234d83529fd
branches: trunk
changeset: 748691:e234d83529fd
user: dsl <dsl%NetBSD.org@localhost>
date: Sun Nov 01 22:08:14 2009 +0000
description:
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.
diffstat:
usr.bin/systat/globalcmds.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 7ac947e882c5 -r e234d83529fd usr.bin/systat/globalcmds.c
--- a/usr.bin/systat/globalcmds.c Sun Nov 01 21:46:09 2009 +0000
+++ b/usr.bin/systat/globalcmds.c Sun Nov 01 22:08:14 2009 +0000
@@ -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)
Home |
Main Index |
Thread Index |
Old Index