"PDCurses Description"; various cleanup. The new policy is simply to
describe PDCurses' behavior; if anyone wants the canonical descriptions
(which these weren't, anyway), they can refer to X/Open directly.
addrawch() etc. into real functions (necessary for this implementation
of acs_map[], but I was planning on it anyway), and finally got rid of
PDC_putctty(). The downside of this implementation (apart from the
wasted space and slightly reduced speed) is that A_ALTCHARSET is sort of
doing double duty -- indicating passthrough for characters below space,
plus delete, while actually mapping to an alternate character set for
a-z and a few others. However, this is basically what ncurses does
(did?), too. (And of course, the upside is that you no longer have to
define PDC_WIDE to get proper ACS chars when linking against a library
built with PDC_WIDE.)
correctly before. This also lets me finally chuck PDC_chadd() (or
rather, change PDC_chadd() to waddch() and chuck the wrapper). To Do:
Make _attr_passthru() external and use it here?
I only kept it in 2.8, rewriting it to mention trademark, to make it
clear that PDCurses was always public domain, despite the seemingly
contradictory wording in the boilerplate, and that trademark (not
copyright) was the only basis for restricting distribution in this case.
But I don't want to be like the Mozilla Foundation.
get..x. Also added getcury() and getcurx() functions. There were
numerous problems with the macros (poor maintainability, interference
with namespaces, bloated executables, etc.), and only one supposed
advantage: performance. Testing (even on a simulated 4 MHz machine) does
not show this advantage. The function call overhead is trivial compared
to other bottlenecks. The only other reason to keep them would be
tradition... and the faint possibility that someone, somewhere is
ifdef'ing off them (the same problem that undid my attempted enums). But
in this case, I really doubt it. Note that Larsson's Pccurses didn't use
the macros; comments by Frotz suggest he added them to conform to the
standard, but they aren't required by issue 4 version 2 (while the
functions are).
problem: They use wint_t rather than wchar_t. wchar_t is defined in C89,
but wint_t is only in Addendum 1, from '95. I could typedef wint_t
myself, but that seems like a bad idea for many reasons. So: Create a
new ifdef, USE_WIDE, and define it only for Win32 and X. That also saves
the overhead in DOS and OS/2, but it means that the base build reqs for
Win32 and X are even more recent. I doubt this is the final solution.
implementation, with exactly one wchar_t per cchar_t; the only
characters it handles properly are those that are one column wide.
However, the X/Open spec is vague enough that this may actually be a
conforming implementation. To Do: Document; test; and (long term) make
it work the way it's really supposed to.
2.7 (it was commented out previously). I tried all combinations of the
supported Win32 compilers, and could not get any one to build binaries
against another's libraries, except LCC against MSVC libs (even the
reverse didn't work) -- and that didn't even involve cdecl. It's
possible this could be made to work, but clearly it will involve a lot
more than just PDC_CDECL. Meanwhile, it's... well, really ugly. So I'm
dumping it, and just advise you to build PDCurses with the same compiler
you use to build your app -- as far as I can tell, that's the only way
that's ever worked anyway.