X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=rmac.h;h=fdc36ea72a38bddf7a8fb483a42a4a4b02d2facb;hp=e0f53df54e131d5a3d1ef3d89d3259dbe0bca40e;hb=66be644c3e5fbd7446d86c79e9e51b75c0442b49;hpb=3f2bccb78ab4cd59654d521c8aedfe5512ee6608 diff --git a/rmac.h b/rmac.h index e0f53df..fdc36ea 100644 --- a/rmac.h +++ b/rmac.h @@ -3,16 +3,25 @@ // RMAC.H - Main Application Code // Copyright (C) 199x Landon Dyer, 2011 Reboot & Friends // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986 -// Source Utilised with the Kind Permission of Landon Dyer +// Source utilised with the kind permission of Landon Dyer // #ifndef __RMAC_H__ #define __RMAC_H__ +#include +#include +#include +#include +#include +#include + // // TARGET SPECIFIC BUILD SETTINGS // -#ifdef WIN32 +#if defined(WIN32) || defined (WIN64) + #include + #include // Release platform - windows #define PLATFORM "Win32" #define _OPEN_FLAGS _O_TRUNC|_O_CREAT|_O_BINARY|_O_RDWR @@ -22,43 +31,48 @@ #if _MSC_VER > 1000 #pragma warning(disable:4996) #endif + + // Makes warnings double clickable on visual studio (ggn) + #define STRINGIZE_HELPER(x) #x + #define STRINGIZE(x) STRINGIZE_HELPER(x) + #define WARNING(desc) __pragma(message(__FILE__ "(" STRINGIZE(__LINE__) ") : Warning: " #desc)) + + // usage: + // WARNING(FIXME: Code removed because...) + + #else + //If we're not compiling for Visual Studio let's assume that we're using + //some flavour of gcc instead. So let's use the gcc compliant macro instead. + //If some weirdo uses something else (I dunno, Intel compiler or something?) + //this is probably going to explode spectacularly. Let's wait for the fireworks! + #define DO_PRAGMA(x) _Pragma (#x) + #define WARNING(desc) DO_PRAGMA(message (#desc)) + #define inline __inline + #endif - #include - #include - #include - #include - #include - #include - #include - #include + #else #ifdef __GCCUNIX__ + #include + #include // Release platform - mac OS-X or linux #define PLATFORM "OSX/Linux" #define _OPEN_FLAGS O_TRUNC|O_CREAT|O_RDWR #define _OPEN_INC O_RDONLY - #define _PERM_MODE S_IREAD|S_IWRITE - #include - #include - #include - #include - #include - #include - #include - #include + #define _PERM_MODE S_IRUSR|S_IWUSR + // WARNING WARNING WARNING + #define DO_PRAGMA(x) _Pragma (#x) + #define WARNING(desc) DO_PRAGMA(message (#desc)) #else // Release platform - not specified + #include #define PLATFORM "Unknown" #define _OPEN_FLAGS O_TRUNC|O_CREAT|O_RDWR #define _OPEN_INC O_RDONLY - #define _PERM_MODE S_IREAD|S_IWRITE - #include - #include - #include - #include - #include - #include - #include + #define _PERM_MODE S_IREAD|S_IWRITE + // Defined here, even though the platform may not support it... + #define DO_PRAGMA(x) _Pragma (#x) + #define WARNING(desc) DO_PRAGMA(message (#desc)) #endif #endif @@ -186,6 +200,8 @@ extern int lsym_flag; extern int sbra_flag; extern int obj_format; extern int legacy_flag; +extern LONG PRGFLAGS; +extern int optim_flag; // Exported functions char * fext(char *, char *, int);