X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_touch.c;h=d8d59e138c2ec63c18750256404eb21d2f06eef1;hp=8d4a8803c1c91a252a95d4421e56e237e828f376;hb=790a85dbd4a81d5f5d8dd02a44d84f01512ef443;hpb=76a479337308b4b5e749fa8c38b7b7f482998c5b diff --git a/ncurses/base/lib_touch.c b/ncurses/base/lib_touch.c index 8d4a8803..d8d59e13 100644 --- a/ncurses/base/lib_touch.c +++ b/ncurses/base/lib_touch.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2012,2016 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2016,2017 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 * @@ -43,16 +44,19 @@ #include -MODULE_ID("$Id: lib_touch.c,v 1.13 2016/05/28 23:11:26 tom Exp $") +MODULE_ID("$Id: lib_touch.c,v 1.16 2020/02/02 23:34:34 tom Exp $") + +#undef is_linetouched NCURSES_EXPORT(bool) is_linetouched(WINDOW *win, int line) { T((T_CALLED("is_linetouched(%p,%d)"), (void *) win, line)); - /* XSI doesn't define any error */ - if (!win || (line > win->_maxy) || (line < 0)) - returnCode((bool) ERR); + /* XSI doesn't define any error, and gcc ultimately made it impossible */ + if (!win || (line > win->_maxy) || (line < 0)) { + returnCode(FALSE); + } returnCode(win->_line[line].firstchar != _NOCHANGE ? TRUE : FALSE); }