Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses As the comment suggests, move the __unsetattr(...
details: https://anonhg.NetBSD.org/src/rev/57b20d067b85
branches: trunk
changeset: 485498:57b20d067b85
user: mycroft <mycroft%NetBSD.org@localhost>
date: Sat Apr 29 02:51:16 2000 +0000
description:
As the comment suggests, move the __unsetattr() to the end of doupdate(), just
before the fflush(). This avoids needlessly resetting modes.
diffstat:
lib/libcurses/refresh.c | 20 ++++++--------------
1 files changed, 6 insertions(+), 14 deletions(-)
diffs (64 lines):
diff -r 0acd6a72f984 -r 57b20d067b85 lib/libcurses/refresh.c
--- a/lib/libcurses/refresh.c Sat Apr 29 02:49:39 2000 +0000
+++ b/lib/libcurses/refresh.c Sat Apr 29 02:51:16 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refresh.c,v 1.27 2000/04/29 00:42:26 mycroft Exp $ */
+/* $NetBSD: refresh.c,v 1.28 2000/04/29 02:51:16 mycroft Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)refresh.c 8.7 (Berkeley) 8/13/94";
#else
-__RCSID("$NetBSD: refresh.c,v 1.27 2000/04/29 00:42:26 mycroft Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.28 2000/04/29 02:51:16 mycroft Exp $");
#endif
#endif /* not lint */
@@ -218,7 +218,6 @@
{
WINDOW *win;
__LINE *wlp;
- int retval;
short wy;
int dnum;
@@ -368,11 +367,10 @@
}
}
- win->flags = 0;
- retval = OK;
-
+ /* Don't leave the screen with attributes set. */
+ __unsetattr(0);
(void) fflush(stdout);
- return (retval);
+ return (OK);
}
/*
@@ -643,9 +641,8 @@
if (wx >= win->maxx &&
wy == win->maxy - 1 && !curwin)
if (win->flags & __SCROLLOK) {
- if (win->flags & __ENDLINE){
+ if (win->flags & __ENDLINE)
__unsetattr(1);
- }
if (!(win->flags & __SCROLLWIN)) {
if (!curwin) {
csp->attr = nsp->attr;
@@ -702,11 +699,6 @@
#endif
}
- /*
- * Don't leave the screen with attributes set.
- * XXX Should this be at the end of doupdate() and not here?
- */
- __unsetattr(0);
return (OK);
}
Home |
Main Index |
Thread Index |
Old Index