cast arg 2 of fillw() calls to type caddr_t as in pccons.

add "manual escape to debugger" arg in call to Debugger().
cast 1st arg to untimeout() to type timeout_func_t as done for timeout().
This commit is contained in:
Rich Murphey 1993-12-21 02:49:13 +00:00
parent 92d91f7638
commit 81664caf74
3 changed files with 87 additions and 75 deletions

View file

@ -35,7 +35,7 @@
*
* from: @(#)pccons.c 5.11 (Berkeley) 5/21/91
* from: @(#)syscons.c 1.1 931021
* $Id: syscons.c,v 1.20 1993/11/27 06:32:41 rich Exp $
* $Id: syscons.c,v 1.21 1993/12/18 22:50:51 ache Exp $
*
* Heavily modified by Søren Schmidt (sos@login.dkuug.dk) to provide:
*
@ -352,7 +352,8 @@ int pcattach(struct isa_device *dev)
scp->smode.mode = VT_AUTO;
if (i > 0) {
scp->crt_base = scp->crtat = scp->scr;
fillw(scp->term.attr|scr_map[0x20], scp->scr, COL*ROW);
fillw(scp->term.attr|scr_map[0x20],
(caddr_t)scp->scr, COL*ROW);
}
}
/* get cursor going */
@ -1163,8 +1164,8 @@ static void scrn_saver(int test)
if (!scrn_blanked) {
bcopy(Crtat, scp->scr,
scp->max_posx * scp->max_posy * 2);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20], Crtat,
scp->max_posx * scp->max_posy);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20],
(caddr_t)Crtat, scp->max_posx * scp->max_posy);
set_border(0);
i = scp->max_posy * scp->max_posx + 5;
outb(crtc_addr, 14);
@ -1214,8 +1215,8 @@ static void scrn_saver(int test)
if (!scrn_blanked) {
bcopy(Crtat, scp->scr,
scp->max_posx * scp->max_posy * 2);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20], Crtat,
scp->max_posx * scp->max_posy);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20],
(caddr_t)Crtat, scp->max_posx * scp->max_posy);
set_border(0);
dirx = (scp->posx ? 1 : -1);
diry = (scp->posy ?
@ -1304,7 +1305,7 @@ int cursor_pos(void)
static void clear_screen(scr_stat *scp)
{
move_crsr(scp, 0, 0);
fillw(scp->term.attr | scr_map[0x20], scp->crt_base,
fillw(scp->term.attr | scr_map[0x20], (caddr_t)scp->crt_base,
scp->max_posx * scp->max_posy);
}
@ -1429,7 +1430,7 @@ static void scan_esc(scr_stat *scp, u_char c)
scp->crt_base + scp->max_posx,
(scp->max_posy - 1) * scp->max_posx);
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base, scp->max_posx);
(caddr_t)scp->crt_base, scp->max_posx);
}
break;
#if notyet
@ -1518,13 +1519,13 @@ static void scan_esc(scr_stat *scp, u_char c)
switch (n) {
case 0: /* clear form cursor to end of display */
fillw(scp->term.attr | scr_map[0x20],
scp->crtat, scp->crt_base +
(caddr_t)scp->crtat, scp->crt_base +
scp->max_posx * scp->max_posy -
scp->crtat);
break;
case 1: /* clear from beginning of display to cursor */
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base,
(caddr_t)scp->crt_base,
scp->crtat - scp->crt_base);
break;
case 2: /* clear entire display */
@ -1541,16 +1542,19 @@ static void scan_esc(scr_stat *scp, u_char c)
switch (n) {
case 0: /* clear form cursor to end of line */
fillw(scp->term.attr | scr_map[0x20],
scp->crtat, scp->max_posx - scp->posx);
(caddr_t)scp->crtat,
scp->max_posx - scp->posx);
break;
case 1: /* clear from beginning of line to cursor */
fillw(scp->term.attr|scr_map[0x20],
scp->crtat - (scp->max_posx - scp->posx),
(caddr_t)scp->crtat
- (scp->max_posx - scp->posx),
(scp->max_posx - scp->posx) + 1);
break;
case 2: /* clear entire line */
fillw(scp->term.attr|scr_map[0x20],
scp->crtat - (scp->max_posx - scp->posx),
(caddr_t)scp->crtat
- (scp->max_posx - scp->posx),
scp->max_posx);
break;
}
@ -1564,7 +1568,7 @@ static void scan_esc(scr_stat *scp, u_char c)
dst = src + n * scp->max_posx;
count = scp->max_posy - (scp->posy + n);
move_up(src, dst, count * scp->max_posx);
fillw(scp->term.attr | scr_map[0x20], src,
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src,
n * scp->max_posx);
break;
@ -1577,7 +1581,7 @@ static void scan_esc(scr_stat *scp, u_char c)
count = scp->max_posy - (scp->posy + n);
move_down(src, dst, count * scp->max_posx);
src = dst + count * scp->max_posx;
fillw(scp->term.attr | scr_map[0x20], src,
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src,
n * scp->max_posx);
break;
@ -1590,7 +1594,7 @@ static void scan_esc(scr_stat *scp, u_char c)
count = scp->max_posx - (scp->posx + n);
move_down(src, dst, count);
src = dst + count;
fillw(scp->term.attr | scr_map[0x20], src, n);
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src, n);
break;
case '@': /* Insert n chars */
@ -1601,7 +1605,7 @@ static void scan_esc(scr_stat *scp, u_char c)
dst = src + n;
count = scp->max_posx - (scp->posx + n);
move_up(src, dst, count);
fillw(scp->term.attr | scr_map[0x20], src, n);
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src, n);
break;
case 'S': /* scroll up n lines */
@ -1611,7 +1615,7 @@ static void scan_esc(scr_stat *scp, u_char c)
scp->max_posx * (scp->max_posy - n) *
sizeof(u_short));
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base + scp->max_posx *
(caddr_t)scp->crt_base + scp->max_posx *
(scp->max_posy - 1),
scp->max_posx);
break;
@ -1622,14 +1626,14 @@ static void scan_esc(scr_stat *scp, u_char c)
scp->crt_base + (scp->max_posx * n),
scp->max_posx * (scp->max_posy - n) *
sizeof(u_short));
fillw(scp->term.attr | scr_map[0x20], scp->crt_base,
scp->max_posx);
fillw(scp->term.attr | scr_map[0x20],
(caddr_t)scp->crt_base, scp->max_posx);
break;
case 'X': /* delete n characters in line */
n = scp->term.par[0]; if (n < 1) n = 1;
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base + scp->posx +
(caddr_t)scp->crt_base + scp->posx +
((scp->max_posx*scp->posy) * sizeof(u_short)), n);
break;
@ -1888,8 +1892,8 @@ static void ansi_put(scr_stat *scp, u_char c)
bcopy(scp->crt_base + scp->max_posx, scp->crt_base,
scp->max_posx * (scp->max_posy - 1) * sizeof(u_short));
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base + scp->max_posx * (scp->max_posy - 1),
scp->max_posx);
(caddr_t)scp->crt_base + scp->max_posx
* (scp->max_posy - 1), scp->max_posx);
scp->crtat -= scp->max_posx;
scp->posy--;
}
@ -2290,7 +2294,7 @@ next_code:
if (cur_console->smode.mode == VT_AUTO &&
console[0].smode.mode == VT_AUTO)
switch_scr(0);
Debugger();
Debugger("manual escape to debugger");
return(NOKEY);
#else
printf("No debugger in kernel\n");
@ -2407,7 +2411,7 @@ static void set_mode(scr_stat *scp)
return;
/* (re)activate cursor */
untimeout((timeout_t)cursor_pos, 0);
untimeout((timeout_func_t)cursor_pos, 0);
cursor_pos();
/* change cursor type if set */

View file

@ -35,7 +35,7 @@
*
* from: @(#)pccons.c 5.11 (Berkeley) 5/21/91
* from: @(#)syscons.c 1.1 931021
* $Id: syscons.c,v 1.20 1993/11/27 06:32:41 rich Exp $
* $Id: syscons.c,v 1.21 1993/12/18 22:50:51 ache Exp $
*
* Heavily modified by Søren Schmidt (sos@login.dkuug.dk) to provide:
*
@ -352,7 +352,8 @@ int pcattach(struct isa_device *dev)
scp->smode.mode = VT_AUTO;
if (i > 0) {
scp->crt_base = scp->crtat = scp->scr;
fillw(scp->term.attr|scr_map[0x20], scp->scr, COL*ROW);
fillw(scp->term.attr|scr_map[0x20],
(caddr_t)scp->scr, COL*ROW);
}
}
/* get cursor going */
@ -1163,8 +1164,8 @@ static void scrn_saver(int test)
if (!scrn_blanked) {
bcopy(Crtat, scp->scr,
scp->max_posx * scp->max_posy * 2);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20], Crtat,
scp->max_posx * scp->max_posy);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20],
(caddr_t)Crtat, scp->max_posx * scp->max_posy);
set_border(0);
i = scp->max_posy * scp->max_posx + 5;
outb(crtc_addr, 14);
@ -1214,8 +1215,8 @@ static void scrn_saver(int test)
if (!scrn_blanked) {
bcopy(Crtat, scp->scr,
scp->max_posx * scp->max_posy * 2);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20], Crtat,
scp->max_posx * scp->max_posy);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20],
(caddr_t)Crtat, scp->max_posx * scp->max_posy);
set_border(0);
dirx = (scp->posx ? 1 : -1);
diry = (scp->posy ?
@ -1304,7 +1305,7 @@ int cursor_pos(void)
static void clear_screen(scr_stat *scp)
{
move_crsr(scp, 0, 0);
fillw(scp->term.attr | scr_map[0x20], scp->crt_base,
fillw(scp->term.attr | scr_map[0x20], (caddr_t)scp->crt_base,
scp->max_posx * scp->max_posy);
}
@ -1429,7 +1430,7 @@ static void scan_esc(scr_stat *scp, u_char c)
scp->crt_base + scp->max_posx,
(scp->max_posy - 1) * scp->max_posx);
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base, scp->max_posx);
(caddr_t)scp->crt_base, scp->max_posx);
}
break;
#if notyet
@ -1518,13 +1519,13 @@ static void scan_esc(scr_stat *scp, u_char c)
switch (n) {
case 0: /* clear form cursor to end of display */
fillw(scp->term.attr | scr_map[0x20],
scp->crtat, scp->crt_base +
(caddr_t)scp->crtat, scp->crt_base +
scp->max_posx * scp->max_posy -
scp->crtat);
break;
case 1: /* clear from beginning of display to cursor */
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base,
(caddr_t)scp->crt_base,
scp->crtat - scp->crt_base);
break;
case 2: /* clear entire display */
@ -1541,16 +1542,19 @@ static void scan_esc(scr_stat *scp, u_char c)
switch (n) {
case 0: /* clear form cursor to end of line */
fillw(scp->term.attr | scr_map[0x20],
scp->crtat, scp->max_posx - scp->posx);
(caddr_t)scp->crtat,
scp->max_posx - scp->posx);
break;
case 1: /* clear from beginning of line to cursor */
fillw(scp->term.attr|scr_map[0x20],
scp->crtat - (scp->max_posx - scp->posx),
(caddr_t)scp->crtat
- (scp->max_posx - scp->posx),
(scp->max_posx - scp->posx) + 1);
break;
case 2: /* clear entire line */
fillw(scp->term.attr|scr_map[0x20],
scp->crtat - (scp->max_posx - scp->posx),
(caddr_t)scp->crtat
- (scp->max_posx - scp->posx),
scp->max_posx);
break;
}
@ -1564,7 +1568,7 @@ static void scan_esc(scr_stat *scp, u_char c)
dst = src + n * scp->max_posx;
count = scp->max_posy - (scp->posy + n);
move_up(src, dst, count * scp->max_posx);
fillw(scp->term.attr | scr_map[0x20], src,
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src,
n * scp->max_posx);
break;
@ -1577,7 +1581,7 @@ static void scan_esc(scr_stat *scp, u_char c)
count = scp->max_posy - (scp->posy + n);
move_down(src, dst, count * scp->max_posx);
src = dst + count * scp->max_posx;
fillw(scp->term.attr | scr_map[0x20], src,
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src,
n * scp->max_posx);
break;
@ -1590,7 +1594,7 @@ static void scan_esc(scr_stat *scp, u_char c)
count = scp->max_posx - (scp->posx + n);
move_down(src, dst, count);
src = dst + count;
fillw(scp->term.attr | scr_map[0x20], src, n);
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src, n);
break;
case '@': /* Insert n chars */
@ -1601,7 +1605,7 @@ static void scan_esc(scr_stat *scp, u_char c)
dst = src + n;
count = scp->max_posx - (scp->posx + n);
move_up(src, dst, count);
fillw(scp->term.attr | scr_map[0x20], src, n);
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src, n);
break;
case 'S': /* scroll up n lines */
@ -1611,7 +1615,7 @@ static void scan_esc(scr_stat *scp, u_char c)
scp->max_posx * (scp->max_posy - n) *
sizeof(u_short));
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base + scp->max_posx *
(caddr_t)scp->crt_base + scp->max_posx *
(scp->max_posy - 1),
scp->max_posx);
break;
@ -1622,14 +1626,14 @@ static void scan_esc(scr_stat *scp, u_char c)
scp->crt_base + (scp->max_posx * n),
scp->max_posx * (scp->max_posy - n) *
sizeof(u_short));
fillw(scp->term.attr | scr_map[0x20], scp->crt_base,
scp->max_posx);
fillw(scp->term.attr | scr_map[0x20],
(caddr_t)scp->crt_base, scp->max_posx);
break;
case 'X': /* delete n characters in line */
n = scp->term.par[0]; if (n < 1) n = 1;
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base + scp->posx +
(caddr_t)scp->crt_base + scp->posx +
((scp->max_posx*scp->posy) * sizeof(u_short)), n);
break;
@ -1888,8 +1892,8 @@ static void ansi_put(scr_stat *scp, u_char c)
bcopy(scp->crt_base + scp->max_posx, scp->crt_base,
scp->max_posx * (scp->max_posy - 1) * sizeof(u_short));
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base + scp->max_posx * (scp->max_posy - 1),
scp->max_posx);
(caddr_t)scp->crt_base + scp->max_posx
* (scp->max_posy - 1), scp->max_posx);
scp->crtat -= scp->max_posx;
scp->posy--;
}
@ -2290,7 +2294,7 @@ next_code:
if (cur_console->smode.mode == VT_AUTO &&
console[0].smode.mode == VT_AUTO)
switch_scr(0);
Debugger();
Debugger("manual escape to debugger");
return(NOKEY);
#else
printf("No debugger in kernel\n");
@ -2407,7 +2411,7 @@ static void set_mode(scr_stat *scp)
return;
/* (re)activate cursor */
untimeout((timeout_t)cursor_pos, 0);
untimeout((timeout_func_t)cursor_pos, 0);
cursor_pos();
/* change cursor type if set */

View file

@ -35,7 +35,7 @@
*
* from: @(#)pccons.c 5.11 (Berkeley) 5/21/91
* from: @(#)syscons.c 1.1 931021
* $Id: syscons.c,v 1.20 1993/11/27 06:32:41 rich Exp $
* $Id: syscons.c,v 1.21 1993/12/18 22:50:51 ache Exp $
*
* Heavily modified by Søren Schmidt (sos@login.dkuug.dk) to provide:
*
@ -352,7 +352,8 @@ int pcattach(struct isa_device *dev)
scp->smode.mode = VT_AUTO;
if (i > 0) {
scp->crt_base = scp->crtat = scp->scr;
fillw(scp->term.attr|scr_map[0x20], scp->scr, COL*ROW);
fillw(scp->term.attr|scr_map[0x20],
(caddr_t)scp->scr, COL*ROW);
}
}
/* get cursor going */
@ -1163,8 +1164,8 @@ static void scrn_saver(int test)
if (!scrn_blanked) {
bcopy(Crtat, scp->scr,
scp->max_posx * scp->max_posy * 2);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20], Crtat,
scp->max_posx * scp->max_posy);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20],
(caddr_t)Crtat, scp->max_posx * scp->max_posy);
set_border(0);
i = scp->max_posy * scp->max_posx + 5;
outb(crtc_addr, 14);
@ -1214,8 +1215,8 @@ static void scrn_saver(int test)
if (!scrn_blanked) {
bcopy(Crtat, scp->scr,
scp->max_posx * scp->max_posy * 2);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20], Crtat,
scp->max_posx * scp->max_posy);
fillw((FG_LIGHTGREY|BG_BLACK)<<8 | scr_map[0x20],
(caddr_t)Crtat, scp->max_posx * scp->max_posy);
set_border(0);
dirx = (scp->posx ? 1 : -1);
diry = (scp->posy ?
@ -1304,7 +1305,7 @@ int cursor_pos(void)
static void clear_screen(scr_stat *scp)
{
move_crsr(scp, 0, 0);
fillw(scp->term.attr | scr_map[0x20], scp->crt_base,
fillw(scp->term.attr | scr_map[0x20], (caddr_t)scp->crt_base,
scp->max_posx * scp->max_posy);
}
@ -1429,7 +1430,7 @@ static void scan_esc(scr_stat *scp, u_char c)
scp->crt_base + scp->max_posx,
(scp->max_posy - 1) * scp->max_posx);
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base, scp->max_posx);
(caddr_t)scp->crt_base, scp->max_posx);
}
break;
#if notyet
@ -1518,13 +1519,13 @@ static void scan_esc(scr_stat *scp, u_char c)
switch (n) {
case 0: /* clear form cursor to end of display */
fillw(scp->term.attr | scr_map[0x20],
scp->crtat, scp->crt_base +
(caddr_t)scp->crtat, scp->crt_base +
scp->max_posx * scp->max_posy -
scp->crtat);
break;
case 1: /* clear from beginning of display to cursor */
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base,
(caddr_t)scp->crt_base,
scp->crtat - scp->crt_base);
break;
case 2: /* clear entire display */
@ -1541,16 +1542,19 @@ static void scan_esc(scr_stat *scp, u_char c)
switch (n) {
case 0: /* clear form cursor to end of line */
fillw(scp->term.attr | scr_map[0x20],
scp->crtat, scp->max_posx - scp->posx);
(caddr_t)scp->crtat,
scp->max_posx - scp->posx);
break;
case 1: /* clear from beginning of line to cursor */
fillw(scp->term.attr|scr_map[0x20],
scp->crtat - (scp->max_posx - scp->posx),
(caddr_t)scp->crtat
- (scp->max_posx - scp->posx),
(scp->max_posx - scp->posx) + 1);
break;
case 2: /* clear entire line */
fillw(scp->term.attr|scr_map[0x20],
scp->crtat - (scp->max_posx - scp->posx),
(caddr_t)scp->crtat
- (scp->max_posx - scp->posx),
scp->max_posx);
break;
}
@ -1564,7 +1568,7 @@ static void scan_esc(scr_stat *scp, u_char c)
dst = src + n * scp->max_posx;
count = scp->max_posy - (scp->posy + n);
move_up(src, dst, count * scp->max_posx);
fillw(scp->term.attr | scr_map[0x20], src,
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src,
n * scp->max_posx);
break;
@ -1577,7 +1581,7 @@ static void scan_esc(scr_stat *scp, u_char c)
count = scp->max_posy - (scp->posy + n);
move_down(src, dst, count * scp->max_posx);
src = dst + count * scp->max_posx;
fillw(scp->term.attr | scr_map[0x20], src,
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src,
n * scp->max_posx);
break;
@ -1590,7 +1594,7 @@ static void scan_esc(scr_stat *scp, u_char c)
count = scp->max_posx - (scp->posx + n);
move_down(src, dst, count);
src = dst + count;
fillw(scp->term.attr | scr_map[0x20], src, n);
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src, n);
break;
case '@': /* Insert n chars */
@ -1601,7 +1605,7 @@ static void scan_esc(scr_stat *scp, u_char c)
dst = src + n;
count = scp->max_posx - (scp->posx + n);
move_up(src, dst, count);
fillw(scp->term.attr | scr_map[0x20], src, n);
fillw(scp->term.attr | scr_map[0x20], (caddr_t)src, n);
break;
case 'S': /* scroll up n lines */
@ -1611,7 +1615,7 @@ static void scan_esc(scr_stat *scp, u_char c)
scp->max_posx * (scp->max_posy - n) *
sizeof(u_short));
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base + scp->max_posx *
(caddr_t)scp->crt_base + scp->max_posx *
(scp->max_posy - 1),
scp->max_posx);
break;
@ -1622,14 +1626,14 @@ static void scan_esc(scr_stat *scp, u_char c)
scp->crt_base + (scp->max_posx * n),
scp->max_posx * (scp->max_posy - n) *
sizeof(u_short));
fillw(scp->term.attr | scr_map[0x20], scp->crt_base,
scp->max_posx);
fillw(scp->term.attr | scr_map[0x20],
(caddr_t)scp->crt_base, scp->max_posx);
break;
case 'X': /* delete n characters in line */
n = scp->term.par[0]; if (n < 1) n = 1;
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base + scp->posx +
(caddr_t)scp->crt_base + scp->posx +
((scp->max_posx*scp->posy) * sizeof(u_short)), n);
break;
@ -1888,8 +1892,8 @@ static void ansi_put(scr_stat *scp, u_char c)
bcopy(scp->crt_base + scp->max_posx, scp->crt_base,
scp->max_posx * (scp->max_posy - 1) * sizeof(u_short));
fillw(scp->term.attr | scr_map[0x20],
scp->crt_base + scp->max_posx * (scp->max_posy - 1),
scp->max_posx);
(caddr_t)scp->crt_base + scp->max_posx
* (scp->max_posy - 1), scp->max_posx);
scp->crtat -= scp->max_posx;
scp->posy--;
}
@ -2290,7 +2294,7 @@ next_code:
if (cur_console->smode.mode == VT_AUTO &&
console[0].smode.mode == VT_AUTO)
switch_scr(0);
Debugger();
Debugger("manual escape to debugger");
return(NOKEY);
#else
printf("No debugger in kernel\n");
@ -2407,7 +2411,7 @@ static void set_mode(scr_stat *scp)
return;
/* (re)activate cursor */
untimeout((timeout_t)cursor_pos, 0);
untimeout((timeout_func_t)cursor_pos, 0);
cursor_pos();
/* change cursor type if set */