#ifndef _PLATIF_H #define _PLATIF_H /** * This file looks so weird because it's designed to be processed both * by C and D. The C version is #included as-is. The D version is * passed through a basic processor that expects this file to be * in a VERY rigid format. * * D Preprocessor spec: * - Everything outside @ blocks is ignored * - Everything line an @COPY block is copied directly (except type translation) * - Everything line in an @FUNCTIONS block is expected to be of the form * "FUN(, , );" */ #ifdef _MSC_VER #define _LINKAGE extern "C" __declspec(dllexport) #else #define _LINKAGE extern "C" #endif #define FUN(__NAME__, __RV__, __PARAMS__) _LINKAGE __RV__ __NAME__ __PARAMS__ #define _CONST const #define _VOID void #define _LINT long // int masquerading as a long #define _LUINT unsigned long // unsigned int masquerading as an unsigned long #define _INT int #define _UINT unsigned int #define _LONG __int64 #define _ULONG unsigned __int64 #define _CHAR char //@COPY struct MofIf { // MOF streams -- first variable is a pointer to to a MofStream structure _INT (*Stream_New)(_VOID**); _INT (*Stream_Read)(_VOID*, _VOID*, _LUINT, _LUINT*); _INT (*Stream_Seek)(_VOID*, _ULONG); _INT (*Stream_Tell)(_VOID*, _ULONG*); _INT (*Stream_GetSize)(_VOID*, _ULONG*); _INT (*Stream_GetAvailable)(_VOID*, _ULONG*); }; //@END //@FUNCTIONS FUN(initMof, _VOID, (MofIf* _mof)); FUN(mimeOnFire, _INT, (_CONST _CHAR* path)); //@END #undef FUN #undef _LINKAGE #undef _CONST #undef _VOID #undef _INT #undef _UINT #undef _INTL #undef _UINTL #undef _LONG #undef _ULONG #undef _CHAR #endif