summaryrefslogtreecommitdiff
path: root/pico/osdep
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2021-04-28 21:10:13 -0600
committerEduardo Chappa <chappa@washington.edu>2021-04-28 21:10:13 -0600
commitc8812ee61f137936edfff613f8c475e69326e6a7 (patch)
treeb39c5b611987cf3be7227c689074d88fd180a100 /pico/osdep
parent3e9f5e0b67a6b74bd5771e92079639a9ff02f194 (diff)
downloadalpine-c8812ee61f137936edfff613f8c475e69326e6a7.tar.xz
* Fix of the list of files in the browser for terminals that need to erase
inverse video to stop inverse video. W=Work in collaboration with professor Martin Trusler.
Diffstat (limited to 'pico/osdep')
-rw-r--r--pico/osdep/terminal.c34
-rw-r--r--pico/osdep/tty.c3
2 files changed, 32 insertions, 5 deletions
diff --git a/pico/osdep/terminal.c b/pico/osdep/terminal.c
index da989613..36309520 100644
--- a/pico/osdep/terminal.c
+++ b/pico/osdep/terminal.c
@@ -71,6 +71,7 @@ static int tinfoeeol(void);
static int tinfoeeop(void);
static int tinfobeep(void);
static int tinforev(int);
+static int tinfoeri(void);
static int tinfoopen(void);
static int tinfoterminalinfo(int);
static int tinfoclose(void);
@@ -111,7 +112,7 @@ char *_clearscreen, *_moveto, *_up, *_down, *_right, *_left,
*_termcap_init, /* string to start termcap */
*_termcap_end, /* string to end termcap */
*_op, *_oc, *_setaf, *_setab, *_setf, *_setb, *_scp;
-int _colors, _pairs, _bce;
+int _colors, _pairs, _bce, _xhp;
char term_name[40];
TERM term = {
@@ -129,7 +130,8 @@ TERM term = {
tinfoeeol,
tinfoeeop,
tinfobeep,
- tinforev
+ tinforev,
+ tinfoeri
};
@@ -387,6 +389,7 @@ tinfoterminalinfo(int termcap_wins)
_op = tigetstr("op");
_oc = tigetstr("oc");
_bce = tigetflag("bce");
+ _xhp = tigetflag("xhp");
_tlines = tigetnum("lines");
if(_tlines == -1){
@@ -802,6 +805,16 @@ tinforev(int state) /* change reverse video status */
static int
+tinfoeri(void)
+{
+ if(_xhp && _clearinverse)
+ putpad(_clearinverse);
+
+ return(1);
+}
+
+
+static int
tinfobeep(void)
{
ttputc(BELL);
@@ -830,6 +843,7 @@ static int tcapeeol(void);
static int tcapeeop(void);
static int tcapbeep(void);
static int tcaprev(int);
+static int tcaperi(void);
static int tcapopen(void);
static int tcapterminalinfo(int);
static int tcapclose(void);
@@ -868,7 +882,7 @@ char *_clearscreen, *_moveto, *_up, *_down, *_right, *_left,
*_termcap_init, /* string to start termcap */
*_termcap_end, /* string to end termcap */
*_op, *_oc, *_setaf, *_setab, *_setf, *_setb, *_scp;
-int _colors, _pairs, _bce;
+int _colors, _pairs, _bce, _xhp;
char term_name[40];
TERM term = {
@@ -886,7 +900,8 @@ TERM term = {
tcapeeol,
tcapeeop,
tcapbeep,
- tcaprev
+ tcaprev,
+ tcaperi
};
@@ -1154,6 +1169,7 @@ tcapterminalinfo(int termcap_wins)
_op = tgetstr("op", &p);
_oc = tgetstr("oc", &p);
_bce = tgetflag("ut");
+ _xhp = tgetflag("xs");
if (p >= &tcapbuf[TCAPSLEN]){
puts("Terminal description too big!\n");
@@ -1566,6 +1582,16 @@ tcapeeop(void)
static int
+tcaperi(void)
+{
+ if(_xhp && _clearinverse)
+ putpad(_clearinverse);
+
+ return(1);
+}
+
+
+static int
tcaprev(int state) /* change reverse video status */
{ /* FALSE = normal video, TRUE = reverse video */
if(state)
diff --git a/pico/osdep/tty.c b/pico/osdep/tty.c
index 3601d58e..c24a8a55 100644
--- a/pico/osdep/tty.c
+++ b/pico/osdep/tty.c
@@ -291,7 +291,8 @@ TERM term = {
mswin_eeol,
mswin_eeop,
mswin_beep,
- mswin_rev
+ mswin_rev,
+ NULL /* no standout glitch in Windows */
};
/*