Rename variables refering to termcap capabilities from NN to __tc_nn. Case
adjusted to match termcap capability. A few other variable names renamed too (ones related to or derived from termcap variables).
This commit is contained in:
parent
1cc86f8ba4
commit
606508da77
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: acs.c,v 1.7 2000/04/24 14:09:42 blymn Exp $ */
|
||||
/* $NetBSD: acs.c,v 1.8 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: acs.c,v 1.7 2000/04/24 14:09:42 blymn Exp $");
|
||||
__RCSID("$NetBSD: acs.c,v 1.8 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "curses.h"
|
||||
@ -89,10 +89,10 @@ __init_acs(void)
|
||||
ACS_VLINE = '|';
|
||||
ACS_BULLET = 'o';
|
||||
|
||||
if (AC == NULL)
|
||||
if (__tc_ac == NULL)
|
||||
return;
|
||||
|
||||
aofac = AC;
|
||||
aofac = __tc_ac;
|
||||
|
||||
while (*aofac != '\0') {
|
||||
if ((acs = *aofac) == '\0')
|
||||
@ -110,6 +110,6 @@ __init_acs(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (Ea != NULL)
|
||||
tputs(Ea, 0, __cputchar);
|
||||
if (__tc_eA != NULL)
|
||||
tputs(__tc_eA, 0, __cputchar);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: addbytes.c,v 1.20 2000/04/28 22:44:33 mycroft Exp $ */
|
||||
/* $NetBSD: addbytes.c,v 1.21 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987, 1993, 1994
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)addbytes.c 8.4 (Berkeley) 5/4/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: addbytes.c,v 1.20 2000/04/28 22:44:33 mycroft Exp $");
|
||||
__RCSID("$NetBSD: addbytes.c,v 1.21 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -198,7 +198,7 @@ __waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr)
|
||||
SYNCH_OUT;
|
||||
wclrtoeol(win);
|
||||
SYNCH_IN;
|
||||
if (!NONL)
|
||||
if (!__NONL)
|
||||
x = 0;
|
||||
goto newline;
|
||||
case '\r':
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: attributes.c,v 1.8 2000/05/11 22:44:45 jdc Exp $ */
|
||||
/* $NetBSD: attributes.c,v 1.9 2000/12/19 21:34:25 jdc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: attributes.c,v 1.8 2000/05/11 22:44:45 jdc Exp $");
|
||||
__RCSID("$NetBSD: attributes.c,v 1.9 2000/12/19 21:34:25 jdc Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "curses.h"
|
||||
@ -94,18 +94,18 @@ wattron(WINDOW *win, int attr)
|
||||
__CTRACE ("wattron: win %0.2o, attr %08x\n", win, attr);
|
||||
#endif
|
||||
/* If can enter modes, set the relevent attribute bits. */
|
||||
if (ME != NULL) {
|
||||
if ((attr_t) attr & __BLINK && MB != NULL)
|
||||
if (__tc_me != NULL) {
|
||||
if ((attr_t) attr & __BLINK && __tc_mb != NULL)
|
||||
win->wattr |= __BLINK;
|
||||
if ((attr_t) attr & __BOLD && MD != NULL)
|
||||
if ((attr_t) attr & __BOLD && __tc_md != NULL)
|
||||
win->wattr |= __BOLD;
|
||||
if ((attr_t) attr & __DIM && MH != NULL)
|
||||
if ((attr_t) attr & __DIM && __tc_mh != NULL)
|
||||
win->wattr |= __DIM;
|
||||
if ((attr_t) attr & __BLANK && MK != NULL)
|
||||
if ((attr_t) attr & __BLANK && __tc_mk != NULL)
|
||||
win->wattr |= __BLANK;
|
||||
if ((attr_t) attr & __PROTECT && MP != NULL)
|
||||
if ((attr_t) attr & __PROTECT && __tc_mp != NULL)
|
||||
win->wattr |= __PROTECT;
|
||||
if ((attr_t) attr & __REVERSE && MR != NULL)
|
||||
if ((attr_t) attr & __REVERSE && __tc_mr != NULL)
|
||||
win->wattr |= __REVERSE;
|
||||
}
|
||||
if ((attr_t) attr & __STANDOUT)
|
||||
@ -119,7 +119,7 @@ wattron(WINDOW *win, int attr)
|
||||
/* If another color pair is set, turn that off first. */
|
||||
win->wattr &= ~__COLOR;
|
||||
/* If can do color video, set the color pair bits. */
|
||||
if (cO != NULL) {
|
||||
if (__tc_Co != NULL) {
|
||||
win->wattr |= attr & __COLOR;
|
||||
win->wattr &= ~__nca;
|
||||
}
|
||||
@ -141,7 +141,7 @@ wattroff(WINDOW *win, int attr)
|
||||
__CTRACE ("wattroff: win %0.2o, attr %08x\n", win, attr);
|
||||
#endif
|
||||
/* If can do exit modes, unset the relevent attribute bits. */
|
||||
if (ME != NULL) {
|
||||
if (__tc_me != NULL) {
|
||||
if ((attr_t) attr & __BLINK)
|
||||
win->wattr &= ~__BLINK;
|
||||
if ((attr_t) attr & __BOLD)
|
||||
@ -160,7 +160,7 @@ wattroff(WINDOW *win, int attr)
|
||||
if ((attr_t) attr & __UNDERSCORE)
|
||||
wunderend(win);
|
||||
if ((attr_t) attr & __COLOR) {
|
||||
if (cO != NULL)
|
||||
if (__tc_Co != NULL)
|
||||
win->wattr &= ~__COLOR;
|
||||
}
|
||||
return (OK);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bell.c,v 1.4 2000/04/24 14:09:42 blymn Exp $ */
|
||||
/* $NetBSD: bell.c,v 1.5 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: bell.c,v 1.4 2000/04/24 14:09:42 blymn Exp $");
|
||||
__RCSID("$NetBSD: bell.c,v 1.5 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "curses.h"
|
||||
@ -51,16 +51,16 @@ __RCSID("$NetBSD: bell.c,v 1.4 2000/04/24 14:09:42 blymn Exp $");
|
||||
int
|
||||
beep(void)
|
||||
{
|
||||
if (BL != NULL) {
|
||||
if (__tc_bl != NULL) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("beep: bl\n");
|
||||
#endif
|
||||
tputs(BL, 0, __cputchar);
|
||||
} else if (VB != NULL) {
|
||||
tputs(__tc_bl, 0, __cputchar);
|
||||
} else if (__tc_vb != NULL) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("beep: vb\n");
|
||||
#endif
|
||||
tputs(VB, 0, __cputchar);
|
||||
tputs(__tc_vb, 0, __cputchar);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
@ -72,16 +72,16 @@ beep(void)
|
||||
int
|
||||
flash(void)
|
||||
{
|
||||
if (VB != NULL) {
|
||||
if (__tc_vb != NULL) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("flash: vb\n");
|
||||
#endif
|
||||
tputs(VB, 0, __cputchar);
|
||||
} else if (BL != NULL) {
|
||||
tputs(__tc_vb, 0, __cputchar);
|
||||
} else if (__tc_bl != NULL) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("flash: bl\n");
|
||||
#endif
|
||||
tputs(BL, 0, __cputchar);
|
||||
tputs(__tc_bl, 0, __cputchar);
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: color.c,v 1.12 2000/05/06 19:03:39 jdc Exp $ */
|
||||
/* $NetBSD: color.c,v 1.13 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: color.c,v 1.12 2000/05/06 19:03:39 jdc Exp $");
|
||||
__RCSID("$NetBSD: color.c,v 1.13 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "curses.h"
|
||||
@ -91,8 +91,9 @@ __change_pair __P((short));
|
||||
bool
|
||||
has_colors(void)
|
||||
{
|
||||
if (cO > 0 && PA > 0 && ((af != NULL && ab != NULL) || iP != NULL ||
|
||||
iC != NULL || (sB != NULL && sF != NULL)))
|
||||
if (__tc_Co > 0 && __tc_pa > 0 && ((__tc_AF != NULL &&
|
||||
__tc_AB != NULL) || __tc_Ip != NULL || __tc_Ic != NULL ||
|
||||
(__tc_Sb != NULL && __tc_Sf != NULL)))
|
||||
return(TRUE);
|
||||
else
|
||||
return(FALSE);
|
||||
@ -105,7 +106,7 @@ has_colors(void)
|
||||
bool
|
||||
can_change_colors(void)
|
||||
{
|
||||
if (CC)
|
||||
if (__tc_cc)
|
||||
return(TRUE);
|
||||
else
|
||||
return(FALSE);
|
||||
@ -125,36 +126,36 @@ start_color(void)
|
||||
return(ERR);
|
||||
|
||||
/* Max colours and colour pairs */
|
||||
if (cO == -1)
|
||||
if (__tc_Co == -1)
|
||||
COLORS = 0;
|
||||
else {
|
||||
COLORS = cO > MAX_COLORS ? MAX_COLORS : cO;
|
||||
if (PA == -1) {
|
||||
COLORS = __tc_Co > MAX_COLORS ? MAX_COLORS : __tc_Co;
|
||||
if (__tc_pa == -1) {
|
||||
COLOR_PAIRS = 0;
|
||||
COLORS = 0;
|
||||
} else {
|
||||
COLOR_PAIRS = PA > MAX_PAIRS ? MAX_PAIRS : PA;
|
||||
COLOR_PAIRS = __tc_pa > MAX_PAIRS ? MAX_PAIRS : __tc_pa;
|
||||
}
|
||||
}
|
||||
if (!COLORS)
|
||||
return (ERR);
|
||||
|
||||
/* Reset terminal colour and colour pairs. */
|
||||
if (OC != NULL)
|
||||
tputs(OC, 0, __cputchar);
|
||||
if (OP != NULL) {
|
||||
tputs(OP, 0, __cputchar);
|
||||
curscr->wattr &= __mask_OP;
|
||||
if (__tc_oc != NULL)
|
||||
tputs(__tc_oc, 0, __cputchar);
|
||||
if (__tc_op != NULL) {
|
||||
tputs(__tc_op, 0, __cputchar);
|
||||
curscr->wattr &= __mask_op;
|
||||
}
|
||||
|
||||
/* Type of colour manipulation - ANSI/TEK/HP/other */
|
||||
if (af != NULL && ab != NULL)
|
||||
if (__tc_AF != NULL && __tc_AB != NULL)
|
||||
__color_type = COLOR_ANSI;
|
||||
else if (iP != NULL)
|
||||
else if (__tc_Ip != NULL)
|
||||
__color_type = COLOR_HP;
|
||||
else if (iC != NULL)
|
||||
else if (__tc_Ic != NULL)
|
||||
__color_type = COLOR_TEK;
|
||||
else if (sB != NULL && sF != NULL)
|
||||
else if (__tc_Sb != NULL && __tc_Sf != NULL)
|
||||
__color_type = COLOR_OTHER;
|
||||
else
|
||||
return(ERR); /* Unsupported colour method */
|
||||
@ -183,7 +184,7 @@ start_color(void)
|
||||
* Store these in an attr_t for wattrset()/wattron().
|
||||
*/
|
||||
__nca = __NORMAL;
|
||||
if (nc != -1) {
|
||||
if (__tc_NC != -1) {
|
||||
temp_nc = (attr_t) t_getnum(_cursesi_genbuf, "NC");
|
||||
if (temp_nc & 0x0001)
|
||||
__nca |= __STANDOUT;
|
||||
@ -274,7 +275,7 @@ init_pair(short pair, short fore, short back)
|
||||
pairs[pair].fore = fore;
|
||||
pairs[pair].back = back;
|
||||
|
||||
/* XXX: need to initialise HP style (iP) */
|
||||
/* XXX: need to initialise HP style (Ip) */
|
||||
|
||||
if (changed)
|
||||
__change_pair(pair);
|
||||
@ -314,7 +315,7 @@ init_color(short color, short red, short green, short blue)
|
||||
colors[color].blue = blue;
|
||||
/* XXX Not yet implemented */
|
||||
return(ERR);
|
||||
/* XXX: need to initialise Tek style (iC) and support HLS */
|
||||
/* XXX: need to initialise Tek style (Ic) and support HLS */
|
||||
}
|
||||
|
||||
/*
|
||||
@ -350,8 +351,8 @@ __set_color(attr_t attr)
|
||||
switch (__color_type) {
|
||||
/* Set ANSI forground and background colours */
|
||||
case COLOR_ANSI:
|
||||
tputs(__parse_cap(af, pairs[pair].fore), 0, __cputchar);
|
||||
tputs(__parse_cap(ab, pairs[pair].back), 0, __cputchar);
|
||||
tputs(__parse_cap(__tc_AF, pairs[pair].fore), 0, __cputchar);
|
||||
tputs(__parse_cap(__tc_AB, pairs[pair].back), 0, __cputchar);
|
||||
break;
|
||||
case COLOR_HP:
|
||||
/* XXX: need to support HP style */
|
||||
@ -360,8 +361,8 @@ __set_color(attr_t attr)
|
||||
/* XXX: need to support Tek style */
|
||||
break;
|
||||
case COLOR_OTHER:
|
||||
tputs(__parse_cap(sF, pairs[pair].fore), 0, __cputchar);
|
||||
tputs(__parse_cap(sB, pairs[pair].back), 0, __cputchar);
|
||||
tputs(__parse_cap(__tc_Sf, pairs[pair].fore), 0, __cputchar);
|
||||
tputs(__parse_cap(__tc_Sb, pairs[pair].back), 0, __cputchar);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -373,13 +374,13 @@ __set_color(attr_t attr)
|
||||
void
|
||||
__restore_colors(void)
|
||||
{
|
||||
if (CC != NULL)
|
||||
if (__tc_cc != NULL)
|
||||
switch (__color_type) {
|
||||
case COLOR_HP:
|
||||
/* XXX: need to re-initialise HP style (iP) */
|
||||
/* XXX: need to re-initialise HP style (Ip) */
|
||||
break;
|
||||
case COLOR_TEK:
|
||||
/* XXX: need to re-initialise Tek style (iC) */
|
||||
/* XXX: need to re-initialise Tek style (Ic) */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cr_put.c,v 1.19 2000/08/01 04:17:09 itojun Exp $ */
|
||||
/* $NetBSD: cr_put.c,v 1.20 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)cr_put.c 8.3 (Berkeley) 5/4/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: cr_put.c,v 1.19 2000/08/01 04:17:09 itojun Exp $");
|
||||
__RCSID("$NetBSD: cr_put.c,v 1.20 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -107,16 +107,16 @@ fgoto(in_refresh)
|
||||
l = (outcol + 1) / COLS;
|
||||
outline += l;
|
||||
outcol %= COLS;
|
||||
if (AM == 0) {
|
||||
if (__tc_am == 0) {
|
||||
while (l > 0) {
|
||||
if (__pfast) {
|
||||
if (CR)
|
||||
tputs(CR, 0, __cputchar);
|
||||
if (__tc_cr)
|
||||
tputs(__tc_cr, 0, __cputchar);
|
||||
else
|
||||
__cputchar('\r');
|
||||
}
|
||||
if (NL)
|
||||
tputs(NL, 0, __cputchar);
|
||||
if (__tc_nl)
|
||||
tputs(__tc_nl, 0, __cputchar);
|
||||
else
|
||||
__cputchar('\n');
|
||||
l--;
|
||||
@ -133,7 +133,7 @@ fgoto(in_refresh)
|
||||
destline = LINES - 1;
|
||||
if (outline < LINES - 1) {
|
||||
c = destcol;
|
||||
if (__pfast == 0 && !CA)
|
||||
if (__pfast == 0 && !__CA)
|
||||
destcol = 0;
|
||||
fgoto(in_refresh);
|
||||
destcol = c;
|
||||
@ -155,8 +155,8 @@ fgoto(in_refresh)
|
||||
* linefeed to scroll since down arrow won't go past
|
||||
* memory end. I turned this off after recieving Paul
|
||||
* Eggert's Superbee description which wins better. */
|
||||
if (NL /* && !XB */ && __pfast)
|
||||
tputs(NL, 0, __cputchar);
|
||||
if (__tc_nl /* && !__tc_xb */ && __pfast)
|
||||
tputs(__tc_nl, 0, __cputchar);
|
||||
else
|
||||
__cputchar('\n');
|
||||
l--;
|
||||
@ -164,10 +164,10 @@ fgoto(in_refresh)
|
||||
outcol = 0;
|
||||
}
|
||||
}
|
||||
if (destline < outline && !(CA || UP))
|
||||
if (destline < outline && !(__CA || __tc_up))
|
||||
destline = outline;
|
||||
if (CA) {
|
||||
t_goto(NULL, CM, destcol, destline, cgp, 1023);
|
||||
if (__CA) {
|
||||
t_goto(NULL, __tc_cm, destcol, destline, cgp, 1023);
|
||||
|
||||
/*
|
||||
* Need this condition due to inconsistent behavior
|
||||
@ -215,13 +215,13 @@ plod(cnt, in_refresh)
|
||||
* Consider homing and moving down/right from there, vs. moving
|
||||
* directly with local motions to the right spot.
|
||||
*/
|
||||
if (HO) {
|
||||
if (__tc_ho) {
|
||||
/*
|
||||
* i is the cost to home and tab/space to the right to get to
|
||||
* the proper column. This assumes ND space costs 1 char. So
|
||||
* the proper column. This assumes nd space costs 1 char. So
|
||||
* i + destcol is cost of motion with home.
|
||||
*/
|
||||
if (GT)
|
||||
if (__GT)
|
||||
i = (destcol / HARDTABS) + (destcol % HARDTABS);
|
||||
else
|
||||
i = destcol;
|
||||
@ -229,13 +229,13 @@ plod(cnt, in_refresh)
|
||||
/* j is cost to move locally without homing. */
|
||||
if (destcol >= outcol) { /* if motion is to the right */
|
||||
j = destcol / HARDTABS - outcol / HARDTABS;
|
||||
if (GT && j)
|
||||
if (__GT && j)
|
||||
j += destcol % HARDTABS;
|
||||
else
|
||||
j = destcol - outcol;
|
||||
} else
|
||||
/* leftward motion only works if we can backspace. */
|
||||
if (outcol - destcol <= i && (BS || BC))
|
||||
if (outcol - destcol <= i && (__tc_bs || __tc_bc))
|
||||
/* Cheaper to backspace. */
|
||||
i = j = outcol - destcol;
|
||||
else
|
||||
@ -248,39 +248,39 @@ plod(cnt, in_refresh)
|
||||
k = -k;
|
||||
j += k;
|
||||
|
||||
/* Decision. We may not have a choice if no UP. */
|
||||
if (i + destline < j || (!UP && destline < outline)) {
|
||||
/* Decision. We may not have a choice if no up. */
|
||||
if (i + destline < j || (!__tc_up && destline < outline)) {
|
||||
/*
|
||||
* Cheaper to home. Do it now and pretend it's a
|
||||
* regular local motion.
|
||||
*/
|
||||
tputs(HO, 0, plodput);
|
||||
tputs(__tc_ho, 0, plodput);
|
||||
outcol = outline = 0;
|
||||
} else
|
||||
if (LL) {
|
||||
if (__tc_ll) {
|
||||
/*
|
||||
* Quickly consider homing down and moving from there.
|
||||
* Assume cost of LL is 2.
|
||||
* Quickly consider homing down and moving from
|
||||
* there. Assume cost of ll is 2.
|
||||
*/
|
||||
k = (LINES - 1) - destline;
|
||||
if (i + k + 2 < j && (k <= 0 || UP)) {
|
||||
tputs(LL, 0, plodput);
|
||||
if (i + k + 2 < j && (k <= 0 || __tc_up)) {
|
||||
tputs(__tc_ll, 0, plodput);
|
||||
outcol = 0;
|
||||
outline = LINES - 1;
|
||||
}
|
||||
}
|
||||
} else
|
||||
/* No home and no up means it's impossible. */
|
||||
if (!UP && destline < outline)
|
||||
if (!__tc_up && destline < outline)
|
||||
return (-1);
|
||||
if (GT)
|
||||
if (__GT)
|
||||
i = destcol % HARDTABS + destcol / HARDTABS;
|
||||
else
|
||||
i = destcol;
|
||||
#ifdef notdef
|
||||
if (BT && outcol > destcol &&
|
||||
if (__tc_bt && outcol > destcol &&
|
||||
(j = (((outcol + 7) & ~7) - destcol - 1) >> 3)) {
|
||||
j *= (k = strlen(BT));
|
||||
j *= (k = strlen(__tc_bt));
|
||||
if ((k += (destcol & 7)) > 4)
|
||||
j += 8 - (destcol & 7);
|
||||
else
|
||||
@ -293,32 +293,32 @@ plod(cnt, in_refresh)
|
||||
* If we will later need a \n which will turn into a \r\n by the
|
||||
* system or the terminal, then don't bother to try to \r.
|
||||
*/
|
||||
if ((NONL || !__pfast) && outline < destline)
|
||||
if ((__NONL || !__pfast) && outline < destline)
|
||||
goto dontcr;
|
||||
|
||||
/*
|
||||
* If the terminal will do a \r\n and there isn't room for it, then
|
||||
* we can't afford a \r.
|
||||
*/
|
||||
if (NC && outline >= destline)
|
||||
if (__tc_nc && outline >= destline)
|
||||
goto dontcr;
|
||||
|
||||
/*
|
||||
* If it will be cheaper, or if we can't back up, then send a return
|
||||
* preliminarily.
|
||||
*/
|
||||
if (j > i + 1 || (outcol > destcol && !BS && !BC)) {
|
||||
if (j > i + 1 || (outcol > destcol && !__tc_bs && !__tc_bc)) {
|
||||
/*
|
||||
* BUG: this doesn't take the (possibly long) length of CR
|
||||
* BUG: this doesn't take the (possibly long) length of cr
|
||||
* into account.
|
||||
*/
|
||||
if (CR)
|
||||
tputs(CR, 0, plodput);
|
||||
if (__tc_cr)
|
||||
tputs(__tc_cr, 0, plodput);
|
||||
else
|
||||
plodput('\r');
|
||||
if (NC) {
|
||||
if (NL)
|
||||
tputs(NL, 0, plodput);
|
||||
if (__tc_nc) {
|
||||
if (__tc_nl)
|
||||
tputs(__tc_nl, 0, plodput);
|
||||
else
|
||||
plodput('\n');
|
||||
outline++;
|
||||
@ -327,61 +327,61 @@ plod(cnt, in_refresh)
|
||||
}
|
||||
dontcr:while (outline < destline) {
|
||||
outline++;
|
||||
if (NL)
|
||||
tputs(NL, 0, plodput);
|
||||
if (__tc_nl)
|
||||
tputs(__tc_nl, 0, plodput);
|
||||
else
|
||||
plodput('\n');
|
||||
if (plodcnt < 0)
|
||||
goto out;
|
||||
if (NONL || __pfast == 0)
|
||||
if (__NONL || __pfast == 0)
|
||||
outcol = 0;
|
||||
}
|
||||
if (BT)
|
||||
k = (int) strlen(BT);
|
||||
if (__tc_bt)
|
||||
k = (int) strlen(__tc_bt);
|
||||
while (outcol > destcol) {
|
||||
if (plodcnt < 0)
|
||||
goto out;
|
||||
#ifdef notdef
|
||||
if (BT && outcol - destcol > k + 4) {
|
||||
tputs(BT, 0, plodput);
|
||||
if (__tc_bt && outcol - destcol > k + 4) {
|
||||
tputs(__tc_bt, 0, plodput);
|
||||
outcol--;
|
||||
outcol &= ~7;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
outcol--;
|
||||
if (BC)
|
||||
tputs(BC, 0, plodput);
|
||||
if (__tc_bc)
|
||||
tputs(__tc_bc, 0, plodput);
|
||||
else
|
||||
plodput('\b');
|
||||
}
|
||||
while (outline > destline) {
|
||||
outline--;
|
||||
tputs(UP, 0, plodput);
|
||||
tputs(__tc_up, 0, plodput);
|
||||
if (plodcnt < 0)
|
||||
goto out;
|
||||
}
|
||||
if (GT && destcol - outcol > 1) {
|
||||
if (__GT && destcol - outcol > 1) {
|
||||
for (;;) {
|
||||
i = tabcol(outcol, HARDTABS);
|
||||
if (i > destcol)
|
||||
break;
|
||||
if (TA)
|
||||
tputs(TA, 0, plodput);
|
||||
if (__tc_ta)
|
||||
tputs(__tc_ta, 0, plodput);
|
||||
else
|
||||
plodput('\t');
|
||||
outcol = i;
|
||||
}
|
||||
if (destcol - outcol > 4 && i < COLS && (BC || BS)) {
|
||||
if (TA)
|
||||
tputs(TA, 0, plodput);
|
||||
if (destcol - outcol > 4 && i < COLS && (__tc_bc || __tc_bs)) {
|
||||
if (__tc_ta)
|
||||
tputs(__tc_ta, 0, plodput);
|
||||
else
|
||||
plodput('\t');
|
||||
outcol = i;
|
||||
while (outcol > destcol) {
|
||||
outcol--;
|
||||
if (BC)
|
||||
tputs(BC, 0, plodput);
|
||||
if (__tc_bc)
|
||||
tputs(__tc_bc, 0, plodput);
|
||||
else
|
||||
plodput('\b');
|
||||
}
|
||||
@ -389,7 +389,7 @@ dontcr:while (outline < destline) {
|
||||
}
|
||||
while (outcol < destcol) {
|
||||
/*
|
||||
* Move one char to the right. We don't use ND space because
|
||||
* Move one char to the right. We don't use nd space because
|
||||
* it's better to just print the char we are moving over.
|
||||
*/
|
||||
if (in_refresh)
|
||||
@ -405,8 +405,8 @@ dontcr:while (outline < destline) {
|
||||
goto nondes;
|
||||
}
|
||||
else
|
||||
nondes: if (ND)
|
||||
tputs(ND, 0, plodput);
|
||||
nondes: if (__tc_nd)
|
||||
tputs(__tc_nd, 0, plodput);
|
||||
else
|
||||
plodput(' ');
|
||||
outcol++;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: curs_set.c,v 1.3 2000/04/24 14:09:43 blymn Exp $ */
|
||||
/* $NetBSD: curs_set.c,v 1.4 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998-2000 Brett Lymn
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: curs_set.c,v 1.3 2000/04/24 14:09:43 blymn Exp $");
|
||||
__RCSID("$NetBSD: curs_set.c,v 1.4 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "curses.h"
|
||||
@ -54,34 +54,34 @@ curs_set(int visibility)
|
||||
old_one = old_mode;
|
||||
switch (visibility) {
|
||||
case 0: /* invisible */
|
||||
if (VI != NULL) {
|
||||
if (__tc_vi != NULL) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("curs_set: invisible\n");
|
||||
#endif
|
||||
old_mode = 0;
|
||||
tputs(VI, 0, __cputchar);
|
||||
tputs(__tc_vi, 0, __cputchar);
|
||||
return old_one;
|
||||
}
|
||||
break;
|
||||
|
||||
case 1: /* normal */
|
||||
if (VE != NULL) {
|
||||
if (__tc_ve != NULL) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("curs_set: normal\n");
|
||||
#endif
|
||||
old_mode = 1;
|
||||
tputs(VE, 0, __cputchar);
|
||||
tputs(__tc_ve, 0, __cputchar);
|
||||
return old_one;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: /* high visibility */
|
||||
if (VS != NULL) {
|
||||
if (__tc_vs != NULL) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("curs_set: high vis\n");
|
||||
#endif
|
||||
old_mode = 2;
|
||||
tputs(VS, 0, __cputchar);
|
||||
tputs(__tc_vs, 0, __cputchar);
|
||||
return old_one;
|
||||
}
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: curses.c,v 1.16 2000/04/27 00:21:22 jdc Exp $ */
|
||||
/* $NetBSD: curses.c,v 1.17 2000/12/19 21:34:25 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)curses.c 8.3 (Berkeley) 5/4/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: curses.c,v 1.16 2000/04/27 00:21:22 jdc Exp $");
|
||||
__RCSID("$NetBSD: curses.c,v 1.17 2000/12/19 21:34:25 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -53,17 +53,31 @@ int __noqch = 0; /*
|
||||
* insert/delete line capabilities
|
||||
* for quick change on refresh.
|
||||
*/
|
||||
char AM, UT, BS, CA, CC, DA, EO, HC, HL, IN, MI, MS, NC, NS, OS, PC,
|
||||
UL, XB, XN, XT, XS, XX;
|
||||
int PA, cO, nc;
|
||||
char *AC, *AE, *AL, *AS, *BC, *BL, *BT, *CD, *CE, *CL, *CM, *CR, *CS,
|
||||
*DC, *DL, *DM, *DO, *Ea, *ED, *EI, *K0, *K1, *K2, *K3, *K4, *K5,
|
||||
*K6, *K7, *K8, *K9, *HO, *IC, *IM, *IP, *KD, *KE, *KH, *KL, *KR,
|
||||
*KS, *KU, *LL, *MA, *MB, *MD, *ME, *MH, *MK, *MM, *MO, *MP, *MR,
|
||||
*ND, *NL, *OC, *OP, *RC, *SC, *SE, *SF, *SO, *SP, *SR, *TA, *TE,
|
||||
*TI, *UC, *UE, *UP, *US, *VB, *VI, *VS, *VE, *ab, *af, *al, *dl, *iC,
|
||||
*iP, *sB, *sF, *sf, *sr, *AL_PARM, *DL_PARM, *UP_PARM, *DOWN_PARM,
|
||||
*LEFT_PARM, *RIGHT_PARM;
|
||||
char __tc_pc;
|
||||
char __tc_am, __tc_bs, __tc_cc, __tc_da, __tc_eo,
|
||||
__tc_hc, __tc_hl, __tc_in, __tc_mi, __tc_ms,
|
||||
__tc_nc, __tc_ns, __tc_os, __tc_ul, __tc_ut,
|
||||
__tc_xb, __tc_xn, __tc_xt, __tc_xs, __tc_xx;
|
||||
char __CA;
|
||||
int __tc_pa, __tc_Co, __tc_NC;
|
||||
char *__tc_ac, *__tc_AB, *__tc_ae, *__tc_AF, *__tc_AL,
|
||||
*__tc_al, *__tc_as, *__tc_bc, *__tc_bl, *__tc_bt,
|
||||
*__tc_cd, *__tc_ce, *__tc_cl, *__tc_cm, *__tc_cr,
|
||||
*__tc_cs, *__tc_dc, *__tc_DL, *__tc_dl, *__tc_dm,
|
||||
*__tc_DO, *__tc_do, *__tc_eA, *__tc_ed, *__tc_ei,
|
||||
*__tc_ho, *__tc_Ic, *__tc_ic, *__tc_im, *__tc_Ip,
|
||||
*__tc_ip, *__tc_k0, *__tc_k1, *__tc_k2, *__tc_k3,
|
||||
*__tc_k4, *__tc_k5, *__tc_k6, *__tc_k7, *__tc_k8,
|
||||
*__tc_k9, *__tc_kd, *__tc_ke, *__tc_kh, *__tc_kl,
|
||||
*__tc_kr, *__tc_ks, *__tc_ku, *__tc_LE, *__tc_ll,
|
||||
*__tc_ma, *__tc_mb, *__tc_md, *__tc_me, *__tc_mh,
|
||||
*__tc_mk, *__tc_mm, *__tc_mo, *__tc_mp, *__tc_mr,
|
||||
*__tc_nd, *__tc_nl, *__tc_oc, *__tc_op,
|
||||
*__tc_rc, *__tc_RI, *__tc_Sb, *__tc_sc, *__tc_se,
|
||||
*__tc_SF, *__tc_Sf, *__tc_sf, *__tc_so, *__tc_sp,
|
||||
*__tc_SR, *__tc_sr, *__tc_ta, *__tc_te, *__tc_ti,
|
||||
*__tc_uc, *__tc_ue, *__tc_UP, *__tc_up, *__tc_us,
|
||||
*__tc_vb, *__tc_ve, *__tc_vi, *__tc_vs;
|
||||
/*
|
||||
* Public.
|
||||
*
|
||||
@ -79,7 +93,7 @@ int LINES; /* Lines on the screen. */
|
||||
int COLORS; /* Maximum colors on the screen */
|
||||
int COLOR_PAIRS; /* Maximum color pairs on the screen */
|
||||
int My_term = 0; /* Use Def_term regardless. */
|
||||
const char *Def_term = "unknown"; /* Default terminal type. */
|
||||
char GT; /* Gtty indicates tabs. */
|
||||
char NONL; /* Term can't hack LF doing a CR. */
|
||||
char UPPERCASE; /* Terminal is uppercase only. */
|
||||
const char *Def_term = "unknown"; /* Default terminal type. */
|
||||
char __GT; /* Gtty indicates tabs. */
|
||||
char __NONL; /* Term can't hack LF doing a CR. */
|
||||
char __UPPERCASE; /* Terminal is uppercase only. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: curses.h,v 1.48 2000/05/11 22:50:23 jdc Exp $ */
|
||||
/* $NetBSD: curses.h,v 1.49 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -81,28 +81,6 @@ typedef char bool;
|
||||
#define nocrmode() nocbreak()
|
||||
#define ospeed (cfgetospeed(&__baset))
|
||||
#endif /* _CURSES_PRIVATE */
|
||||
|
||||
extern char GT; /* Gtty indicates tabs. */
|
||||
extern char NONL; /* Term can't hack LF doing a CR. */
|
||||
extern char UPPERCASE; /* Terminal is uppercase only. */
|
||||
|
||||
extern int My_term; /* Use Def_term regardless. */
|
||||
extern const char *Def_term; /* Default terminal type. */
|
||||
|
||||
/* Termcap capabilities. */
|
||||
extern char AM, UT, BS, CA, CC, DA, EO, HC, HL, IN, MI, MS, NC, NS,
|
||||
OS, PC, UL, XB, XN, XT, XS, XX;
|
||||
extern int PA, cO, nc;
|
||||
extern char *AC, *AE, *AL, *AS, *BC, *BL, *BT, *CD, *CE, *CL, *CM,
|
||||
*CR, *CS, *DC, *DL, *DM, *DO, *Ea, *ED, *EI, *K0, *K1,
|
||||
*K2, *K3, *K4, *K5, *K6, *K7, *K8, *K9, *HO, *IC, *IM,
|
||||
*IP, *KD, *KE, *KH, *KL, *KR, *KS, *KU, *LL, *MA, *MB,
|
||||
*MD, *ME, *MH, *MK, *MM, *MO, *MP, *MR, *ND, *NL, *OC,
|
||||
*OP, *RC, *SC, *SE, *SF, *SO, *SP, *SR, *TA, *TE, *TI,
|
||||
*UC, *UE, *UP, *US, *VB, *VI, *VS, *VE, *ab, *af, *al, *dl,
|
||||
*iC, *iP, *sB, *sF, *sf, *sr, *AL_PARM, *DL_PARM, *UP_PARM,
|
||||
*DOWN_PARM, *LEFT_PARM, *RIGHT_PARM;
|
||||
|
||||
/* END BACKWARD COMPATIBILITY ONLY. */
|
||||
|
||||
/* symbols for values returned by getch in keypad mode */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: curses_private.h,v 1.10 2000/05/20 15:12:15 mycroft Exp $ */
|
||||
/* $NetBSD: curses_private.h,v 1.11 2000/12/19 21:34:25 jdc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998-2000 Brett Lymn
|
||||
@ -96,6 +96,41 @@ struct __winlist {
|
||||
struct __winlist *nextp; /* Next window. */
|
||||
};
|
||||
|
||||
/* Private variables. */
|
||||
extern char __GT; /* Gtty indicates tabs. */
|
||||
extern char __NONL; /* Term can't hack LF doing a CR. */
|
||||
extern char __UPPERCASE; /* Terminal is uppercase only. */
|
||||
|
||||
extern int My_term; /* Use Def_term regardless. */
|
||||
extern const char *Def_term; /* Default terminal type. */
|
||||
|
||||
/* Termcap capabilities. */
|
||||
extern char __tc_pc;
|
||||
extern char __tc_am, __tc_bs, __tc_cc, __tc_da, __tc_eo,
|
||||
__tc_hc, __tc_hl, __tc_in, __tc_mi, __tc_ms,
|
||||
__tc_nc, __tc_ns, __tc_os, __tc_ul, __tc_ut,
|
||||
__tc_xb, __tc_xn, __tc_xt, __tc_xs, __tc_xx;
|
||||
extern char __CA;
|
||||
extern int __tc_pa, __tc_Co, __tc_NC;
|
||||
extern char *__tc_ac, *__tc_AB, *__tc_ae, *__tc_AF, *__tc_AL,
|
||||
*__tc_al, *__tc_as, *__tc_bc, *__tc_bl, *__tc_bt,
|
||||
*__tc_cd, *__tc_ce, *__tc_cl, *__tc_cm, *__tc_cr,
|
||||
*__tc_cs, *__tc_dc, *__tc_DL, *__tc_dl, *__tc_dm,
|
||||
*__tc_DO, *__tc_do, *__tc_eA, *__tc_ed, *__tc_ei,
|
||||
*__tc_ho, *__tc_Ic, *__tc_ic, *__tc_im, *__tc_Ip,
|
||||
*__tc_ip, *__tc_k0, *__tc_k1, *__tc_k2, *__tc_k3,
|
||||
*__tc_k4, *__tc_k5, *__tc_k6, *__tc_k7, *__tc_k8,
|
||||
*__tc_k9, *__tc_kd, *__tc_ke, *__tc_kh, *__tc_kl,
|
||||
*__tc_kr, *__tc_ks, *__tc_ku, *__tc_LE, *__tc_ll,
|
||||
*__tc_ma, *__tc_mb, *__tc_md, *__tc_me, *__tc_mh,
|
||||
*__tc_mk, *__tc_mm, *__tc_mo, *__tc_mp, *__tc_mr,
|
||||
*__tc_nd, *__tc_nl, *__tc_oc, *__tc_op,
|
||||
*__tc_rc, *__tc_RI, *__tc_Sb, *__tc_sc, *__tc_se,
|
||||
*__tc_SF, *__tc_Sf, *__tc_sf, *__tc_so, *__tc_sp,
|
||||
*__tc_SR, *__tc_sr, *__tc_ta, *__tc_te, *__tc_ti,
|
||||
*__tc_uc, *__tc_ue, *__tc_UP, *__tc_up, *__tc_us,
|
||||
*__tc_vb, *__tc_ve, *__tc_vi, *__tc_vs;
|
||||
|
||||
/* Private functions. */
|
||||
#ifdef DEBUG
|
||||
void __CTRACE(const char *fmt, ...);
|
||||
@ -142,6 +177,6 @@ extern int __pfast;
|
||||
extern int __rawmode;
|
||||
extern int __noqch;
|
||||
extern attr_t __nca;
|
||||
extern attr_t __mask_OP, __mask_ME, __mask_UE, __mask_SE;
|
||||
extern attr_t __mask_op, __mask_me, __mask_ue, __mask_se;
|
||||
extern struct __winlist *__winlistp;
|
||||
extern WINDOW *__virtscr;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: initscr.c,v 1.19 2000/06/15 21:20:16 jdc Exp $ */
|
||||
/* $NetBSD: initscr.c,v 1.20 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)initscr.c 8.2 (Berkeley) 5/4/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: initscr.c,v 1.19 2000/06/15 21:20:16 jdc Exp $");
|
||||
__RCSID("$NetBSD: initscr.c,v 1.20 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -80,7 +80,7 @@ initscr(void)
|
||||
return (NULL);
|
||||
|
||||
/* Need either homing or cursor motion for refreshes */
|
||||
if (!HO && !CM)
|
||||
if (!__tc_ho && !__tc_cm)
|
||||
return (NULL);
|
||||
|
||||
__winlistp = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: keypad.c,v 1.6 2000/05/25 06:46:26 jdc Exp $ */
|
||||
/* $NetBSD: keypad.c,v 1.7 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998-1999 Brett Lymn (blymn@baea.com.au, brett_lymn@yahoo.com)
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: keypad.c,v 1.6 2000/05/25 06:46:26 jdc Exp $");
|
||||
__RCSID("$NetBSD: keypad.c,v 1.7 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "curses.h"
|
||||
@ -48,7 +48,7 @@ keypad(WINDOW *win, bool bf)
|
||||
if (bf) {
|
||||
win->flags |= __KEYPAD;
|
||||
if (!(curscr->flags & __KEYPAD)) {
|
||||
tputs (KS, 0, __cputchar);
|
||||
tputs (__tc_ks, 0, __cputchar);
|
||||
curscr->flags |= __KEYPAD;
|
||||
}
|
||||
} else
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: meta.c,v 1.2 2000/04/24 14:09:44 blymn Exp $ */
|
||||
/* $NetBSD: meta.c,v 1.3 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998-2000 Brett Lymn
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: meta.c,v 1.2 2000/04/24 14:09:44 blymn Exp $");
|
||||
__RCSID("$NetBSD: meta.c,v 1.3 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "curses.h"
|
||||
@ -47,19 +47,19 @@ int
|
||||
meta(/*ARGSUSED*/ WINDOW *win, bool bf)
|
||||
{
|
||||
if (bf == TRUE) {
|
||||
if (MM != NULL) {
|
||||
if (__tc_mm != NULL) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("meta: TRUE\n");
|
||||
#endif
|
||||
tputs(MM, 0, __cputchar);
|
||||
tputs(__tc_mm, 0, __cputchar);
|
||||
meta_state = TRUE;
|
||||
}
|
||||
} else {
|
||||
if (MO != NULL) {
|
||||
if (__tc_mo != NULL) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("meta: FALSE\n");
|
||||
#endif
|
||||
tputs(MO, 0, __cputchar);
|
||||
tputs(__tc_mo, 0, __cputchar);
|
||||
meta_state = FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pause.c,v 1.1 2000/05/11 22:49:13 jdc Exp $ */
|
||||
/* $NetBSD: pause.c,v 1.2 2000/12/19 21:34:25 jdc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: pause.c,v 1.1 2000/05/11 22:49:13 jdc Exp $");
|
||||
__RCSID("$NetBSD: pause.c,v 1.2 2000/12/19 21:34:25 jdc Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <stdarg.h>
|
||||
@ -77,7 +77,7 @@ delay_output(int ms)
|
||||
#ifdef DEBUG
|
||||
__CTRACE ("delay_output: %d\n", ms);
|
||||
#endif
|
||||
if (!PC)
|
||||
if (!__tc_pc)
|
||||
return(napms(ms));
|
||||
|
||||
if (asprintf(&delstr, "%d", ms) == -1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: refresh.c,v 1.40 2000/08/02 10:50:49 itojun Exp $ */
|
||||
/* $NetBSD: refresh.c,v 1.41 2000/12/19 21:34:25 jdc 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.40 2000/08/02 10:50:49 itojun Exp $");
|
||||
__RCSID("$NetBSD: refresh.c,v 1.41 2000/12/19 21:34:25 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -240,7 +240,7 @@ doupdate(void)
|
||||
if ((win->flags & __CLEAROK) || (curscr->flags & __CLEAROK) || curwin) {
|
||||
if (curscr->wattr & __COLOR)
|
||||
__unsetattr(0);
|
||||
tputs(CL, 0, __cputchar);
|
||||
tputs(__tc_cl, 0, __cputchar);
|
||||
ly = 0;
|
||||
lx = 0;
|
||||
if (!curwin) {
|
||||
@ -252,7 +252,7 @@ doupdate(void)
|
||||
__touchwin(win);
|
||||
win->flags &= ~__CLEAROK;
|
||||
}
|
||||
if (!CA) {
|
||||
if (!__CA) {
|
||||
if (win->curx != 0)
|
||||
__cputchar('\n');
|
||||
if (!curwin)
|
||||
@ -408,7 +408,7 @@ makech(wy)
|
||||
csp = &curscr->lines[wy]->line[wx];
|
||||
|
||||
nsp = &win->lines[wy]->line[wx];
|
||||
if (CE && !curwin) {
|
||||
if (__tc_ce && !curwin) {
|
||||
cp = &win->lines[wy]->line[win->maxx - 1];
|
||||
lspc = cp->attr & __COLOR;
|
||||
while (cp->ch == ' ' && cp->attr == lspc)
|
||||
@ -417,7 +417,7 @@ makech(wy)
|
||||
nlsp = cp - win->lines[wy]->line;
|
||||
}
|
||||
if (!curwin)
|
||||
ce = CE;
|
||||
ce = __tc_ce;
|
||||
else
|
||||
ce = NULL;
|
||||
|
||||
@ -457,11 +457,11 @@ makech(wy)
|
||||
__CTRACE("makech: clsp = %d, nlsp = %d\n",
|
||||
clsp, nlsp);
|
||||
#endif
|
||||
if (((clsp - nlsp >= strlen(CE) &&
|
||||
if (((clsp - nlsp >= strlen(__tc_ce) &&
|
||||
clsp < win->maxx * __LDATASIZE) ||
|
||||
wy == win->maxy - 1) &&
|
||||
(!(lspc & __COLOR) ||
|
||||
((lspc & __COLOR) && UT))) {
|
||||
((lspc & __COLOR) && __tc_ut))) {
|
||||
__unsetattr(0);
|
||||
if ((lspc & __COLOR) !=
|
||||
(curscr->wattr & __COLOR)) {
|
||||
@ -469,7 +469,7 @@ makech(wy)
|
||||
curscr->wattr &= ~__COLOR;
|
||||
curscr->wattr |= lspc & __COLOR;
|
||||
}
|
||||
tputs(CE, 0, __cputchar);
|
||||
tputs(__tc_ce, 0, __cputchar);
|
||||
lx = wx + win->begx;
|
||||
while (wx++ <= clsp) {
|
||||
csp->ch = ' ';
|
||||
@ -488,11 +488,11 @@ makech(wy)
|
||||
*/
|
||||
if (!(nsp->attr & __COLOR) &&
|
||||
(curscr->wattr & __COLOR)) {
|
||||
if (OC != NULL && CC == NULL)
|
||||
tputs(OC, 0, __cputchar);
|
||||
if (OP != NULL) {
|
||||
tputs(OP, 0, __cputchar);
|
||||
curscr->wattr &= __mask_OP;
|
||||
if (__tc_oc != NULL && __tc_cc == NULL)
|
||||
tputs(__tc_oc, 0, __cputchar);
|
||||
if (__tc_op != NULL) {
|
||||
tputs(__tc_op, 0, __cputchar);
|
||||
curscr->wattr &= __mask_op;
|
||||
}
|
||||
}
|
||||
|
||||
@ -505,10 +505,10 @@ makech(wy)
|
||||
* 'mp' and 'mr'). Check to see if we also turn off
|
||||
* standout, attributes and colour.
|
||||
*/
|
||||
if (off & __TERMATTR && ME != NULL) {
|
||||
tputs(ME, 0, __cputchar);
|
||||
curscr->wattr &= __mask_ME;
|
||||
off &= __mask_ME;
|
||||
if (off & __TERMATTR && __tc_me != NULL) {
|
||||
tputs(__tc_me, 0, __cputchar);
|
||||
curscr->wattr &= __mask_me;
|
||||
off &= __mask_me;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -516,10 +516,10 @@ makech(wy)
|
||||
* Check to see if we also turn off standout,
|
||||
* attributes and colour.
|
||||
*/
|
||||
if (off & __UNDERSCORE && UE != NULL) {
|
||||
tputs(UE, 0, __cputchar);
|
||||
curscr->wattr &= __mask_UE;
|
||||
off &= __mask_UE;
|
||||
if (off & __UNDERSCORE && __tc_ue != NULL) {
|
||||
tputs(__tc_ue, 0, __cputchar);
|
||||
curscr->wattr &= __mask_ue;
|
||||
off &= __mask_ue;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -527,16 +527,16 @@ makech(wy)
|
||||
* Check to see if we also turn off underscore,
|
||||
* attributes and colour.
|
||||
* XXX
|
||||
* Should use UC if SO/SE not available.
|
||||
* Should use uc if so/se not available.
|
||||
*/
|
||||
if (off & __STANDOUT && SE != NULL) {
|
||||
tputs(SE, 0, __cputchar);
|
||||
curscr->wattr &= __mask_SE;
|
||||
off &= __mask_SE;
|
||||
if (off & __STANDOUT && __tc_se != NULL) {
|
||||
tputs(__tc_se, 0, __cputchar);
|
||||
curscr->wattr &= __mask_se;
|
||||
off &= __mask_se;
|
||||
}
|
||||
|
||||
if (off & __ALTCHARSET && AE != NULL) {
|
||||
tputs(AE, 0, __cputchar);
|
||||
if (off & __ALTCHARSET && __tc_ae != NULL) {
|
||||
tputs(__tc_ae, 0, __cputchar);
|
||||
curscr->wattr &= ~__ALTCHARSET;
|
||||
}
|
||||
|
||||
@ -545,54 +545,56 @@ makech(wy)
|
||||
/*
|
||||
* Enter standout mode if appropriate.
|
||||
*/
|
||||
if (on & __STANDOUT && SO != NULL && SE != NULL) {
|
||||
tputs(SO, 0, __cputchar);
|
||||
if (on & __STANDOUT && __tc_so != NULL && __tc_se
|
||||
!= NULL) {
|
||||
tputs(__tc_so, 0, __cputchar);
|
||||
curscr->wattr |= __STANDOUT;
|
||||
}
|
||||
|
||||
/*
|
||||
* Enter underscore mode if appropriate.
|
||||
* XXX
|
||||
* Should use UC if US/UE not available.
|
||||
* Should use uc if us/ue not available.
|
||||
*/
|
||||
if (on & __UNDERSCORE && US != NULL && UE != NULL) {
|
||||
tputs(US, 0, __cputchar);
|
||||
if (on & __UNDERSCORE && __tc_us != NULL &&
|
||||
__tc_ue != NULL) {
|
||||
tputs(__tc_us, 0, __cputchar);
|
||||
curscr->wattr |= __UNDERSCORE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set other attributes as appropriate.
|
||||
*/
|
||||
if (ME != NULL) {
|
||||
if (on & __BLINK && MB != NULL) {
|
||||
tputs(MB, 0, __cputchar);
|
||||
if (__tc_me != NULL) {
|
||||
if (on & __BLINK && __tc_mb != NULL) {
|
||||
tputs(__tc_mb, 0, __cputchar);
|
||||
curscr->wattr |= __BLINK;
|
||||
}
|
||||
if (on & __BOLD && MD != NULL) {
|
||||
tputs(MD, 0, __cputchar);
|
||||
if (on & __BOLD && __tc_md != NULL) {
|
||||
tputs(__tc_md, 0, __cputchar);
|
||||
curscr->wattr |= __BOLD;
|
||||
}
|
||||
if (on & __DIM && MH != NULL) {
|
||||
tputs(MH, 0, __cputchar);
|
||||
if (on & __DIM && __tc_mh != NULL) {
|
||||
tputs(__tc_mh, 0, __cputchar);
|
||||
curscr->wattr |= __DIM;
|
||||
}
|
||||
if (on & __BLANK && MK != NULL) {
|
||||
tputs(MK, 0, __cputchar);
|
||||
if (on & __BLANK && __tc_mk != NULL) {
|
||||
tputs(__tc_mk, 0, __cputchar);
|
||||
curscr->wattr |= __BLANK;
|
||||
}
|
||||
if (on & __PROTECT && MP != NULL) {
|
||||
tputs(MP, 0, __cputchar);
|
||||
if (on & __PROTECT && __tc_mp != NULL) {
|
||||
tputs(__tc_mp, 0, __cputchar);
|
||||
curscr->wattr |= __PROTECT;
|
||||
}
|
||||
if (on & __REVERSE && MR != NULL) {
|
||||
tputs(MR, 0, __cputchar);
|
||||
if (on & __REVERSE && __tc_mr != NULL) {
|
||||
tputs(__tc_mr, 0, __cputchar);
|
||||
curscr->wattr |= __REVERSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set/change colour as appropriate. */
|
||||
if ((nsp->attr & __COLOR) &&
|
||||
cO != NULL && (OC != NULL || OP != NULL)) {
|
||||
if ((nsp->attr & __COLOR) && __tc_Co != NULL &&
|
||||
(__tc_oc != NULL || __tc_op != NULL)) {
|
||||
if ((nsp->attr & __COLOR) !=
|
||||
(curscr->wattr & __COLOR)) {
|
||||
__set_color(nsp->attr);
|
||||
@ -603,8 +605,9 @@ makech(wy)
|
||||
}
|
||||
|
||||
/* Enter/exit altcharset mode as appropriate. */
|
||||
if (on & __ALTCHARSET && AS != NULL && AE != NULL) {
|
||||
tputs(AS, 0, __cputchar);
|
||||
if (on & __ALTCHARSET && __tc_as != NULL &&
|
||||
__tc_ae != NULL) {
|
||||
tputs(__tc_as, 0, __cputchar);
|
||||
curscr->wattr |= __ALTCHARSET;
|
||||
}
|
||||
|
||||
@ -644,10 +647,10 @@ makech(wy)
|
||||
#ifdef DEBUG
|
||||
__CTRACE("makech: putchar(%c)\n", nsp->ch & 0177);
|
||||
#endif
|
||||
if (UC && ((nsp->attr & __STANDOUT) ||
|
||||
if (__tc_uc && ((nsp->attr & __STANDOUT) ||
|
||||
(nsp->attr & __UNDERSCORE))) {
|
||||
__cputchar('\b');
|
||||
tputs(UC, 0, __cputchar);
|
||||
tputs(__tc_uc, 0, __cputchar);
|
||||
}
|
||||
nsp++;
|
||||
#ifdef DEBUG
|
||||
@ -657,7 +660,7 @@ makech(wy)
|
||||
if (lx == wx) /* If no change. */
|
||||
break;
|
||||
lx = wx;
|
||||
if (lx >= COLS && AM)
|
||||
if (lx >= COLS && __tc_am)
|
||||
lx = COLS - 1;
|
||||
else
|
||||
if (wx >= win->maxx) {
|
||||
@ -972,13 +975,13 @@ scrolln(starts, startw, curs, bot, top)
|
||||
/*
|
||||
* XXX
|
||||
* The initial tests that set __noqch don't let us reach here unless
|
||||
* we have either CS + HO + SF/sf/SR/sr, or AL + DL. SF/sf and SR/sr
|
||||
* we have either cs + ho + SF/sf/SR/sr, or AL + DL. SF/sf and SR/sr
|
||||
* scrolling can only shift the entire scrolling region, not just a
|
||||
* part of it, which means that the quickch() routine is going to be
|
||||
* sadly disappointed in us if we don't have CS as well.
|
||||
* sadly disappointed in us if we don't have cs as well.
|
||||
*
|
||||
* If CS, HO and SF/sf are set, can use the scrolling region. Because
|
||||
* the cursor position after CS is undefined, we need HO which gives us
|
||||
* If cs, ho and SF/sf are set, can use the scrolling region. Because
|
||||
* the cursor position after cs is undefined, we need ho which gives us
|
||||
* the ability to move to somewhere without knowledge of the current
|
||||
* location of the cursor. Still call __mvcur() anyway, to update its
|
||||
* idea of where the cursor is.
|
||||
@ -987,60 +990,63 @@ scrolln(starts, startw, curs, bot, top)
|
||||
* last line of the region to make the scroll happen.
|
||||
*
|
||||
* Doing SF/SR or AL/DL appears faster on the screen than either sf/sr
|
||||
* or al/dl, and, some terminals have AL/DL, sf/sr, and CS, but not
|
||||
* or AL/DL, and, some terminals have AL/DL, sf/sr, and cs, but not
|
||||
* SF/SR. So, if we're scrolling almost all of the screen, try and use
|
||||
* AL/DL, otherwise use the scrolling region. The "almost all" is a
|
||||
* shameless hack for vi.
|
||||
*/
|
||||
if (n > 0) {
|
||||
if (CS != NULL && HO != NULL && (SF != NULL ||
|
||||
((AL == NULL || DL == NULL ||
|
||||
top > 3 || bot + 3 < __virtscr->maxy) && sf != NULL))) {
|
||||
tputs(__tscroll(CS, top, bot + 1), 0, __cputchar);
|
||||
if (__tc_cs != NULL && __tc_ho != NULL && (__tc_SF != NULL ||
|
||||
((__tc_AL == NULL || __tc_DL == NULL ||
|
||||
top > 3 || bot + 3 < __virtscr->maxy) &&
|
||||
__tc_sf != NULL))) {
|
||||
tputs(__tscroll(__tc_cs, top, bot + 1), 0, __cputchar);
|
||||
__mvcur(oy, ox, 0, 0, 1);
|
||||
tputs(HO, 0, __cputchar);
|
||||
tputs(__tc_ho, 0, __cputchar);
|
||||
__mvcur(0, 0, bot, 0, 1);
|
||||
if (SF != NULL)
|
||||
tputs(__tscroll(SF, n, 0), 0, __cputchar);
|
||||
if (__tc_SF != NULL)
|
||||
tputs(__tscroll(__tc_SF, n, 0), 0, __cputchar);
|
||||
else
|
||||
for (i = 0; i < n; i++)
|
||||
tputs(sf, 0, __cputchar);
|
||||
tputs(__tscroll(CS, 0, (int) __virtscr->maxy), 0, __cputchar);
|
||||
tputs(__tc_sf, 0, __cputchar);
|
||||
tputs(__tscroll(__tc_cs, 0, (int) __virtscr->maxy), 0,
|
||||
__cputchar);
|
||||
__mvcur(bot, 0, 0, 0, 1);
|
||||
tputs(HO, 0, __cputchar);
|
||||
tputs(__tc_ho, 0, __cputchar);
|
||||
__mvcur(0, 0, oy, ox, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Scroll up the block. */
|
||||
if (SF != NULL && top == 0) {
|
||||
if (__tc_SF != NULL && top == 0) {
|
||||
__mvcur(oy, ox, bot, 0, 1);
|
||||
tputs(__tscroll(SF, n, 0), 0, __cputchar);
|
||||
tputs(__tscroll(__tc_SF, n, 0), 0, __cputchar);
|
||||
} else
|
||||
if (DL != NULL) {
|
||||
if (__tc_DL != NULL) {
|
||||
__mvcur(oy, ox, top, 0, 1);
|
||||
tputs(__tscroll(DL, n, 0), 0, __cputchar);
|
||||
tputs(__tscroll(__tc_DL, n, 0), 0, __cputchar);
|
||||
} else
|
||||
if (dl != NULL) {
|
||||
if (__tc_dl != NULL) {
|
||||
__mvcur(oy, ox, top, 0, 1);
|
||||
for (i = 0; i < n; i++)
|
||||
tputs(dl, 0, __cputchar);
|
||||
tputs(__tc_dl, 0, __cputchar);
|
||||
} else
|
||||
if (sf != NULL && top == 0) {
|
||||
if (__tc_sf != NULL && top == 0) {
|
||||
__mvcur(oy, ox, bot, 0, 1);
|
||||
for (i = 0; i < n; i++)
|
||||
tputs(sf, 0, __cputchar);
|
||||
tputs(__tc_sf, 0,
|
||||
__cputchar);
|
||||
} else
|
||||
abort();
|
||||
|
||||
/* Push down the bottom region. */
|
||||
__mvcur(top, 0, bot - n + 1, 0, 1);
|
||||
if (AL != NULL)
|
||||
tputs(__tscroll(AL, n, 0), 0, __cputchar);
|
||||
if (__tc_AL != NULL)
|
||||
tputs(__tscroll(__tc_AL, n, 0), 0, __cputchar);
|
||||
else
|
||||
if (al != NULL)
|
||||
if (__tc_al != NULL)
|
||||
for (i = 0; i < n; i++)
|
||||
tputs(al, 0, __cputchar);
|
||||
tputs(__tc_al, 0, __cputchar);
|
||||
else
|
||||
abort();
|
||||
__mvcur(bot - n + 1, 0, oy, ox, 1);
|
||||
@ -1049,55 +1055,58 @@ scrolln(starts, startw, curs, bot, top)
|
||||
* !!!
|
||||
* n < 0
|
||||
*
|
||||
* If CS, HO and SR/sr are set, can use the scrolling region.
|
||||
* If cs, ho and SR/sr are set, can use the scrolling region.
|
||||
* See the above comments for details.
|
||||
*/
|
||||
if (CS != NULL && HO != NULL && (SR != NULL ||
|
||||
((AL == NULL || DL == NULL ||
|
||||
top > 3 || bot + 3 < __virtscr->maxy) && sr != NULL))) {
|
||||
tputs(__tscroll(CS, top, bot + 1), 0, __cputchar);
|
||||
if (__tc_cs != NULL && __tc_ho != NULL && (__tc_SR != NULL ||
|
||||
((__tc_AL == NULL || __tc_DL == NULL || top > 3 ||
|
||||
bot + 3 < __virtscr->maxy) && __tc_sr != NULL))) {
|
||||
tputs(__tscroll(__tc_cs, top, bot + 1), 0, __cputchar);
|
||||
__mvcur(oy, ox, 0, 0, 1);
|
||||
tputs(HO, 0, __cputchar);
|
||||
tputs(__tc_ho, 0, __cputchar);
|
||||
__mvcur(0, 0, top, 0, 1);
|
||||
|
||||
if (SR != NULL)
|
||||
tputs(__tscroll(SR, -n, 0), 0, __cputchar);
|
||||
if (__tc_SR != NULL)
|
||||
tputs(__tscroll(__tc_SR, -n, 0), 0, __cputchar);
|
||||
else
|
||||
for (i = n; i < 0; i++)
|
||||
tputs(sr, 0, __cputchar);
|
||||
tputs(__tscroll(CS, 0, (int) __virtscr->maxy), 0, __cputchar);
|
||||
tputs(__tc_sr, 0, __cputchar);
|
||||
tputs(__tscroll(__tc_cs, 0, (int) __virtscr->maxy), 0,
|
||||
__cputchar);
|
||||
__mvcur(top, 0, 0, 0, 1);
|
||||
tputs(HO, 0, __cputchar);
|
||||
tputs(__tc_ho, 0, __cputchar);
|
||||
__mvcur(0, 0, oy, ox, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Preserve the bottom lines. */
|
||||
__mvcur(oy, ox, bot + n + 1, 0, 1);
|
||||
if (SR != NULL && bot == __virtscr->maxy)
|
||||
tputs(__tscroll(SR, -n, 0), 0, __cputchar);
|
||||
if (__tc_SR != NULL && bot == __virtscr->maxy)
|
||||
tputs(__tscroll(__tc_SR, -n, 0), 0, __cputchar);
|
||||
else
|
||||
if (DL != NULL)
|
||||
tputs(__tscroll(DL, -n, 0), 0, __cputchar);
|
||||
if (__tc_DL != NULL)
|
||||
tputs(__tscroll(__tc_DL, -n, 0), 0, __cputchar);
|
||||
else
|
||||
if (dl != NULL)
|
||||
if (__tc_dl != NULL)
|
||||
for (i = n; i < 0; i++)
|
||||
tputs(dl, 0, __cputchar);
|
||||
tputs(__tc_dl, 0, __cputchar);
|
||||
else
|
||||
if (sr != NULL && bot == __virtscr->maxy)
|
||||
if (__tc_sr != NULL &&
|
||||
bot == __virtscr->maxy)
|
||||
for (i = n; i < 0; i++)
|
||||
tputs(sr, 0, __cputchar);
|
||||
tputs(__tc_sr, 0,
|
||||
__cputchar);
|
||||
else
|
||||
abort();
|
||||
|
||||
/* Scroll the block down. */
|
||||
__mvcur(bot + n + 1, 0, top, 0, 1);
|
||||
if (AL != NULL)
|
||||
tputs(__tscroll(AL, -n, 0), 0, __cputchar);
|
||||
if (__tc_AL != NULL)
|
||||
tputs(__tscroll(__tc_AL, -n, 0), 0, __cputchar);
|
||||
else
|
||||
if (al != NULL)
|
||||
if (__tc_al != NULL)
|
||||
for (i = n; i < 0; i++)
|
||||
tputs(al, 0, __cputchar);
|
||||
tputs(__tc_al, 0, __cputchar);
|
||||
else
|
||||
abort();
|
||||
__mvcur(top, 0, oy, ox, 1);
|
||||
@ -1107,7 +1116,7 @@ scrolln(starts, startw, curs, bot, top)
|
||||
/*
|
||||
* __unsetattr --
|
||||
* Unset attributes on curscr. Leave standout, attribute and colour
|
||||
* modes if necessary (!MS). Always leave altcharset (xterm at least
|
||||
* modes if necessary (!ms). Always leave altcharset (xterm at least
|
||||
* ignores a cursor move if we don't).
|
||||
*/
|
||||
void /* ARGSUSED */
|
||||
@ -1116,7 +1125,7 @@ __unsetattr(int checkms)
|
||||
int isms;
|
||||
|
||||
if (checkms)
|
||||
if (!MS) {
|
||||
if (!__tc_ms) {
|
||||
isms = 1;
|
||||
} else {
|
||||
isms = 0;
|
||||
@ -1124,47 +1133,47 @@ __unsetattr(int checkms)
|
||||
else
|
||||
isms = 1;
|
||||
#ifdef DEBUG
|
||||
__CTRACE("__unsetattr: checkms = %d, MS = %s, wattr = %08x\n",
|
||||
checkms, MS ? "TRUE" : "FALSE", curscr->wattr);
|
||||
__CTRACE("__unsetattr: checkms = %d, ms = %s, wattr = %08x\n",
|
||||
checkms, __tc_ms ? "TRUE" : "FALSE", curscr->wattr);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Don't leave the screen in standout mode (check against MS). Check
|
||||
* Don't leave the screen in standout mode (check against ms). Check
|
||||
* to see if we also turn off underscore, attributes and colour.
|
||||
*/
|
||||
if (curscr->wattr & __STANDOUT && isms) {
|
||||
tputs(SE, 0, __cputchar);
|
||||
curscr->wattr &= __mask_SE;
|
||||
tputs(__tc_se, 0, __cputchar);
|
||||
curscr->wattr &= __mask_se;
|
||||
}
|
||||
/*
|
||||
* Don't leave the screen in underscore mode (check against MS).
|
||||
* Don't leave the screen in underscore mode (check against ms).
|
||||
* Check to see if we also turn off attributes. Assume that we
|
||||
* also turn off colour.
|
||||
*/
|
||||
if (curscr->wattr & __UNDERSCORE && isms) {
|
||||
tputs(UE, 0, __cputchar);
|
||||
curscr->wattr &= __mask_UE;
|
||||
tputs(__tc_ue, 0, __cputchar);
|
||||
curscr->wattr &= __mask_ue;
|
||||
}
|
||||
/*
|
||||
* Don't leave the screen with attributes set (check against MS).
|
||||
* Don't leave the screen with attributes set (check against ms).
|
||||
* Assume that also turn off colour.
|
||||
*/
|
||||
if (curscr->wattr & __TERMATTR && isms) {
|
||||
tputs(ME, 0, __cputchar);
|
||||
curscr->wattr &= __mask_ME;
|
||||
tputs(__tc_me, 0, __cputchar);
|
||||
curscr->wattr &= __mask_me;
|
||||
}
|
||||
/* Don't leave the screen with altcharset set (don't check MS). */
|
||||
/* Don't leave the screen with altcharset set (don't check ms). */
|
||||
if (curscr->wattr & __ALTCHARSET) {
|
||||
tputs(AE, 0, __cputchar);
|
||||
tputs(__tc_ae, 0, __cputchar);
|
||||
curscr->wattr &= ~__ALTCHARSET;
|
||||
}
|
||||
/* Don't leave the screen with colour set (check against MS). */
|
||||
/* Don't leave the screen with colour set (check against ms). */
|
||||
if (curscr->wattr & __COLOR && isms) {
|
||||
if (OC != NULL && CC == NULL)
|
||||
tputs(OC, 0, __cputchar);
|
||||
if (OP != NULL) {
|
||||
tputs(OP, 0, __cputchar);
|
||||
curscr->wattr &= __mask_OP;
|
||||
if (__tc_oc != NULL && __tc_cc == NULL)
|
||||
tputs(__tc_oc, 0, __cputchar);
|
||||
if (__tc_op != NULL) {
|
||||
tputs(__tc_op, 0, __cputchar);
|
||||
curscr->wattr &= __mask_op;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: scroll.c,v 1.13 2000/08/01 04:17:10 itojun Exp $ */
|
||||
/* $NetBSD: scroll.c,v 1.14 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)scroll.c 8.3 (Berkeley) 5/4/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: scroll.c,v 1.13 2000/08/01 04:17:10 itojun Exp $");
|
||||
__RCSID("$NetBSD: scroll.c,v 1.14 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -94,7 +94,7 @@ wscrl(WINDOW *win, int lines)
|
||||
|
||||
if (win == curscr) {
|
||||
__cputchar('\n');
|
||||
if (!NONL)
|
||||
if (!__NONL)
|
||||
win->curx = 0;
|
||||
#ifdef DEBUG
|
||||
__CTRACE("scroll: win == curscr\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: setterm.c,v 1.26 2000/06/12 21:04:08 jdc Exp $ */
|
||||
/* $NetBSD: setterm.c,v 1.27 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: setterm.c,v 1.26 2000/06/12 21:04:08 jdc Exp $");
|
||||
__RCSID("$NetBSD: setterm.c,v 1.27 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -57,42 +57,58 @@ static int zap(struct tinfo *tinfo);
|
||||
struct tinfo *_cursesi_genbuf;
|
||||
|
||||
static char *sflags[] = {
|
||||
/* am ut bs cc da eo hc hl */
|
||||
&AM, &UT, &BS, &CC, &DA, &EO, &HC, &HL,
|
||||
/* in mi ms nc ns os ul xb */
|
||||
&IN, &MI, &MS, &NC, &NS, &OS, &UL, &XB,
|
||||
/* xn xt xs xx */
|
||||
&XN, &XT, &XS, &XX
|
||||
/* am bs cc da eo */
|
||||
&__tc_am, &__tc_bs, &__tc_cc, &__tc_da, &__tc_eo,
|
||||
/* hc hl in mi ms */
|
||||
&__tc_hc, &__tc_hl, &__tc_in, &__tc_mi, &__tc_ms,
|
||||
/* nc ns os ul ut */
|
||||
&__tc_nc, &__tc_ns, &__tc_os, &__tc_ul, &__tc_ut,
|
||||
/* xb xn xt xs xx */
|
||||
&__tc_xb, &__tc_xn, &__tc_xt, &__tc_xs, &__tc_xx
|
||||
};
|
||||
|
||||
static int *svals[] = {
|
||||
/* pa Co */
|
||||
&PA, &cO, &nc
|
||||
/* pa Co NC */
|
||||
&__tc_pa, &__tc_Co, &__tc_NC
|
||||
};
|
||||
static char *_PC,
|
||||
**sstrs[] = {
|
||||
/* AC AE AL AS bc bl bt cd ce */
|
||||
&AC, &AE, &AL, &AS, &BC, &BL, &BT, &CD, &CE,
|
||||
/* cl cm cr cs dc DL dm do eA */
|
||||
&CL, &CM, &CR, &CS, &DC, &DL, &DM, &DO, &Ea,
|
||||
/* ed ei k0 k1 k2 k3 k4 k5 k6 */
|
||||
&ED, &EI, &K0, &K1, &K2, &K3, &K4, &K5, &K6,
|
||||
/* k7 k8 k9 ho ic im ip kd ke */
|
||||
&K7, &K8, &K9, &HO, &IC, &IM, &IP, &KD, &KE,
|
||||
/* kh kl kr ks ku ll ma mb md */
|
||||
&KH, &KL, &KR, &KS, &KU, &LL, &MA, &MB, &MD,
|
||||
/* me mh mk mm mo mp mr nd nl */
|
||||
&ME, &MH, &MK, &MM, &MO, &MP, &MR, &ND, &NL,
|
||||
/* oc op pc rc sc se SF so sp */
|
||||
&OC, &OP, &_PC, &RC, &SC, &SE, &SF, &SO, &SP,
|
||||
/* SR ta te ti uc ue up us vb */
|
||||
&SR, &TA, &TE, &TI, &UC, &UE, &UP, &US, &VB,
|
||||
/* vi vs ve AB AF al dl Ic Ip */
|
||||
&VI, &VS, &VE, &ab, &af, &al, &dl, &iC, &iP,
|
||||
/* Sb Sf sf sr AL DL UP */
|
||||
&sB, &sF, &sf, &sr, &AL_PARM, &DL_PARM, &UP_PARM,
|
||||
/* DO LE RI */
|
||||
&DOWN_PARM, &LEFT_PARM, &RIGHT_PARM,
|
||||
/* AB ac ae AF AL */
|
||||
&__tc_AB, &__tc_ac, &__tc_ae, &__tc_AF, &__tc_AL,
|
||||
/* al as bc bl bt */
|
||||
&__tc_al, &__tc_as, &__tc_bc, &__tc_bl, &__tc_bt,
|
||||
/* cd ce cl cm cr */
|
||||
&__tc_cd, &__tc_ce, &__tc_cl, &__tc_cm, &__tc_cr,
|
||||
/* cs dc DL dl dm */
|
||||
&__tc_cs, &__tc_dc, &__tc_DL, &__tc_dl, &__tc_dm,
|
||||
/* DO do eA ed ei */
|
||||
&__tc_DO, &__tc_do, &__tc_eA, &__tc_ed, &__tc_ei,
|
||||
/* ho Ic ic im Ip */
|
||||
&__tc_ho, &__tc_Ic, &__tc_ic, &__tc_im, &__tc_Ip,
|
||||
/* ip k0 k1 k2 k3 */
|
||||
&__tc_ip, &__tc_k0, &__tc_k1, &__tc_k2, &__tc_k3,
|
||||
/* k4 k5 k6 k7 k8 */
|
||||
&__tc_k4, &__tc_k5, &__tc_k6, &__tc_k7, &__tc_k8,
|
||||
/* k9 kd ke kh kl */
|
||||
&__tc_k9, &__tc_kd, &__tc_ke, &__tc_kh, &__tc_kl,
|
||||
/* kr ks ku LE ll */
|
||||
&__tc_kr, &__tc_ks, &__tc_ku, &__tc_LE, &__tc_ll,
|
||||
/* ma mb md me mh */
|
||||
&__tc_ma, &__tc_mb, &__tc_md, &__tc_me, &__tc_mh,
|
||||
/* mk mm mo mp mr */
|
||||
&__tc_mk, &__tc_mm, &__tc_mo, &__tc_mp, &__tc_mr,
|
||||
/* nd nl oc op pc */
|
||||
&__tc_nd, &__tc_nl, &__tc_oc, &__tc_op, &_PC,
|
||||
/* rc RI sc Sb se */
|
||||
&__tc_rc, &__tc_RI, &__tc_Sb, &__tc_sc, &__tc_se,
|
||||
/* SF Sf sf so sp */
|
||||
&__tc_SF, &__tc_Sf, &__tc_sf, &__tc_so, &__tc_sp,
|
||||
/* SR sr ta te ti */
|
||||
&__tc_SR, &__tc_sr, &__tc_ta, &__tc_te, &__tc_ti,
|
||||
/* uc ue UP up us */
|
||||
&__tc_uc, &__tc_ue, &__tc_UP, &__tc_up, &__tc_us,
|
||||
/* vb ve vi vs */
|
||||
&__tc_vb, &__tc_ve, &__tc_vi, &__tc_vs
|
||||
};
|
||||
|
||||
static char *aoftspace; /* Address of _tspace for relocation */
|
||||
@ -100,7 +116,7 @@ static char *tspace; /* Space for capability strings */
|
||||
static size_t tspace_size; /* size of tspace */
|
||||
|
||||
char *ttytype;
|
||||
attr_t __mask_OP, __mask_ME, __mask_UE, __mask_SE;
|
||||
attr_t __mask_op, __mask_me, __mask_ue, __mask_se;
|
||||
|
||||
int
|
||||
setterm(char *type)
|
||||
@ -162,20 +178,20 @@ setterm(char *type)
|
||||
}
|
||||
|
||||
/* If we can't tab, we can't backtab, either. */
|
||||
if (!GT)
|
||||
BT = NULL;
|
||||
if (!__GT)
|
||||
__tc_bt = NULL;
|
||||
|
||||
/*
|
||||
* Test for cursor motion capability.
|
||||
*
|
||||
*/
|
||||
if (t_goto(NULL, CM, 0, 0, cm_buff, 1023) < 0) {
|
||||
CA = 0;
|
||||
CM = 0;
|
||||
if (t_goto(NULL, __tc_cm, 0, 0, cm_buff, 1023) < 0) {
|
||||
__CA = 0;
|
||||
__tc_cm = 0;
|
||||
} else
|
||||
CA = 1;
|
||||
__CA = 1;
|
||||
|
||||
PC = _PC ? _PC[0] : 0;
|
||||
__tc_pc = _PC ? _PC[0] : 0;
|
||||
aoftspace = tspace;
|
||||
if (unknown) {
|
||||
strcpy(ttytype, "dumb");
|
||||
@ -189,46 +205,46 @@ setterm(char *type)
|
||||
|
||||
/* If no scrolling commands, no quick change. */
|
||||
__noqch =
|
||||
(CS == NULL || HO == NULL ||
|
||||
(SF == NULL && sf == NULL) || (SR == NULL && sr == NULL)) &&
|
||||
((AL == NULL && al == NULL) || (DL == NULL && dl == NULL));
|
||||
(__tc_cs == NULL || __tc_ho == NULL ||
|
||||
(__tc_SF == NULL && __tc_sf == NULL) || (__tc_SR == NULL && __tc_sr == NULL)) &&
|
||||
((__tc_AL == NULL && __tc_al == NULL) || (__tc_DL == NULL && __tc_dl == NULL));
|
||||
|
||||
/* Precalculate conflict info for color/attribute end commands. */
|
||||
__mask_OP = __ATTRIBUTES & ~__COLOR;
|
||||
if (OP != NULL) {
|
||||
if (SE != NULL && !strcmp(OP, SE))
|
||||
__mask_OP &= ~__STANDOUT;
|
||||
if (UE != NULL && !strcmp(OP, UE))
|
||||
__mask_OP &= ~__UNDERSCORE;
|
||||
if (ME != NULL && !strcmp(OP, ME))
|
||||
__mask_OP &= ~__TERMATTR;
|
||||
__mask_op = __ATTRIBUTES & ~__COLOR;
|
||||
if (__tc_op != NULL) {
|
||||
if (__tc_se != NULL && !strcmp(__tc_op, __tc_se))
|
||||
__mask_op &= ~__STANDOUT;
|
||||
if (__tc_ue != NULL && !strcmp(__tc_op, __tc_ue))
|
||||
__mask_op &= ~__UNDERSCORE;
|
||||
if (__tc_me != NULL && !strcmp(__tc_op, __tc_me))
|
||||
__mask_op &= ~__TERMATTR;
|
||||
}
|
||||
__mask_ME = __ATTRIBUTES & ~__TERMATTR;
|
||||
if (ME != NULL) {
|
||||
if (SE != NULL && !strcmp(ME, SE))
|
||||
__mask_ME &= ~__STANDOUT;
|
||||
if (UE != NULL && !strcmp(ME, UE))
|
||||
__mask_ME &= ~__UNDERSCORE;
|
||||
if (OP != NULL && !strcmp(ME, OP))
|
||||
__mask_ME &= ~__COLOR;
|
||||
__mask_me = __ATTRIBUTES & ~__TERMATTR;
|
||||
if (__tc_me != NULL) {
|
||||
if (__tc_se != NULL && !strcmp(__tc_me, __tc_se))
|
||||
__mask_me &= ~__STANDOUT;
|
||||
if (__tc_ue != NULL && !strcmp(__tc_me, __tc_ue))
|
||||
__mask_me &= ~__UNDERSCORE;
|
||||
if (__tc_op != NULL && !strcmp(__tc_me, __tc_op))
|
||||
__mask_me &= ~__COLOR;
|
||||
}
|
||||
__mask_UE = __ATTRIBUTES & ~__UNDERSCORE;
|
||||
if (UE != NULL) {
|
||||
if (SE != NULL && !strcmp(UE, SE))
|
||||
__mask_UE &= ~__STANDOUT;
|
||||
if (ME != NULL && !strcmp(UE, ME))
|
||||
__mask_UE &= ~__TERMATTR;
|
||||
if (OP != NULL && !strcmp(UE, OP))
|
||||
__mask_UE &= ~__COLOR;
|
||||
__mask_ue = __ATTRIBUTES & ~__UNDERSCORE;
|
||||
if (__tc_ue != NULL) {
|
||||
if (__tc_se != NULL && !strcmp(__tc_ue, __tc_se))
|
||||
__mask_ue &= ~__STANDOUT;
|
||||
if (__tc_me != NULL && !strcmp(__tc_ue, __tc_me))
|
||||
__mask_ue &= ~__TERMATTR;
|
||||
if (__tc_op != NULL && !strcmp(__tc_ue, __tc_op))
|
||||
__mask_ue &= ~__COLOR;
|
||||
}
|
||||
__mask_SE = __ATTRIBUTES & ~__STANDOUT;
|
||||
if (SE != NULL) {
|
||||
if (UE != NULL && !strcmp(SE, UE))
|
||||
__mask_SE &= ~__UNDERSCORE;
|
||||
if (ME != NULL && !strcmp(SE, ME))
|
||||
__mask_SE &= ~__TERMATTR;
|
||||
if (OP != NULL && !strcmp(SE, OP))
|
||||
__mask_SE &= ~__COLOR;
|
||||
__mask_se = __ATTRIBUTES & ~__STANDOUT;
|
||||
if (__tc_se != NULL) {
|
||||
if (__tc_ue != NULL && !strcmp(__tc_se, __tc_ue))
|
||||
__mask_se &= ~__UNDERSCORE;
|
||||
if (__tc_me != NULL && !strcmp(__tc_se, __tc_me))
|
||||
__mask_se &= ~__TERMATTR;
|
||||
if (__tc_op != NULL && !strcmp(__tc_se, __tc_op))
|
||||
__mask_se &= ~__COLOR;
|
||||
}
|
||||
|
||||
return (unknown ? ERR : OK);
|
||||
@ -252,7 +268,7 @@ zap(struct tinfo *tinfo)
|
||||
#endif
|
||||
tmp[2] = '\0';
|
||||
|
||||
namp = "amutbsccdaeohchlinmimsncnsosulxbxnxtxsxx";
|
||||
namp = "ambsccdaeohchlinmimsncnsosulutxbxnxtxsxx";
|
||||
fp = sflags;
|
||||
do {
|
||||
*tmp = *namp;
|
||||
@ -278,7 +294,7 @@ zap(struct tinfo *tinfo)
|
||||
} while (*namp);
|
||||
|
||||
/* calculate the size of tspace.... */
|
||||
nampstr = "acaeALasbcblbtcdceclcmcrcsdcDLdmdoeAedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullmambmdmemhmkmmmompmrndnlocoppcprscseSFsospSRtatetiucueupusvbvivsveABAFaldlIcIpSbSfsfsrALDLUPDOLERI";
|
||||
nampstr = "ABacaeAFALalasbcblbtcdceclcmcrcsdcDLdldmDOdoeAedeihoIcicimIpipk0k1k2k3k4k5k6k7k8k9kdkekhklkrkskuLEllmambmdmemhmkmmmompmrndnlocoppcrcRISbscseSFSfsfsospSRsrtatetiucueUPupusvbvevivs";
|
||||
namp = nampstr;
|
||||
tspace_size = 0;
|
||||
do {
|
||||
@ -313,16 +329,16 @@ zap(struct tinfo *tinfo)
|
||||
#endif
|
||||
namp += 2;
|
||||
} while (*namp);
|
||||
if (XS)
|
||||
SO = SE = NULL;
|
||||
if (__tc_xs)
|
||||
__tc_so = __tc_se = NULL;
|
||||
else {
|
||||
if (t_getnum(tinfo, "sg") > 0)
|
||||
SO = NULL;
|
||||
__tc_so = NULL;
|
||||
if (t_getnum(tinfo, "ug") > 0)
|
||||
US = NULL;
|
||||
if (!SO && US) {
|
||||
SO = US;
|
||||
SE = UE;
|
||||
__tc_us = NULL;
|
||||
if (!__tc_so && __tc_us) {
|
||||
__tc_so = __tc_us;
|
||||
__tc_se = __tc_ue;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: standout.c,v 1.11 2000/04/15 13:17:05 blymn Exp $ */
|
||||
/* $NetBSD: standout.c,v 1.12 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)standout.c 8.3 (Berkeley) 8/10/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: standout.c,v 1.11 2000/04/15 13:17:05 blymn Exp $");
|
||||
__RCSID("$NetBSD: standout.c,v 1.12 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -80,7 +80,7 @@ wstandout(WINDOW *win)
|
||||
* If standout/standend strings, or can underline, set the
|
||||
* screen standout bit.
|
||||
*/
|
||||
if ((SO != NULL && SE != NULL) || UC != NULL) {
|
||||
if ((__tc_so != NULL && __tc_se != NULL) || __tc_uc != NULL) {
|
||||
win->wattr |= __STANDOUT;
|
||||
if ((win->wattr & __COLOR) && (__nca & __STANDOUT)) {
|
||||
#ifdef DEBUG
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tstp.c,v 1.21 2000/06/15 21:20:16 jdc Exp $ */
|
||||
/* $NetBSD: tstp.c,v 1.22 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1981, 1993, 1994
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)tstp.c 8.3 (Berkeley) 5/4/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: tstp.c,v 1.21 2000/06/15 21:20:16 jdc Exp $");
|
||||
__RCSID("$NetBSD: tstp.c,v 1.22 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -131,13 +131,13 @@ __stopwin(void)
|
||||
__mvcur((int) curscr->cury, (int) curscr->curx, (int) curscr->maxy - 1, 0, 0);
|
||||
}
|
||||
|
||||
if (MO != NULL)
|
||||
(void) tputs(MO, 0, __cputchar);
|
||||
if (__tc_mo != NULL)
|
||||
(void) tputs(__tc_mo, 0, __cputchar);
|
||||
|
||||
if (curscr->flags & __KEYPAD)
|
||||
(void) tputs(KE, 0, __cputchar);
|
||||
(void) tputs(VE, 0, __cputchar);
|
||||
(void) tputs(TE, 0, __cputchar);
|
||||
(void) tputs(__tc_ke, 0, __cputchar);
|
||||
(void) tputs(__tc_ve, 0, __cputchar);
|
||||
(void) tputs(__tc_te, 0, __cputchar);
|
||||
(void) fflush(stdout);
|
||||
(void) setvbuf(stdout, NULL, _IOLBF, (size_t) 0);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tty.c,v 1.23 2000/06/16 06:32:19 jdc Exp $ */
|
||||
/* $NetBSD: tty.c,v 1.24 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993, 1994
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)tty.c 8.6 (Berkeley) 1/10/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: tty.c,v 1.23 2000/06/16 06:32:19 jdc Exp $");
|
||||
__RCSID("$NetBSD: tty.c,v 1.24 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -96,9 +96,8 @@ gettmode(void)
|
||||
__baset = __orig_termios;
|
||||
__baset.c_oflag &= ~OXTABS;
|
||||
|
||||
GT = 0; /* historical. was used before we wired OXTABS
|
||||
* off */
|
||||
NONL = (__baset.c_oflag & ONLCR) == 0;
|
||||
__GT = 0; /* historical. was used before we wired OXTABS off */
|
||||
__NONL = (__baset.c_oflag & ONLCR) == 0;
|
||||
|
||||
/*
|
||||
* XXX
|
||||
@ -393,10 +392,10 @@ __startwin(void)
|
||||
}
|
||||
(void) setvbuf(stdout, stdbuf, _IOFBF, len);
|
||||
|
||||
tputs(TI, 0, __cputchar);
|
||||
tputs(VS, 0, __cputchar);
|
||||
tputs(__tc_ti, 0, __cputchar);
|
||||
tputs(__tc_vs, 0, __cputchar);
|
||||
if (curscr->flags & __KEYPAD)
|
||||
tputs(KS, 0, __cputchar);
|
||||
tputs(__tc_ks, 0, __cputchar);
|
||||
__endwin = 0;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: underscore.c,v 1.5 2000/04/24 14:09:44 blymn Exp $ */
|
||||
/* $NetBSD: underscore.c,v 1.6 2000/12/19 21:34:24 jdc Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: underscore.c,v 1.5 2000/04/24 14:09:44 blymn Exp $");
|
||||
__RCSID("$NetBSD: underscore.c,v 1.6 2000/12/19 21:34:24 jdc Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include "curses.h"
|
||||
@ -77,7 +77,7 @@ int
|
||||
wunderscore(WINDOW *win)
|
||||
{
|
||||
/* If can underscore, set the screen underscore bit. */
|
||||
if ((US != NULL && UE != NULL) || UC != NULL) {
|
||||
if ((__tc_us != NULL && __tc_ue != NULL) || __tc_uc != NULL) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("wunderscore\n");
|
||||
#endif
|
||||
@ -96,7 +96,7 @@ wunderscore(WINDOW *win)
|
||||
int
|
||||
wunderend(WINDOW *win)
|
||||
{
|
||||
if (UE != NULL) {
|
||||
if (__tc_ue != NULL) {
|
||||
#ifdef DEBUG
|
||||
__CTRACE("wunderuend\n");
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user