headers for OpenGL, OpenAL, and SDL

Don Clugston dac at nospam.com.au
Tue Mar 7 01:23:24 PST 2006


James Pelcis wrote:
> Aside from that, you're right about the duplicated effort.  We need more 
> of a central repository for translated headers than currently exists (no 
> offense meant to dsource).

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.
It would be fantastic to accumulate a database of C2D files.

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.
====================================
; comments start with a semicolon
; --- The following ones are only for MingW ---
#REMOVE
AbnormalTermination

; --- These are common to both Microsoft and MingW ---

; these macros get removed entirely
#REMOVE
MAKEINTATOM
DefineHandleTable
FreeProcInstance
GetFreeSpace
LimitEmsPages

; these macros are replaced with inline functions
#MACRO
RtlFillMemory
  void RtlFillMemory(void* d, uint len, ubyte f){ memset(d, f, len); }
FreeModule
  alias FreeLibrary FreeModule;
HasOverlappedIoCompleted
  bool HasOverlappedIoCompleted(LPOVERLAPPED lpOverlapped){
   return (*lpOverlapped).Internal != STATUS_PENDING;
  }

; these '#if's get turned into version(xxx) {
#VERSION
(_WIN32_WINNT >= 0x0500)
  version(WinXP)



More information about the Digitalmars-d-announce mailing list