Module Name:    src
Committed By:   mrg
Date:           Sun Aug 23 18:33:15 UTC 2015

Modified Files:
        src/usr.bin/systat: extern.h keyboard.c main.c

Log Message:
if you change display types, the "Showing %s, refresh every %d seconds."
message is retained, and you can't get rid of it.  since it's dispalyed
in inverse, it feels like there's always an error happening (which is
really what the code has -- the above string is displayed via the error()
function.)  for several types of key press that largely are just "redraw"
operation (space, ^L, etc.), clear the error string as well.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/usr.bin/systat/extern.h
cvs rdiff -u -r1.25 -r1.26 src/usr.bin/systat/keyboard.c
cvs rdiff -u -r1.48 -r1.49 src/usr.bin/systat/main.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/extern.h
diff -u src/usr.bin/systat/extern.h:1.43 src/usr.bin/systat/extern.h:1.44
--- src/usr.bin/systat/extern.h:1.43	Tue Jun  3 22:22:41 2014
+++ src/usr.bin/systat/extern.h	Sun Aug 23 18:33:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: extern.h,v 1.43 2014/06/03 22:22:41 joerg Exp $	*/
+/*	$NetBSD: extern.h,v 1.44 2015/08/23 18:33:15 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -93,6 +93,7 @@ void	 disks_remove(char *);
 void	 disks_drives(char *);
 void	 display(int);
 void	 error(const char *, ...) __printflike(1, 2);
+void	 clearerror(void);
 void	 fetchbufcache(void);
 void	 fetchdf(void);
 void	 fetchicmp(void);

Index: src/usr.bin/systat/keyboard.c
diff -u src/usr.bin/systat/keyboard.c:1.25 src/usr.bin/systat/keyboard.c:1.26
--- src/usr.bin/systat/keyboard.c:1.25	Mon Oct 14 22:23:22 2013
+++ src/usr.bin/systat/keyboard.c	Sun Aug 23 18:33:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: keyboard.c,v 1.25 2013/10/14 22:23:22 bad Exp $	*/
+/*	$NetBSD: keyboard.c,v 1.26 2015/08/23 18:33:15 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1992, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)keyboard.c	8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: keyboard.c,v 1.25 2013/10/14 22:23:22 bad Exp $");
+__RCSID("$NetBSD: keyboard.c,v 1.26 2015/08/23 18:33:15 mrg Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -94,9 +94,11 @@ keyboard(void)
 				    case '\n':
 				    case '\r':
 				    case ' ':
+					clearerror();
 					display(0);
 					break;
 				    case CTRL('l'):
+					clearerror();
 					wrefresh(curscr);
 					break;
 				    case CTRL('g'):

Index: src/usr.bin/systat/main.c
diff -u src/usr.bin/systat/main.c:1.48 src/usr.bin/systat/main.c:1.49
--- src/usr.bin/systat/main.c:1.48	Tue Jun  3 22:22:41 2014
+++ src/usr.bin/systat/main.c	Sun Aug 23 18:33:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.48 2014/06/03 22:22:41 joerg Exp $	*/
+/*	$NetBSD: main.c,v 1.49 2015/08/23 18:33:15 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1992, 1993
@@ -36,7 +36,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)main.c	8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: main.c,v 1.48 2014/06/03 22:22:41 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.49 2015/08/23 18:33:15 mrg Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -383,6 +383,13 @@ error(const char *fmt, ...)
 }
 
 void
+clearerror(void)
+{
+
+	error("%s", "");
+}
+
+void
 nlisterr(struct nlist name_list[])
 {
 	int i, n;

Reply via email to