document distributed with 4.1BSD
[unix-history] / usr / src / lib / libcurses / delch.c
CommitLineData
6e1c93d0
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
3 * All rights reserved. The Berkeley software License Agreement
4 * specifies the terms and conditions for redistribution.
5 */
6
7#ifndef lint
8static char sccsid[] = "@(#)delch.c 5.1 (Berkeley) %G%";
9#endif not lint
10
8f970554
KA
11# include "curses.ext"
12
13/*
14 * This routine performs an insert-char on the line, leaving
15 * (_cury,_curx) unchanged.
16 *
8f970554
KA
17 */
18wdelch(win)
19reg WINDOW *win; {
20
21 reg char *temp1, *temp2;
22 reg char *end;
d45d8bdb 23 reg int lch;
8f970554
KA
24
25 end = &win->_y[win->_cury][win->_maxx - 1];
4ed74706
KA
26 temp1 = &win->_y[win->_cury][win->_curx];
27 temp2 = temp1 + 1;
8f970554
KA
28 while (temp1 < end)
29 *temp1++ = *temp2++;
30 *temp1 = ' ';
d45d8bdb 31 touchline(win, win->_cury, win->_curx, win->_maxx - 1);
8f970554
KA
32 return OK;
33}