diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-08-01 13:51:20 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-08-01 13:51:20 +0000 |
commit | e6c966b615696f7a8f4d3c2c3fda5dcaed7d3f67 (patch) | |
tree | 42de716832f0c4a3c4e616390572a4a8d679dbd2 /sys/dev/wscons/wsemul_vt100_subr.c | |
parent | 389a0a4582e6890e967b7827708a1462222bcaf5 (diff) |
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@
Diffstat (limited to 'sys/dev/wscons/wsemul_vt100_subr.c')
-rw-r--r-- | sys/dev/wscons/wsemul_vt100_subr.c | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/sys/dev/wscons/wsemul_vt100_subr.c b/sys/dev/wscons/wsemul_vt100_subr.c index bd276387281..8e251259b66 100644 --- a/sys/dev/wscons/wsemul_vt100_subr.c +++ b/sys/dev/wscons/wsemul_vt100_subr.c @@ -1,5 +1,5 @@ -/* $OpenBSD: wsemul_vt100_subr.c,v 1.1 2000/05/16 23:49:11 mickey Exp $ */ -/* $NetBSD: wsemul_vt100_subr.c,v 1.6 2000/02/25 17:42:51 mycroft Exp $ */ +/* $OpenBSD: wsemul_vt100_subr.c,v 1.2 2000/08/01 13:51:18 mickey Exp $ */ +/* $NetBSD: wsemul_vt100_subr.c,v 1.7 2000/04/28 21:56:16 mycroft Exp $ */ /* * Copyright (c) 1998 @@ -68,16 +68,16 @@ wsemul_vt100_scrollup(edp, n) edp->scrreg_startrow + n, edp->scrreg_startrow, help); - if (edp->dblwid) - memmove(&edp->dblwid[edp->scrreg_startrow], - &edp->dblwid[edp->scrreg_startrow + n], + if (edp->dblwid) /* XXX OVERLAPS */ + bcopy(&edp->dblwid[edp->scrreg_startrow + n], + &edp->dblwid[edp->scrreg_startrow], help); } (*edp->emulops->eraserows)(edp->emulcookie, edp->scrreg_startrow + help, n, edp->bkgdattr); if (edp->dblwid) - bzero(&edp->dblwid[edp->scrreg_startrow + help], n); + memset(&edp->dblwid[edp->scrreg_startrow + help], 0, n); CHECK_DW; } @@ -100,16 +100,16 @@ wsemul_vt100_scrolldown(edp, n) edp->scrreg_startrow, edp->scrreg_startrow + n, help); - if (edp->dblwid) - memmove(&edp->dblwid[edp->scrreg_startrow + n], - &edp->dblwid[edp->scrreg_startrow], + if (edp->dblwid) /* XXX OVERLAPS */ + bcopy(&edp->dblwid[edp->scrreg_startrow], + &edp->dblwid[edp->scrreg_startrow + n], help); } (*edp->emulops->eraserows)(edp->emulcookie, edp->scrreg_startrow, n, edp->bkgdattr); if (edp->dblwid) - bzero(&edp->dblwid[edp->scrreg_startrow], n); + memset(&edp->dblwid[edp->scrreg_startrow], 0, n); CHECK_DW; } @@ -132,7 +132,7 @@ wsemul_vt100_ed(edp, arg) edp->crow + 1, n, edp->bkgdattr); if (edp->dblwid) - bzero(&edp->dblwid[edp->crow + 1], n); + memset(&edp->dblwid[edp->crow + 1], 0, n); } break; case 1: /* beginning to cursor */ @@ -141,7 +141,7 @@ wsemul_vt100_ed(edp, arg) 0, edp->crow, edp->bkgdattr); if (edp->dblwid) - bzero(&edp->dblwid[0], edp->crow); + memset(&edp->dblwid[0], 0, edp->crow); } ERASECOLS(0, edp->ccol + 1, edp->bkgdattr); break; @@ -150,7 +150,7 @@ wsemul_vt100_ed(edp, arg) 0, edp->nrows, edp->bkgdattr); if (edp->dblwid) - bzero(&edp->dblwid[0], edp->nrows); + memset(&edp->dblwid[0], 0, edp->nrows); break; default: #ifdef VT100_PRINTUNKNOWN @@ -468,7 +468,7 @@ wsemul_vt100_handle_csi(edp, c) edp->tabs[edp->ccol] = 0; break; case 3: - bzero(edp->tabs, edp->ncols); + memset(edp->tabs, 0, edp->ncols); break; default: #ifdef VT100_PRINTUNKNOWN @@ -693,8 +693,12 @@ vt100_selectattribute(edp, flags, fgcol, bgcol, attr, bkgdattr) #endif } } - return ((*edp->emulops->alloc_attr)(edp->emulcookie, fgcol, bgcol, - flags, attr)); + error = (*edp->emulops->alloc_attr)(edp->emulcookie, fgcol, bgcol, + flags, attr); + if (error) + return (error); + + return (0); } /* @@ -712,7 +716,7 @@ wsemul_vt100_handle_dcs(edp) return; case DCSTYPE_TABRESTORE: KASSERT(edp->tabs != 0); - bzero(edp->tabs, edp->ncols); + memset(edp->tabs, 0, edp->ncols); pos = 0; for (i = 0; i < edp->dcspos; i++) { char c = edp->dcsarg[i]; |