headers for OpenGL, OpenAL, and SDL

Anders F Björklund afb at algonet.se
Tue Mar 7 01:36:35 PST 2006


Don Clugston wrote:

> I have a grandiose scheme for a C2D project, where rather than storing 
> the converted headers (with associated licensing issues), we instead 
> store the 'script' (actually more of a hint file) that was used for 
> conversion.

Arguably, if those "scripts" are verbose enough they could be
subject to the very same licensing issues as the header files... :-(

But it would be neat to have for the old Mac OS headers (i.e. Carbon),
in addition to the full Win32 SDK headers that I gather you're doing.

> It would be fantastic to accumulate a database of C2D files.

Or have a better tool ? I guess you've looked at SWIG, by the way ?

> Sample C2D script format (excerpt of part of the one that converts the 
> Win SDK headers). There are a few other sections, apart from those shown 
> here. The C2D program can't do the full Win SDK yet (I'm currently 
> working out what to do with bitfields in structs), but it's OK for 
> fairly simple headers right now.

Bitfields usually means writing wrapper accessors/mutators...
But I guess that would be a bit hard to do automated, right ?

The Perl hack I used is at http://www.algonet.se/~afb/d/h2d.pl
It doesn't preprocess and it doesn't parse. It just replaces...

But I've successfully used it for "step one" in translating.

--anders



More information about the Digitalmars-d-announce mailing list