Frank Heckenbach:
Apologies for duplication, but you replied to subsequent messages and
a copied part of this one, so I'm guessing you didn't see the questions
below.
I'm responding to your complex (to me) message about ncurses types and
automatic configuration for multiple hosts. Any verification or
correction
of my approach would be appreciated.
Earlier Message from willett(a)udel.edu:
Frank, thanks very much for all your advice. I'm trying to get up to
speed here.
Ok, based on your message, I'm now using:
MedCard for chtype in ncurses.h (assuming typedef unsigned long
chtype)
CBoolean for "bool" in ncurses.h (assuming typedef unsigned int
bool)
CBoolean for an "int" which contains only TRUE or FALSE
CInteger for an "int" used as an integer (on older gpc I use
"integer")
tacs now uses index of char128 = #0 .. #127
The c translation types are very useful! Thanks.
Did I understand you to say I should use CBoolean in both the
above cases?
To create the ncurses.h file, I have to run ./configure within the
ncurses source directory. I could run this several times for
different hosts, to find what the range of types are. Right?
Could you suggest a couple of different hosts to try out?
Say, the most common? or perhaps, the most different?
or better, how do I read the configuration file directly? I see
that "configure" is a readable text file, but I can't find a list
of alternative "bool" (for example) definitions in that configuration
file.
In fact, I can't figure out what my own host (Mac OSX) is called, when
I try
./configure host=powerpc-apple-darwin
I get an "unknown host" message. Any suggestions?
When you said:
> BTW (unrelated), I'd suggest to rename the package to
> `gpc-ncurses-...' or `ncurses-gpc-...', to avoid confusion with an
> ncurses library package.
Did you mean I should name the interface file, e.g.
ncurses.pas -> gpc-ncurses.pas
or the unit, e.g.
unit ncurses; -> unit gpc-ncurses;
(If the latter, wouldn't gpc_ncurses be a more standard
Pascal name than gpc-ncurses?)
To do more things like reading the ncurses.h headers and
then automatically configuring ncurses.pas types to be
consistent, that's a bit beyond me. Beyond, both in that I wouldn't
know how to and that I don't have time to learn how to and test
all these. I wouldn't want to write c wrappers, a lot of work and
then we're stuck with double calls. What I'm thinking now is to use
all your
MedCard, CBoolean, etc types, and put in documentation
warning about what types of hosts would need edits before
use. and/or how to check ncurses.h and hand-modify ncurses.pas.
Does this approach and the above modifications seem reasonable?
Willett Kempton