diff --git a/HISTORY b/HISTORY index 4c41166..245284a 100644 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +Dec. 9 2014 +Improved compatibility with BCB + May. 25 2014 Added a mb_set_inputer function which allows the user to specify an INPUT reader, thanks to Michael P. Welch for suggestion Added a mb_remove_reserved_func function which allows the user to disable/remove a reserved statement diff --git a/core/my_basic.c b/core/my_basic.c index 34cd2b0..66dfb47 100644 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -60,6 +60,12 @@ extern "C" { # pragma clang diagnostic ignored "-Wunused-variable" #endif /* __APPLE__ */ +#ifdef __BORLANDC__ +# pragma warn -8004 +# pragma warn -8008 +# pragma warn -8066 +#endif /* __BORLANDC__ */ + #ifdef MB_COMPACT_MODE # pragma pack(1) #endif /* MB_COMPACT_MODE */ @@ -72,9 +78,9 @@ extern "C" { /** Macros */ #define _VER_MAJOR 1 #define _VER_MINOR 0 -#define _VER_REVISION 42 +#define _VER_REVISION 43 #define _MB_VERSION ((_VER_MAJOR * 0x01000000) + (_VER_MINOR * 0x00010000) + (_VER_REVISION)) -#define _MB_VERSION_STRING "1.0.0042" +#define _MB_VERSION_STRING "1.0.0043" /* Uncomment this line to treat warnings as error */ /*#define _WARING_AS_ERROR*/ @@ -695,6 +701,8 @@ static int _close_std_lib(mb_interpreter_t* s); # else /* _MSC_VER < 1300 */ # define _do_nothing do { printf("Unaccessable function: %s\n", __FUNCTION__); } while(0) # endif /* _MSC_VER < 1300 */ +#elif defined __BORLANDC__ +# define _do_nothing do { printf("Unaccessable function: %s\n", __FUNC__); } while(0) #else /* _MSC_VER */ # define _do_nothing do { printf("Unaccessable function: %s\n", __FUNCTION__); } while(0) #endif /* _MSC_VER */ @@ -5909,6 +5917,12 @@ _exit: # pragma pack() #endif /* MB_COMPACT_MODE */ +#ifdef __BORLANDC__ +# pragma warn .8004 +# pragma warn .8008 +# pragma warn .8066 +#endif /* __BORLANDC__ */ + #ifdef __APPLE__ # pragma clang diagnostic pop #endif /* __APPLE__ */ diff --git a/core/my_basic.h b/core/my_basic.h index 8630873..76dd973 100644 --- a/core/my_basic.h +++ b/core/my_basic.h @@ -64,7 +64,11 @@ extern "C" { #ifndef _MSC_VER # ifndef _strcmpi -# define _strcmpi strcasecmp +# ifdef __BORLANDC__ +# define _strcmpi stricmp +# else /* __BORLANDC__*/ +# define _strcmpi strcasecmp +# endif /* __BORLANDC__ */ # endif /* _strcmpi */ #endif /* _MSC_VER */ diff --git a/shell/main.c b/shell/main.c index 59d7557..a76ab14 100644 --- a/shell/main.c +++ b/shell/main.c @@ -32,7 +32,7 @@ #ifdef _MSC_VER # include # include -#else /* _MSC_VER */ +#elif !defined __BORLANDC__ # include #endif /* _MSC_VER */ #include @@ -46,6 +46,12 @@ # pragma warning(disable : 4996) #endif /* _MSC_VER */ +#ifdef __BORLANDC__ +# pragma warn -8004 +# pragma warn -8008 +# pragma warn -8066 +#endif /* __BORLANDC__ */ + #define _MAX_LINE_LENGTH 256 #define _str_eq(__str1, __str2) (_strcmpi(__str1, __str2) == 0)