From b74b481c80b42c420d61869e828442619c707bc0 Mon Sep 17 00:00:00 2001 From: Zeex Date: Thu, 2 Apr 2015 12:24:47 +0600 Subject: [PATCH] Don't change __Pawn in compat mode __Pawn is now fixed at 0x030A, i.e. the new value that was used in non-compat mode. I've come to realize that setting it to the old value doesn't really make much sense - we still allow the use of the new features but at the same time pretend to be the old compiler which of course doesn't have those features. Maybe we should add another built-in constant for that, perhaps call it __compat or something similar and define it only when running in compat mode. The users could then check if the compiler is in compat mode like this: #if defined __compat ... #endif --- source/compiler/sc1.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index b2d315b..32e235a 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -65,8 +65,7 @@ #include "sc.h" #include "svnrev.h" #define VERSION_STR "3.2." SVN_REVSTR -#define VERSION_INT 0x030A -#define VERSION_INT_COMPAT 0x0302 +#define VERSION_INT 0x030A static void resetglobals(void); static void initglobals(void); @@ -1462,7 +1461,7 @@ static void setconstants(void) add_constant("charmax",~(-1 << sCHARBITS) - 1,sGLOBAL,0); add_constant("ucharmax",(1 << (sizeof(cell)-1)*8)-1,sGLOBAL,0); - add_constant("__Pawn",pc_compat ? VERSION_INT_COMPAT : VERSION_INT,sGLOBAL,0); + add_constant("__Pawn",VERSION_INT,sGLOBAL,0); add_constant("__line",0,sGLOBAL,0); debug=0; @@ -5992,4 +5991,3 @@ static int *readwhile(void) return (wqptr-wqSIZE); } /* if */ } -