2 /***************************************************************************
4 ****************************************************************************
5 * ncurses is copyright (C) 1992-1995 *
7 * zmbenhal@netcom.com *
9 * esr@snark.thyrsus.com *
11 * Permission is hereby granted to reproduce and distribute ncurses *
12 * by any means and for any fee, whether alone or as part of a *
13 * larger distribution, in source or in binary form, PROVIDED *
14 * this notice is included with any such distribution, and is not *
15 * removed from any of its header files. Mention of ncurses in any *
16 * applications linked with it is highly appreciated. *
18 * ncurses comes AS IS with no warranty, implied or expressed. *
20 ***************************************************************************/
25 ** The routines untouchwin(),
32 #include <curses.priv.h>
34 MODULE_ID("$Id: lib_touch.c,v 1.3 1997/02/02 00:26:15 tom Exp $")
36 int is_linetouched(WINDOW *win, int line)
38 T((T_CALLED("is_linetouched(%p,%d)"), win, line));
40 /* XSI doesn't define any error */
41 if (line > win->_maxy || line < 0)
44 returnCode(win->_line[line].firstchar != _NOCHANGE ? TRUE : FALSE);
47 int is_wintouched(WINDOW *win)
51 T((T_CALLED("is_wintouched(%p)"), win));
53 for (i = 0; i <= win->_maxy; i++)
54 if (win->_line[i].firstchar != _NOCHANGE)
59 int wtouchln(WINDOW *win, int y, int n, int changed)
63 T((T_CALLED("wtouchln(%p,%d,%d,%d)"), win, y, n, changed));
65 for (i = y; i < y+n; i++) {
66 win->_line[i].firstchar = changed ? 0 : _NOCHANGE;
67 win->_line[i].lastchar = changed ? win->_maxx : _NOCHANGE;