lib_clearok.c revision 262629
1251876Speter/****************************************************************************
2251876Speter * Copyright (c) 1998-2000,2009 Free Software Foundation, Inc.              *
3251876Speter *                                                                          *
4251876Speter * Permission is hereby granted, free of charge, to any person obtaining a  *
5251876Speter * copy of this software and associated documentation files (the            *
6251876Speter * "Software"), to deal in the Software without restriction, including      *
7251876Speter * without limitation the rights to use, copy, modify, merge, publish,      *
8251876Speter * distribute, distribute with modifications, sublicense, and/or sell       *
9251876Speter * copies of the Software, and to permit persons to whom the Software is    *
10251876Speter * furnished to do so, subject to the following conditions:                 *
11251876Speter *                                                                          *
12251876Speter * The above copyright notice and this permission notice shall be included  *
13251876Speter * in all copies or substantial portions of the Software.                   *
14251876Speter *                                                                          *
15251876Speter * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16251876Speter * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17251876Speter * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18251876Speter * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19251876Speter * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20251876Speter * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21251876Speter * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22251876Speter *                                                                          *
23251876Speter * Except as contained in this notice, the name(s) of the above copyright   *
24251876Speter * holders shall not be used in advertising or otherwise to promote the     *
25251876Speter * sale, use or other dealings in this Software without prior written       *
26251876Speter * authorization.                                                           *
27251876Speter ****************************************************************************/
28251876Speter
29251876Speter/****************************************************************************
30251876Speter *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
31251876Speter *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
32251876Speter ****************************************************************************/
33251876Speter
34251876Speter/*
35251876Speter**	lib_clearok.c
36251876Speter**
37251876Speter**	The routine clearok.
38251876Speter**
39251876Speter*/
40251876Speter
41251876Speter#include <curses.priv.h>
42251876Speter
43251876SpeterMODULE_ID("$Id: lib_clearok.c,v 1.5 2009/10/24 22:34:53 tom Exp $")
44251876Speter
45251876SpeterNCURSES_EXPORT(int)
46251876Speterclearok(WINDOW *win, bool flag)
47251876Speter{
48251876Speter    T((T_CALLED("clearok(%p,%d)"), (void *) win, flag));
49251876Speter
50251876Speter    if (win) {
51251876Speter	win->_clear = flag;
52251876Speter	returnCode(OK);
53251876Speter    } else
54251876Speter	returnCode(ERR);
55251876Speter}
56251876Speter