1 /* Public Domain Curses */
5 RCSID("$Id: delch.c,v 1.33 2008/07/13 16:08:18 wmcbrine Exp $")
7 /*man-start**************************************************************
13 int wdelch(WINDOW *win);
14 int mvdelch(int y, int x);
15 int mvwdelch(WINDOW *win, int y, int x);
18 The character under the cursor in the window is deleted. All
19 characters to the right on the same line are moved to the left
20 one position and the last character on the line is filled with
21 a blank. The cursor position does not change (after moving to
22 y, x if coordinates are specified).
25 All functions return OK on success and ERR on error.
27 Portability X/Open BSD SYS V
33 **man-end****************************************************************/
37 int wdelch(WINDOW
*win
)
42 PDC_LOG(("wdelch() - called\n"));
49 maxx
= win
->_maxx
- 1;
50 temp1
= &win
->_y
[y
][x
];
52 memmove(temp1
, temp1
+ 1, (maxx
- x
) * sizeof(chtype
));
54 /* wrs (4/10/93) account for window background */
56 win
->_y
[y
][maxx
] = win
->_bkgd
;
58 win
->_lastch
[y
] = maxx
;
60 if ((win
->_firstch
[y
] == _NO_CHANGE
) || (win
->_firstch
[y
] > x
))
70 PDC_LOG(("delch() - called\n"));
72 return wdelch(stdscr
);
75 int mvdelch(int y
, int x
)
77 PDC_LOG(("mvdelch() - called\n"));
79 if (move(y
, x
) == ERR
)
82 return wdelch(stdscr
);
85 int mvwdelch(WINDOW
*win
, int y
, int x
)
87 PDC_LOG(("mvwdelch() - called\n"));
89 if (wmove(win
, y
, x
) == ERR
)