Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses Send 'ks' sequence from first call to keypad(w...
details: https://anonhg.NetBSD.org/src/rev/2a4a56585680
branches: trunk
changeset: 486542:2a4a56585680
user: jdc <jdc%NetBSD.org@localhost>
date: Thu May 25 06:46:26 2000 +0000
description:
Send 'ks' sequence from first call to keypad(win, TRUE) only and not from
wgetch(). Don't send 'ke' sequence from keypad(win, FALSE) or wgetch().
This makes us compatible with Solaris.
Suggested by ITOH Yasufumi.
diffstat:
lib/libcurses/getch.c | 12 ++----------
lib/libcurses/keypad.c | 13 +++----------
2 files changed, 5 insertions(+), 20 deletions(-)
diffs (77 lines):
diff -r 220e1d338c84 -r 2a4a56585680 lib/libcurses/getch.c
--- a/lib/libcurses/getch.c Thu May 25 04:20:46 2000 +0000
+++ b/lib/libcurses/getch.c Thu May 25 06:46:26 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getch.c,v 1.28 2000/05/17 16:23:49 jdc Exp $ */
+/* $NetBSD: getch.c,v 1.29 2000/05/25 06:46:26 jdc Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)getch.c 8.2 (Berkeley) 5/4/94";
#else
-__RCSID("$NetBSD: getch.c,v 1.28 2000/05/17 16:23:49 jdc Exp $");
+__RCSID("$NetBSD: getch.c,v 1.29 2000/05/25 06:46:26 jdc Exp $");
#endif
#endif /* not lint */
@@ -696,10 +696,6 @@
__save_termios();
if (win->flags & __KEYPAD) {
- if (!(curscr->flags & __KEYPAD)) {
- tputs(KS, 0, __cputchar);
- curscr->flags |= __KEYPAD;
- }
switch (win->delay)
{
case -1:
@@ -717,10 +713,6 @@
break;
}
} else {
- if (curscr->flags & __KEYPAD) {
- tputs(KE, 0, __cputchar);
- curscr->flags &= ~__KEYPAD;
- }
switch (win->delay)
{
case -1:
diff -r 220e1d338c84 -r 2a4a56585680 lib/libcurses/keypad.c
--- a/lib/libcurses/keypad.c Thu May 25 04:20:46 2000 +0000
+++ b/lib/libcurses/keypad.c Thu May 25 06:46:26 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: keypad.c,v 1.5 2000/05/17 16:23:49 jdc Exp $ */
+/* $NetBSD: keypad.c,v 1.6 2000/05/25 06:46:26 jdc Exp $ */
/*-
* Copyright (c) 1998-1999 Brett Lymn (blymn%baea.com.au@localhost, brett_lymn%yahoo.com@localhost)
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: keypad.c,v 1.5 2000/05/17 16:23:49 jdc Exp $");
+__RCSID("$NetBSD: keypad.c,v 1.6 2000/05/25 06:46:26 jdc Exp $");
#endif /* not lint */
#include "curses.h"
@@ -47,17 +47,10 @@
#endif
if (bf) {
win->flags |= __KEYPAD;
- /* Be compatible with SysV curses. */
if (!(curscr->flags & __KEYPAD)) {
tputs (KS, 0, __cputchar);
curscr->flags |= __KEYPAD;
}
- } else {
+ } else
win->flags &= ~__KEYPAD;
- /* Be compatible with SysV curses. */
- if (curscr->flags & __KEYPAD) {
- tputs (KE, 0, __cputchar);
- curscr->flags &= ~__KEYPAD;
- }
- }
}
Home |
Main Index |
Thread Index |
Old Index