4.4BSD snapshot (revision 8.1); add 1993 to copyright
[unix-history] / usr / src / lib / libcurses / overwrite.c
index f10f979..04369b5 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)overwrite.c        5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)overwrite.c        5.14 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <ctype.h>
 #endif /* not lint */
 
 #include <ctype.h>
@@ -24,7 +24,7 @@ overwrite(win1, win2)
        register int x, y, endy, endx, starty, startx;
 
 #ifdef DEBUG
        register int x, y, endy, endx, starty, startx;
 
 #ifdef DEBUG
-       __TRACE("overwrite: (%0.2o, %0.2o);\n", win1, win2);
+       __CTRACE("overwrite: (%0.2o, %0.2o);\n", win1, win2);
 #endif
        starty = max(win1->begy, win2->begy);
        startx = max(win1->begx, win2->begx);
 #endif
        starty = max(win1->begy, win2->begy);
        startx = max(win1->begx, win2->begx);
@@ -33,15 +33,17 @@ overwrite(win1, win2)
        if (starty >= endy || startx >= endx)
                return (OK);
 #ifdef DEBUG
        if (starty >= endy || startx >= endx)
                return (OK);
 #ifdef DEBUG
-       __TRACE("overwrite: from (%d, %d) to (%d, %d)\n",
+       __CTRACE("overwrite: from (%d, %d) to (%d, %d)\n",
            starty, startx, endy, endx);
 #endif
        x = endx - startx;
        for (y = starty; y < endy; y++) {
            starty, startx, endy, endx);
 #endif
        x = endx - startx;
        for (y = starty; y < endy; y++) {
-               bcopy(&win1->lines[y - win1->begy]->line[startx - win1->begx],
+               (void)memcpy(
                    &win2->lines[y - win2->begy]->line[startx - win2->begx], 
                    &win2->lines[y - win2->begy]->line[startx - win2->begx], 
-                   x);
-               touchline(win2, y, startx - win2->begx, endx - win2->begx);
+                   &win1->lines[y - win1->begy]->line[startx - win1->begx],
+                   x * __LDATASIZE);
+               __touchline(win2, y, startx - win2->begx, endx - win2->begx,
+                   0);
        }
        return (OK);
 }
        }
        return (OK);
 }