From fda9343e101fbe96aca17e780c8e7135a23e8a90 Mon Sep 17 00:00:00 2001 From: wiz Date: Sun, 22 Jul 2001 14:57:50 +0000 Subject: [PATCH] bcopy -> memmove --- sys/arch/prep/isa/pccons.c | 30 ++++++++++++++---------------- sys/arch/prep/stand/boot/vga.c | 9 +++++---- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/sys/arch/prep/isa/pccons.c b/sys/arch/prep/isa/pccons.c index 91776fcf2225..7e28b6a0c72d 100644 --- a/sys/arch/prep/isa/pccons.c +++ b/sys/arch/prep/isa/pccons.c @@ -1,4 +1,4 @@ -/* $NetBSD: pccons.c,v 1.7 2001/06/15 15:53:27 nonaka Exp $ */ +/* $NetBSD: pccons.c,v 1.8 2001/07/22 14:57:50 wiz Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -1290,9 +1290,9 @@ sput(cp, n) else if (cx > nrow) cx = nrow; if (cx < nrow) - bcopy(crtAt + vs.ncol * cx, - crtAt, vs.ncol * (nrow - - cx) * CHR); + memmove(crtAt, crtAt + + vs.ncol * cx, vs.ncol * + (nrow - cx) * CHR); fillw((vs.at << 8) | ' ', crtAt + vs.ncol * (nrow - cx), vs.ncol * cx); @@ -1306,9 +1306,9 @@ sput(cp, n) else if (cx > vs.nrow) cx = vs.nrow; if (cx < vs.nrow) - bcopy(Crtat + vs.ncol * cx, - Crtat, vs.ncol * (vs.nrow - - cx) * CHR); + memmove(Crtat, Crtat + + vs.ncol * cx, vs.ncol * + (vs.nrow - cx) * CHR); fillw((vs.at << 8) | ' ', Crtat + vs.ncol * (vs.nrow - cx), vs.ncol * cx); @@ -1328,10 +1328,9 @@ sput(cp, n) else if (cx > nrow) cx = nrow; if (cx < nrow) - bcopy(crtAt, - crtAt + vs.ncol * cx, - vs.ncol * (nrow - cx) * - CHR); + memmove(crtAt + vs.ncol * cx, + crtAt, vs.ncol * (nrow - + cx) * CHR); fillw((vs.at << 8) | ' ', crtAt, vs.ncol * cx); vs.state = 0; @@ -1344,10 +1343,9 @@ sput(cp, n) else if (cx > vs.nrow) cx = vs.nrow; if (cx < vs.nrow) - bcopy(Crtat, - Crtat + vs.ncol * cx, - vs.ncol * (vs.nrow - cx) * - CHR); + memmove(Crtat + vs.ncol * cx, + Crtat, vs.ncol * (vs.nrow - + cx) * CHR); fillw((vs.at << 8) | ' ', Crtat, vs.ncol * cx); #if 0 @@ -1412,7 +1410,7 @@ sput(cp, n) scroll = 0; /* scroll check */ if (crtat >= Crtat + vs.nchr) { - bcopy(Crtat + vs.ncol, Crtat, + memmove(Crtat, Crtat + vs.ncol, (vs.nchr - vs.ncol) * CHR); fillw((vs.at << 8) | ' ', Crtat + vs.nchr - vs.ncol, diff --git a/sys/arch/prep/stand/boot/vga.c b/sys/arch/prep/stand/boot/vga.c index 08f459dcf353..bc4366eb11c8 100644 --- a/sys/arch/prep/stand/boot/vga.c +++ b/sys/arch/prep/stand/boot/vga.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga.c,v 1.1 2000/02/29 15:21:51 nonaka Exp $ */ +/* $NetBSD: vga.c,v 1.2 2001/07/22 14:57:51 wiz Exp $ */ /*- * Copyright (C) 1995-1997 Gary Thomas (gdt@linuxppc.org) @@ -285,16 +285,17 @@ vga_putc(int c) case 'L': /* Insert line */ i = (d->cp - base) / COL; /* avoid deficiency of bcopy implementation */ + /* XXX: comment and hack relevant? */ pp = base + COL * (ROW-2); for (j = ROW - 1 - i; j--; pp -= COL) - bcopy(pp, pp + COL, COL * CHR); + memmove(pp + COL, pp, COL * CHR); fillw(d->color|(' '<<8), base + i * COL, COL); break; case 'M': /* Delete line */ i = (d->cp - base) / COL; pp = base + i * COL; - bcopy(pp + COL, pp, (ROW-1 - i)*COL*CHR); + memmove(pp, pp + COL, (ROW-1 - i)*COL*CHR); fillw(d->color|(' '<<8), base + COL * (ROW - 1), COL); break; @@ -387,7 +388,7 @@ vga_putc(int c) break; } if (d->cp >= base + (COL * ROW)) { /* scroll check */ - bcopy(base + COL, base, COL * (ROW - 1) * CHR); + memmove(base, base + COL, COL * (ROW - 1) * CHR); fillw(d->color|(' '<<8), base + COL * (ROW - 1), COL); d->cp -= COL; }