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 ***************************************************************************/
27 ** The routine winsch().
31 #include <curses.priv.h>
33 MODULE_ID("$Id: lib_insch.c,v 1.7 1997/04/12 17:43:02 tom Exp $")
35 int winsch(WINDOW *win, chtype c)
37 chtype *temp1, *temp2;
40 T((T_CALLED("winsch(%p, %s)"), win, _tracechtype(c)));
42 end = &win->_line[win->_cury].text[win->_curx];
43 temp1 = &win->_line[win->_cury].text[win->_maxx];
49 *temp1 = _nc_render(win, c);
51 win->_line[win->_cury].lastchar = win->_maxx;
52 if (win->_line[win->_cury].firstchar == _NOCHANGE
53 || win->_line[win->_cury].firstchar > win->_curx)
54 win->_line[win->_cury].firstchar = win->_curx;