Frank suggested that I try to figure out configuration for ncurses, so that if it were distributed it should work on all/most targets.
I'm making (modest) progress. (p.s. Also I have the ncurses mouse routines working, cool.)
On 5 May 2005, at 21:16, Frank Heckenbach wrote:
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? ....
I'm not sure of a straightforward way. You may want to ask on the ncurses list, though. But even if you knew all possible settings, the problem still remains to get the one for each current target.
I find there are only five values put in. One, @cf_cv_type_of_bool@, seems to be taken care of by the gpc type CBoolean. Unless I'm missing something, I don't need to do anything about that.
A second, @cf_cv_typeof_chtype@ is for the type of chtype. Is there any way to compute this in the compiler and have a type?
Same question for widec_shift and shift_limit.
If at least one of these is "no", then the configuration approach would be needed. This could be done with reference to the file created when './configure' is run on ncurses.h.in, which gives the above values.
Any thoughts welcome, on the question of how to make my Pascal interface for ncurses most portable across gpc implementations.
More specifics below.
Willett Kempton
---------------------------------------------------------------
To make the ncurses Pascal interface portable, the following substitutions are needed:
Most important: @cf_cv_typeof_chtype@ @cf_cv_type_of_bool@
For A_ATTRIBUTES, etc @cf_cv_widec_shift@ (how unsafe to assume 8?) @cf_cv_shift_limit@ @cf_cv_1UL@
Where are they? All cf_cv_ types are in config.cache after configure run on ncurses source They are also all generated by running the "configure" file on the ncurses source
...
Example values (fixed font lines up)
system typeof_chtype pas widec_shift shift_limit 1UL -------------------- ------------------- ------- ----------- ----------- --- powerpc-apple-darwin unsigned long chtype; MedCard 8 32 1UL