X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fwidechar%2Flib_in_wch.c;h=a665145c6b98bb7579e768232185092ff6980f97;hp=5cd92e382de4f3a5d5a329a5cda5dd9e5987b8ed;hb=4d01f5de859abce88a97e91460db7f3769eedbc1;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/ncurses/widechar/lib_in_wch.c b/ncurses/widechar/lib_in_wch.c index 5cd92e38..a665145c 100644 --- a/ncurses/widechar/lib_in_wch.c +++ b/ncurses/widechar/lib_in_wch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002-2004,2006 Free Software Foundation, Inc. * + * Copyright (c) 2002-2009,2016 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,17 +39,19 @@ #include -MODULE_ID("$Id: lib_in_wch.c,v 1.4 2006/09/03 15:41:22 tom Exp $") +MODULE_ID("$Id: lib_in_wch.c,v 1.6 2016/05/28 23:36:34 tom Exp $") NCURSES_EXPORT(int) win_wch(WINDOW *win, cchar_t *wcval) { - int row, col; int code = OK; - TR(TRACE_CCALLS, (T_CALLED("win_wch(%p,%p)"), win, wcval)); + TR(TRACE_CCALLS, (T_CALLED("win_wch(%p,%p)"), (void *) win, (void *) wcval)); + if (win != 0 && wcval != 0) { + int row, col; + getyx(win, row, col); *wcval = win->_line[row].text[col];