move entry/exit debugging to 21.1
[unix-history] / usr / src / lib / libcurses / delch.c
index 528b0a1..6ef38f5 100644 (file)
@@ -1,15 +1,17 @@
 /*
 /*
- * Copyright (c) 1981 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1981, 1993, 1994
+ *     The Regents of the University of California.  All rights reserved.
  *
  * %sccs.include.redist.c%
  */
 
 #ifndef lint
  *
  * %sccs.include.redist.c%
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)delch.c    5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)delch.c    8.2 (Berkeley) %G%";
 #endif /* not lint */
 
 #endif /* not lint */
 
-#include <curses.h>
+#include <string.h>
+
+#include "curses.h"
 
 /*
  * wdelch --
 
 /*
  * wdelch --
@@ -19,14 +21,17 @@ int
 wdelch(win)
        register WINDOW *win;
 {
 wdelch(win)
        register WINDOW *win;
 {
-       register char *end, *temp1, *temp2;
+       register __LDATA *end, *temp1, *temp2;
 
        end = &win->lines[win->cury]->line[win->maxx - 1];
        temp1 = &win->lines[win->cury]->line[win->curx];
        temp2 = temp1 + 1;
 
        end = &win->lines[win->cury]->line[win->maxx - 1];
        temp1 = &win->lines[win->cury]->line[win->curx];
        temp2 = temp1 + 1;
-       while (temp1 < end)
-               *temp1++ = *temp2++;
-       *temp1 = ' ';
-       touchline(win, win->cury, win->curx, win->maxx - 1);
+       while (temp1 < end) {
+               (void)memcpy(temp1, temp2, sizeof(__LDATA));
+               temp1++, temp2++;
+       }
+       temp1->ch = ' ';
+       temp1->attr = 0;
+       __touchline(win, win->cury, win->curx, win->maxx - 1, 0);
        return (OK);
 }
        return (OK);
 }