move entry/exit debugging to 21.1
[unix-history] / usr / src / lib / libcurses / delch.c
index 608ff3a..6ef38f5 100644 (file)
@@ -1,44 +1,37 @@
 /*
 /*
- * 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.
  *
  *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley.  The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * %sccs.include.redist.c%
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)delch.c    5.3 (Berkeley) %G%";
-#endif /* not lint */
+static char sccsid[] = "@(#)delch.c    8.2 (Berkeley) %G%";
+#endif /* not lint */
 
 
-# include      "curses.ext"
+#include <string.h>
+
+#include "curses.h"
 
 /*
 
 /*
- *     This routine performs an insert-char on the line, leaving
- * (_cury,_curx) unchanged.
- *
+ * wdelch --
+ *     Do an insert-char on the line, leaving (cury, curx) unchanged.
  */
  */
+int
 wdelch(win)
 wdelch(win)
-reg WINDOW     *win; {
-
-       reg char        *temp1, *temp2;
-       reg char        *end;
-       reg int         lch;
+       register WINDOW *win;
+{
+       register __LDATA *end, *temp1, *temp2;
 
 
-       end = &win->_y[win->_cury][win->_maxx - 1];
-       temp1 = &win->_y[win->_cury][win->_curx];
+       end = &win->lines[win->cury]->line[win->maxx - 1];
+       temp1 = &win->lines[win->cury]->line[win->curx];
        temp2 = temp1 + 1;
        temp2 = temp1 + 1;
-       while (temp1 < end)
-               *temp1++ = *temp2++;
-       *temp1 = ' ';
-       touchline(win, win->_cury, win->_curx, win->_maxx - 1);
-       return OK;
+       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);
 }
 }