xref: /minix3/lib/libcurses/idcok.c (revision 51ffecc181005cb45a40108612ee28d1daaeeb86)
1*51ffecc1SBen Gras /*	$NetBSD: idcok.c,v 1.1 2002/07/19 13:22:41 blymn Exp $	*/
2*51ffecc1SBen Gras 
3*51ffecc1SBen Gras /*-
4*51ffecc1SBen Gras  * Copyright (c) 1998-1999 Brett Lymn (blymn@baea.com.au, brett_lymn@yahoo.com)
5*51ffecc1SBen Gras  * All rights reserved.
6*51ffecc1SBen Gras  *
7*51ffecc1SBen Gras  * This software has been donated to the NetBSD Foundation by the
8*51ffecc1SBen Gras  * Author.
9*51ffecc1SBen Gras  *
10*51ffecc1SBen Gras  * Redistribution and use in source and binary forms, with or without
11*51ffecc1SBen Gras  * modification, are permitted provided that the following conditions
12*51ffecc1SBen Gras  * are met:
13*51ffecc1SBen Gras  * 1. Redistributions of source code must retain the above copyright
14*51ffecc1SBen Gras  *    notice, this list of conditions and the following disclaimer.
15*51ffecc1SBen Gras  * 2. The name of the author may not be used to endorse or promote products
16*51ffecc1SBen Gras  *    derived from this software without specific prior written permission
17*51ffecc1SBen Gras  *
18*51ffecc1SBen Gras  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19*51ffecc1SBen Gras  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20*51ffecc1SBen Gras  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21*51ffecc1SBen Gras  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22*51ffecc1SBen Gras  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23*51ffecc1SBen Gras  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24*51ffecc1SBen Gras  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25*51ffecc1SBen Gras  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26*51ffecc1SBen Gras  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27*51ffecc1SBen Gras  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*51ffecc1SBen Gras  *
29*51ffecc1SBen Gras  *
30*51ffecc1SBen Gras  */
31*51ffecc1SBen Gras 
32*51ffecc1SBen Gras #include <sys/cdefs.h>
33*51ffecc1SBen Gras #ifndef lint
34*51ffecc1SBen Gras #if 0
35*51ffecc1SBen Gras static char sccsid[] = "@(#)idcok.c	blymn 2002/06/06";
36*51ffecc1SBen Gras #else
37*51ffecc1SBen Gras __RCSID("$NetBSD: idcok.c,v 1.1 2002/07/19 13:22:41 blymn Exp $");
38*51ffecc1SBen Gras #endif
39*51ffecc1SBen Gras #endif				/* not lint */
40*51ffecc1SBen Gras 
41*51ffecc1SBen Gras #include "curses.h"
42*51ffecc1SBen Gras #include "curses_private.h"
43*51ffecc1SBen Gras 
44*51ffecc1SBen Gras /*
45*51ffecc1SBen Gras  * idcok --
46*51ffecc1SBen Gras  *	Turn on and off using insert/delete char sequences for the
47*51ffecc1SBen Gras  *	given window.  Note, currently, the ic/dc capabilities are not
48*51ffecc1SBen Gras  *      used, this function is only provided for compatibility.
49*51ffecc1SBen Gras  */
50*51ffecc1SBen Gras int
idcok(WINDOW * win,bool bf)51*51ffecc1SBen Gras idcok(WINDOW *win, bool bf)
52*51ffecc1SBen Gras {
53*51ffecc1SBen Gras 	if (bf)
54*51ffecc1SBen Gras 		win->flags |= __IDCHAR;
55*51ffecc1SBen Gras 	else
56*51ffecc1SBen Gras 		win->flags &= ~__IDCHAR;
57*51ffecc1SBen Gras 	return (OK);
58*51ffecc1SBen Gras }
59