[fetter-devel] Verrazano and ncurses

Rayiner Hashem rayiner at gmail.com
Sun Dec 4 08:52:49 UTC 2005


> Verrazano thing a try :)  First of all, I'd just like to say that
> Verrazano is as easy to use as it is hard to spell :)  Even a Lisp
> newbie like me (couple of months) could get it installed and
> generating bindings in an evening.

Great. I'm glad you found it easy to use.

> So I ran Verrazano over the ncurses.h file, it generated a file quite
> happily, but has a bit of an issue loading the generated file.  Here
> is my specific error...
> * (load "/home/brad/development/lisp/bindings/ncurses/ncurses-library.lisp")

Okay, I've tracked down the problem, and fixed them in CVS. Actually,
there were two. First, there was a change to CFFI-LUIS fairly recently
which modified the syntax for declaring arrays inside structures. What
used to be:

char unused[43] -> (-unused :char 43)

became:

char unused[43] -> (-unused :char :count 43)

I've modified Vzn to emit the new syntax.

The other problem is the handling of wchar_t. Apparently, GCC-XML
considers wchar_t to be a fundamental type. This sort of thing keeps
popping up on occasion, because GCC-XML's idea of fundamental types is
totally alien to ISO C++. This one is a bit hard to fix. There is no
good translation from wchar_t to a CFFI type. I punted on it and
translated it to :int, but this isn't a great solution --- wchar_t
doesn't necessarily map to an int on all platforms. It does on most
*NIX platforms, but I think it maps to a :short on Windows. I don't
really know where the true fix to this should go. Should Vzn start
having knowledge of platform-specific type sizes, or should CFFI
abstract it like it does :int, etc?

In any case, if you're on *NIX, this should work now. Please try again
with the latest CVS copy.

Sincerely,
    Rayiner Hashem



More information about the fetter-devel mailing list