Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/bebox bcopy -> memmove



details:   https://anonhg.NetBSD.org/src/rev/634254a5e2e2
branches:  trunk
changeset: 513037:634254a5e2e2
user:      wiz <wiz%NetBSD.org@localhost>
date:      Sun Jul 22 14:32:16 2001 +0000

description:
bcopy -> memmove

diffstat:

 sys/arch/bebox/isa/pccons.c     |  28 +++++++++++++---------------
 sys/arch/bebox/stand/boot/vga.c |   9 +++++----
 2 files changed, 18 insertions(+), 19 deletions(-)

diffs (108 lines):

diff -r 3fac364c5a9c -r 634254a5e2e2 sys/arch/bebox/isa/pccons.c
--- a/sys/arch/bebox/isa/pccons.c       Sun Jul 22 14:20:13 2001 +0000
+++ b/sys/arch/bebox/isa/pccons.c       Sun Jul 22 14:32:16 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pccons.c,v 1.20 2001/05/02 10:32:15 scw Exp $  */
+/*     $NetBSD: pccons.c,v 1.21 2001/07/22 14:32:16 wiz Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1294,9 +1294,9 @@
                                        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);
@@ -1310,8 +1310,8 @@
                                        else if (cx > vs.nrow)
                                                cx = vs.nrow;
                                        if (cx < vs.nrow)
-                                               bcopy(Crtat + vs.ncol * cx,
-                                                   Crtat, vs.ncol * (vs.nrow -
+                                               memmove(Crtat, Crtat + vs.ncol *
+                                                   cx, vs.ncol * (vs.nrow -
                                                    cx) * CHR);
                                        fillw((vs.at << 8) | ' ',
                                            Crtat + vs.ncol * (vs.nrow - cx),
@@ -1332,10 +1332,9 @@
                                        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;
@@ -1348,10 +1347,9 @@
                                        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
@@ -1416,7 +1414,7 @@
                        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 -r 3fac364c5a9c -r 634254a5e2e2 sys/arch/bebox/stand/boot/vga.c
--- a/sys/arch/bebox/stand/boot/vga.c   Sun Jul 22 14:20:13 2001 +0000
+++ b/sys/arch/bebox/stand/boot/vga.c   Sun Jul 22 14:32:16 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vga.c,v 1.3 1999/06/28 01:20:45 sakamoto Exp $ */
+/*     $NetBSD: vga.c,v 1.4 2001/07/22 14:32:17 wiz Exp $      */
 
 /*-
  * Copyright (C) 1995-1997 Gary Thomas (gdt%linuxppc.org@localhost)
@@ -279,16 +279,17 @@
                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;
 
@@ -381,7 +382,7 @@
                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;
        }       



Home | Main Index | Thread Index | Old Index