Also verify that dwin->cury >= begy (ditto for x), i.e. for pads make
sure that the current position is after the beginning of the displayed
portion. While here refactor the checks for better readability.
We should probably combine the y and x checks b/c if one of them is
not in the range, the current position as a whole is not in the range
and it doesn't make sense to pick and set just the y or just the x
part of it.
maxy is an absolute value and should not be adjusted for begy when we
check also absolute cury. Note that this change does not affect
calculations for normal windows as for them we always pass zero for
begy. Ditto for x.
functions. Express both old and new functions to manipulate
attributes using those functions. Check that the the new API's opts
argument (reserved by the standard for future use) is NULL and error
out if not (like getcchar/setcchar). No functional change intended.
We still try to mainain the ability to build our curses with
!HAVE_WCHAR, but it doesn't make sense to provide stubs for new wide
API functions that just error out when !HAVE_WCHAR. Any code that
only uses old API (and can work with !HAVE_WCHAR curses) doesn't use
those new functions. The code that uses new API obviosly cannot work
when all the new API is stubbed out.
So the plan is to drop the stubs. This commit does that for files
that are not even compiled with !HAVE_WCHAR (not only those stubs are
useless, they were not even there to begin with).
Same object code is generated for the normal HAVE_WCHAR case. Nothing
is even recompiled for !HAVE_WCHAR.
Ok by blymn@ jdc@ roy@
it's the old background characters that need to be updated, not spaces.
While here, simplify and also fix the bug introduced in 1.20 (that
lost the default color) - actually use the results of wbkgdset().
Looks like we don't have any of wide curses stuff documented, so this
seems to be a good place to start. Needs more exposition on wide
attr_t and how it's related to non-wide chtype, etc, etc.
I have to admit I have no idea what's going on here, but HAVE_WCHAR
code here inverted the sense of linecmp and cellcmp checks w.r.t the
!HAVE_WCHAR variant just above it. Cf. also all other similar #ifdefs
in this file.
Found through source code inspection, not really tested.