summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2000-07-30 08:12:08 +0000
committernyan <nyan@FreeBSD.org>2000-07-30 08:12:08 +0000
commita020d75805eb719d7aa4e64a516f19afac77d501 (patch)
treeb4cf36141f0da5f87dc8e372f3541b032ec3bdc1 /sys/pc98/cbus
parentd7fff2a15cf9d05b0173f19b6079d1cb375641d1 (diff)
downloadFreeBSD-src-a020d75805eb719d7aa4e64a516f19afac77d501.zip
FreeBSD-src-a020d75805eb719d7aa4e64a516f19afac77d501.tar.gz
Merged from sys/dev/syscons/scterm-sc.c revisions from 1.8 to 1.12.
Diffstat (limited to 'sys/pc98/cbus')
-rw-r--r--sys/pc98/cbus/scterm-sck.c53
1 files changed, 37 insertions, 16 deletions
diff --git a/sys/pc98/cbus/scterm-sck.c b/sys/pc98/cbus/scterm-sck.c
index bbf8dda..2dfc94f 100644
--- a/sys/pc98/cbus/scterm-sck.c
+++ b/sys/pc98/cbus/scterm-sck.c
@@ -290,7 +290,12 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
tcp->esc = 4;
return;
#endif
- case 'c': /* Clear screen & home */
+ case 'c': /* reset */
+ tcp->attr_mask = NORMAL_ATTR;
+ tcp->cur_color = tcp->std_color
+ = tcp->dflt_std_color;
+ tcp->rev_color = tcp->dflt_rev_color;
+ tcp->cur_attr = mask2attr(tcp);
sc_clear_screen(scp);
break;
@@ -476,30 +481,46 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
tcp->attr_mask |= BLINK_ATTR;
tcp->cur_attr = mask2attr(tcp);
break;
- case 7: /* reverse video */
+ case 7: /* reverse */
tcp->attr_mask |= REVERSE_ATTR;
tcp->cur_attr = mask2attr(tcp);
break;
- case 30: case 31: /* set fg color */
+ case 22: /* remove bold (or dim) */
+ tcp->attr_mask &= ~BOLD_ATTR;
+ tcp->cur_attr = mask2attr(tcp);
+ break;
+ case 24: /* remove underline */
+ tcp->attr_mask &= ~UNDERLINE_ATTR;
+ tcp->cur_attr = mask2attr(tcp);
+ break;
+ case 25: /* remove blink */
+ tcp->attr_mask &= ~BLINK_ATTR;
+ tcp->cur_attr = mask2attr(tcp);
+ break;
+ case 27: /* remove reverse */
+ tcp->attr_mask &= ~REVERSE_ATTR;
+ tcp->cur_attr = mask2attr(tcp);
+ break;
+ case 30: case 31: /* set ansi fg color */
case 32: case 33: case 34:
case 35: case 36: case 37:
tcp->attr_mask |= FG_CHANGED;
tcp->cur_color.fg = ansi_col[n - 30];
tcp->cur_attr = mask2attr(tcp);
break;
- case 39:
- tcp->attr_mask &= ~FG_CHANGED;
+ case 39: /* restore fg color back to normal */
+ tcp->attr_mask &= ~(FG_CHANGED|BOLD_ATTR);
tcp->cur_color.fg = tcp->std_color.fg;
tcp->cur_attr = mask2attr(tcp);
break;
- case 40: case 41: /* set bg color */
+ case 40: case 41: /* set ansi bg color */
case 42: case 43: case 44:
case 45: case 46: case 47:
tcp->attr_mask |= BG_CHANGED;
tcp->cur_color.bg = ansi_col[n - 40];
tcp->cur_attr = mask2attr(tcp);
break;
- case 49:
+ case 49: /* restore bg color back to normal */
tcp->attr_mask &= ~BG_CHANGED;
tcp->cur_color.bg = tcp->std_color.bg;
tcp->cur_attr = mask2attr(tcp);
@@ -525,7 +546,7 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
else
n = tcp->param[0];
switch (n) {
- case 0: /* reset colors and attributes */
+ case 0: /* reset colors and attributes back to normal */
tcp->attr_mask = NORMAL_ATTR;
tcp->cur_color = tcp->std_color =
tcp->dflt_std_color;
@@ -544,7 +565,7 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
ansi_col[tcp->param[1] & 0x0f];
tcp->cur_attr = mask2attr(tcp);
break;
- case 3: /* set video attribute directly */
+ case 3: /* set adapter attribute directly */
tcp->attr_mask &= ~(FG_CHANGED | BG_CHANGED);
tcp->cur_color.fg = tcp->std_color.fg =
tcp->param[1] & 0x0f;
@@ -552,17 +573,17 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
(tcp->param[1] >> 4) & 0x0f;
tcp->cur_attr = mask2attr(tcp);
break;
- case 5: /* set ansi reverse video background */
+ case 5: /* set ansi reverse background */
tcp->rev_color.bg =
ansi_col[tcp->param[1] & 0x0f];
tcp->cur_attr = mask2attr(tcp);
break;
- case 6: /* set ansi reverse video foreground */
+ case 6: /* set ansi reverse foreground */
tcp->rev_color.fg =
ansi_col[tcp->param[1] & 0x0f];
tcp->cur_attr = mask2attr(tcp);
break;
- case 7: /* set reverse video attribute directly */
+ case 7: /* set adapter reverse attribute directly */
tcp->rev_color.fg = tcp->param[1] & 0x0f;
tcp->rev_color.bg = (tcp->param[1] >> 4) & 0x0f;
tcp->cur_attr = mask2attr(tcp);
@@ -642,7 +663,7 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
splx(i);
break;
- case 'F': /* set foreground */
+ case 'F': /* set adapter foreground */
if (tcp->num_param == 1) {
tcp->attr_mask &= ~FG_CHANGED;
tcp->cur_color.fg = tcp->std_color.fg =
@@ -651,7 +672,7 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
}
break;
- case 'G': /* set background */
+ case 'G': /* set adapter background */
if (tcp->num_param == 1) {
tcp->attr_mask &= ~BG_CHANGED;
tcp->cur_color.bg = tcp->std_color.bg =
@@ -660,14 +681,14 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
}
break;
- case 'H': /* set reverse video foreground */
+ case 'H': /* set adapter reverse foreground */
if (tcp->num_param == 1) {
tcp->rev_color.fg = tcp->param[0] & 0x0f;
tcp->cur_attr = mask2attr(tcp);
}
break;
- case 'I': /* set reverse video background */
+ case 'I': /* set adapter reverse background */
if (tcp->num_param == 1) {
tcp->rev_color.bg = tcp->param[0] & 0x0f;
tcp->cur_attr = mask2attr(tcp);
OpenPOWER on IntegriCloud