From: Shamus Hammons Date: Tue, 13 Sep 2016 03:27:30 +0000 (-0500) Subject: Version bump. :-) X-Git-Tag: v2.1.0~153 X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=commitdiff_plain;h=2d302cb8c260f92984efbe9b6c8f9871beebeca5;ds=sidebyside Version bump. :-) --- diff --git a/direct.c b/direct.c index 7010e46..3ae88ca 100644 --- a/direct.c +++ b/direct.c @@ -1590,28 +1590,28 @@ int d_gpumain(void) return error("What the hell? Do you think we adhere to the Goof standard?"); } + // // .opt - turn a specific (or all) optimisation on or off // int d_opt(void) { - char * tmpstr; - while (*tok != EOL) { if (*tok == STRING) { tok++; - tmpstr = string[*tok++]; + char * tmpstr = string[*tok++]; if (ParseOptimization(tmpstr) != OK) { char temperr[256]; - sprintf(temperr, "unknown optimisation flag '%s'.", tmpstr); + sprintf(temperr, "unknown optimisation flag '%s'", tmpstr); return error(temperr); } } else - return error(".opt directive needs every switch enclosed inside quotation marks."); + return error(".opt directive needs every switch enclosed inside quotation marks"); } -} \ No newline at end of file +} + diff --git a/eagen0.c b/eagen0.c index bf4ba3d..88ebdb3 100644 --- a/eagen0.c +++ b/eagen0.c @@ -72,7 +72,7 @@ int eaNgen(WORD siz) return OK; } - if (v + 0x8000 >= 0x18000) + if ((v + 0x8000) >= 0x18000) return error(range_error); D_word(v); diff --git a/rmac.c b/rmac.c index 45cd1d8..cde6e12 100644 --- a/rmac.c +++ b/rmac.c @@ -176,34 +176,33 @@ void DisplayVersion(void) // int ParseOptimization(char * optstring) { - int onoff = 0; - - if (*optstring == '+') - onoff = 1; - else if (*optstring != '~') - return ERROR; - - if ((optstring[2] == 'a' || optstring[2] == 'A') && - (optstring[3] == 'l' || optstring[3] == 'L') && - (optstring[4] == 'l' || optstring[4] == 'L')) - { - memset(optim_flags, onoff, OPT_COUNT * sizeof(int)); - return OK; - } - else if (optstring[1] == 'o' || optstring[1] == 'O') //Turn on specific optimisation + int onoff = 0; + + if (*optstring == '+') + onoff = 1; + else if (*optstring != '~') + return ERROR; + + if ((optstring[2] == 'a' || optstring[2] == 'A') + && (optstring[3] == 'l' || optstring[3] == 'L') + && (optstring[4] == 'l' || optstring[4] == 'L')) { - int opt_no = atoi(&optstring[2]); - if ((opt_no >= 0) && (opt_no < OPT_COUNT)) - optim_flags[opt_no] = onoff; - else - { - return ERROR; - } - } - else - { - return ERROR; - } + memset(optim_flags, onoff, OPT_COUNT * sizeof(int)); + return OK; + } + else if (optstring[1] == 'o' || optstring[1] == 'O') // Turn on specific optimisation + { + int opt_no = atoi(&optstring[2]); + + if ((opt_no >= 0) && (opt_no < OPT_COUNT)) + optim_flags[opt_no] = onoff; + else + return ERROR; + } + else + { + return ERROR; + } } diff --git a/rmac.h b/rmac.h index 1fa419b..4a4e8b9 100644 --- a/rmac.h +++ b/rmac.h @@ -41,10 +41,11 @@ // 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! + // 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 diff --git a/version.h b/version.h index c152043..5884614 100644 --- a/version.h +++ b/version.h @@ -13,6 +13,6 @@ #define MAJOR 1 // Major version number #define MINOR 4 // Minor version number -#define PATCH 16 // Patch release number +#define PATCH 17 // Patch release number #endif // __VERSION_H__