1 /* 2 * Copyright (c) 1981 Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)delch.c 5.14 (Berkeley) 02/18/93"; 10 #endif /* not lint */ 11 12 #include <curses.h> 13 #include <string.h> 14 15 /* 16 * wdelch -- 17 * Do an insert-char on the line, leaving (cury, curx) unchanged. 18 */ 19 int 20 wdelch(win) 21 register WINDOW *win; 22 { 23 register __LDATA *end, *temp1, *temp2; 24 25 end = &win->lines[win->cury]->line[win->maxx - 1]; 26 temp1 = &win->lines[win->cury]->line[win->curx]; 27 temp2 = temp1 + 1; 28 while (temp1 < end) { 29 (void)memcpy(temp1, temp2, sizeof(__LDATA)); 30 temp1++, temp2++; 31 } 32 temp1->ch = ' '; 33 temp1->attr = 0; 34 __touchline(win, win->cury, win->curx, win->maxx - 1, 0); 35 return (OK); 36 } 37