Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/tn3270/sys_curses Don't use curses' VB - it should b...
details: https://anonhg.NetBSD.org/src/rev/af0c1ffdb665
branches: trunk
changeset: 500715:af0c1ffdb665
user: jdc <jdc%NetBSD.org@localhost>
date: Sun Dec 17 14:28:45 2000 +0000
description:
Don't use curses' VB - it should be internal to libcurses.
Use tgetstr() instead.
diffstat:
usr.bin/tn3270/sys_curses/termout.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diffs (65 lines):
diff -r e6bd16e05530 -r af0c1ffdb665 usr.bin/tn3270/sys_curses/termout.c
--- a/usr.bin/tn3270/sys_curses/termout.c Sun Dec 17 13:56:19 2000 +0000
+++ b/usr.bin/tn3270/sys_curses/termout.c Sun Dec 17 14:28:45 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: termout.c,v 1.11 2000/04/27 16:48:42 mycroft Exp $ */
+/* $NetBSD: termout.c,v 1.12 2000/12/17 14:28:45 jdc Exp $ */
/*-
* Copyright (c) 1988 The Regents of the University of California.
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)termout.c 4.3 (Berkeley) 4/26/91";
#else
-__RCSID("$NetBSD: termout.c,v 1.11 2000/04/27 16:48:42 mycroft Exp $");
+__RCSID("$NetBSD: termout.c,v 1.12 2000/12/17 14:28:45 jdc Exp $");
#endif
#endif /* not lint */
@@ -67,9 +67,6 @@
#define nl() (_tty.sg_flags |= CRMOD,_pfast = _rawmode,stty(_tty_ch, &_tty))
#define nonl() (_tty.sg_flags &= ~CRMOD, _pfast = TRUE, stty(_tty_ch, &_tty))
#endif /* defined(ultrix) */
-#if defined(__SVR4) || defined(__svr4__)
-char *SE, *SO, *VB;
-#endif
#include "../general/general.h"
@@ -104,9 +101,7 @@
/* at terminal and net again */
static int needToRing; /* need to ring terinal bell */
-static char *bellSequence = "\07"; /* bell sequence (may be replaced by
- * VB during initialization)
- */
+static char bellSequence[1024]; /* bell sequence */
static WINDOW *bellwin = 0; /* The window the bell message is in */
int bellwinup = 0; /* Are we up with it or not */
@@ -667,6 +662,8 @@
struct termios term;
speed_t speed;
#endif
+ char termbuf[1024];
+ char *bsp;
InitMapping(); /* Go do mapping file (MAP3270) first */
if (!screenInitd) { /* not initialized */
@@ -703,8 +700,14 @@
#endif
DoARefresh();
setconnmode(0);
- if (VB && *VB) {
- bellSequence = VB; /* use visual bell */
+ if (tgetent(termbuf, getenv("TERM")) == 1) {
+ bsp = bellSequence;
+ if ((bsp = tgetstr("vb", &bsp)) == NULL) { /* use visual bell */
+ bsp = bellSequence;
+ if ((bsp = tgetstr("bl", &bsp)) == NULL) {
+ strcpy (bellSequence, "\07");
+ }
+ }
}
screenInitd = 1;
screenStopped = 0; /* Not stopped */
Home |
Main Index |
Thread Index |
Old Index