1139749Simp/****************************************************************************
246495Swpaul * Copyright 2020 Thomas E. Dickey                                          *
346495Swpaul * Copyright 1998-2009,2010 Free Software Foundation, Inc.                  *
446495Swpaul *                                                                          *
546495Swpaul * Permission is hereby granted, free of charge, to any person obtaining a  *
646495Swpaul * copy of this software and associated documentation files (the            *
746495Swpaul * "Software"), to deal in the Software without restriction, including      *
846495Swpaul * without limitation the rights to use, copy, modify, merge, publish,      *
946495Swpaul * distribute, distribute with modifications, sublicense, and/or sell       *
1046495Swpaul * copies of the Software, and to permit persons to whom the Software is    *
1146495Swpaul * furnished to do so, subject to the following conditions:                 *
1246495Swpaul *                                                                          *
1346495Swpaul * The above copyright notice and this permission notice shall be included  *
1446495Swpaul * in all copies or substantial portions of the Software.                   *
1546495Swpaul *                                                                          *
1646495Swpaul * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
1746495Swpaul * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
1846495Swpaul * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
1946495Swpaul * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
2046495Swpaul * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
2146495Swpaul * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
2246495Swpaul * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
2346495Swpaul *                                                                          *
2446495Swpaul * Except as contained in this notice, the name(s) of the above copyright   *
2546495Swpaul * holders shall not be used in advertising or otherwise to promote the     *
2646495Swpaul * sale, use or other dealings in this Software without prior written       *
2746495Swpaul * authorization.                                                           *
2846495Swpaul ****************************************************************************/
2946495Swpaul
3046495Swpaul/****************************************************************************
3146495Swpaul *  Author: Thomas E. Dickey <dickey@clark.net> 1998                        *
3250477Speter ****************************************************************************/
3346495Swpaul
3446495Swpaul/*
3590580Sbrooks**	lib_winch.c
3690580Sbrooks**
3746495Swpaul**	The routine winch().
38109323Ssam**
39109323Ssam*/
40109323Ssam
41109323Ssam#include <curses.priv.h>
42109323Ssam
43109323SsamMODULE_ID("$Id: lib_winch.c,v 1.9 2020/02/02 23:34:34 tom Exp $")
4446495Swpaul
4590580SbrooksNCURSES_EXPORT(chtype)
4682256Snsayerwinch(WINDOW *win)
4782256Snsayer{
4882256Snsayer    T((T_CALLED("winch(%p)"), (void *) win));
4974906Salfred    if (win != 0) {
5082256Snsayer	returnChtype((chtype) CharOf(win->_line[win->_cury].text[win->_curx])
5182256Snsayer		     | AttrOf(win->_line[win->_cury].text[win->_curx]));
5274998Swpaul    } else {
5374998Swpaul	returnChtype(0);
54181209Simp    }
55181209Simp}
5674906Salfred