1*0a6a1f1dSLionel Sambuc /* $NetBSD: notimeout.c,v 1.6 2014/02/28 07:58:42 blymn Exp $ */
251ffecc1SBen Gras
351ffecc1SBen Gras /*-
4*0a6a1f1dSLionel Sambuc * Copyright (c) 1998-2014 Brett Lymn (blymn@netbsd.org)
551ffecc1SBen Gras * All rights reserved.
651ffecc1SBen Gras *
751ffecc1SBen Gras * Redistribution and use in source and binary forms, with or without
851ffecc1SBen Gras * modification, are permitted provided that the following conditions
951ffecc1SBen Gras * are met:
1051ffecc1SBen Gras * 1. Redistributions of source code must retain the above copyright
1151ffecc1SBen Gras * notice, this list of conditions and the following disclaimer.
1251ffecc1SBen Gras * 2. The name of the author may not be used to endorse or promote products
1351ffecc1SBen Gras * derived from this software without specific prior written permission
1451ffecc1SBen Gras *
1551ffecc1SBen Gras * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1651ffecc1SBen Gras * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1751ffecc1SBen Gras * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1851ffecc1SBen Gras * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1951ffecc1SBen Gras * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2051ffecc1SBen Gras * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2151ffecc1SBen Gras * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2251ffecc1SBen Gras * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2351ffecc1SBen Gras * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2451ffecc1SBen Gras * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2551ffecc1SBen Gras *
2651ffecc1SBen Gras *
2751ffecc1SBen Gras */
2851ffecc1SBen Gras
2951ffecc1SBen Gras #include <sys/cdefs.h>
3051ffecc1SBen Gras #ifndef lint
31*0a6a1f1dSLionel Sambuc __RCSID("$NetBSD: notimeout.c,v 1.6 2014/02/28 07:58:42 blymn Exp $");
3251ffecc1SBen Gras #endif /* not lint */
3351ffecc1SBen Gras
3451ffecc1SBen Gras #include "curses.h"
3551ffecc1SBen Gras #include "curses_private.h"
3651ffecc1SBen Gras
3751ffecc1SBen Gras /*
3851ffecc1SBen Gras * notimeout --
3951ffecc1SBen Gras * Turn on and off inter-key timeout when assembling function keys for a
4051ffecc1SBen Gras * given window.
4151ffecc1SBen Gras */
4251ffecc1SBen Gras int
notimeout(WINDOW * win,bool bf)4351ffecc1SBen Gras notimeout(WINDOW *win, bool bf)
4451ffecc1SBen Gras {
4551ffecc1SBen Gras if (bf)
4651ffecc1SBen Gras win->flags |= __NOTIMEOUT;
47*0a6a1f1dSLionel Sambuc else
48*0a6a1f1dSLionel Sambuc win->flags &= ~__NOTIMEOUT;
4951ffecc1SBen Gras
5051ffecc1SBen Gras return OK;
5151ffecc1SBen Gras }
52