From 4ed3f5b009cfd6323b1ebcddb89cd777390fbd8e Mon Sep 17 00:00:00 2001 From: TimeServ Date: Mon, 5 Sep 2005 23:50:46 +0000 Subject: [PATCH] poundonly -> hashonly git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1270 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/qcc.h | 2 +- engine/qclib/qcc_pr_comp.c | 2 +- engine/qclib/qcc_pr_lex.c | 2 +- engine/qclib/qccmain.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/qclib/qcc.h b/engine/qclib/qcc.h index 19dd24e72..12ffaf69a 100644 --- a/engine/qclib/qcc.h +++ b/engine/qclib/qcc.h @@ -476,7 +476,7 @@ extern pbool flag_ifstring; extern pbool flag_acc; extern pbool flag_caseinsensative; extern pbool flag_laxcasts; -extern pbool flag_poundonly; +extern pbool flag_hashonly; extern pbool opt_overlaptemps; extern pbool opt_shortenifnots; diff --git a/engine/qclib/qcc_pr_comp.c b/engine/qclib/qcc_pr_comp.c index e26591bce..784198a0b 100644 --- a/engine/qclib/qcc_pr_comp.c +++ b/engine/qclib/qcc_pr_comp.c @@ -71,7 +71,7 @@ pbool flag_ifstring; //makes if (blah) equivelent to if (blah != "") which reso pbool flag_acc; //reacc like behaviour of src files (finds *.qc in start dir and compiles all in alphabetical order) pbool flag_caseinsensative; //symbols will be matched to an insensative case if the specified case doesn't exist. This should b usable for any mod pbool flag_laxcasts; //Allow lax casting. This'll produce loadsa warnings of course. But allows compilation of certain dodgy code. -pbool flag_poundonly; //Allows use of only #constant for precompiler constants, allows certain preqcc using mods to compile +pbool flag_hashonly; //Allows use of only #constant for precompiler constants, allows certain preqcc using mods to compile pbool opt_overlaptemps; //reduce numpr_globals by reuse of temps. When they are not needed they are freed for reuse. The way this is implemented is better than frikqcc's. (This is the single most important optimisation) pbool opt_assignments; //STORE_F isn't used if an operation wrote to a temp. diff --git a/engine/qclib/qcc_pr_lex.c b/engine/qclib/qcc_pr_lex.c index 4112b7266..dda1321e1 100644 --- a/engine/qclib/qcc_pr_lex.c +++ b/engine/qclib/qcc_pr_lex.c @@ -2285,7 +2285,7 @@ void QCC_PR_Lex (void) if ( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' ) { - if (flag_poundonly || !QCC_PR_CheakCompConst()) //look for a macro. + if (flag_hashonly || !QCC_PR_CheakCompConst()) //look for a macro. QCC_PR_LexName (); else if (pr_token_type == tt_eof) diff --git a/engine/qclib/qccmain.c b/engine/qclib/qccmain.c index fce076ed0..2f3a4a703 100644 --- a/engine/qclib/qccmain.c +++ b/engine/qclib/qccmain.c @@ -219,7 +219,7 @@ compiler_flag_t compiler_flag[] = { {&flag_acc, 0, "acc", "Reacc support", "Reacc is a pascall like compiler. It was released before the Quake source was released. This flag has a few effects. It sorts all qc files in the current directory into alphabetical order to compile them. It also allows Reacc global/field distinctions, as well as allows ¦ as EOF. Whilst case insensativity and lax type checking are supported by reacc, they are seperate compiler flags in fteqcc."}, //reacc like behaviour of src files. {&flag_caseinsensative, 0, "caseinsens", "Case insensativity", "Causes fteqcc to become case insensative whilst compiling names. It's generally not advised to use this as it compiles a little more slowly and provides little benefit. However, it is required for full reacc support."}, //symbols will be matched to an insensative case if the specified case doesn't exist. This should b usable for any mod {&flag_laxcasts, FLAG_MIDCOMPILE,"lax", "Lax type checks", "Disables many errors (generating warnings instead) when function calls or operations refer to two normally incompatable types. This is required for reacc support, and can also allow certain (evil) mods to compile that were originally written for frikqcc."}, //Allow lax casting. This'll produce loadsa warnings of course. But allows compilation of certain dodgy code. - {&flag_poundonly, FLAG_MIDCOMPILE,"poundonly", "Pound-only constants", "Allows use of only #constant for precompiler constants, allows certain preqcc using mods to compile"}, + {&flag_hashonly, FLAG_MIDCOMPILE,"hashonly", "Hash-only constants", "Allows use of only #constant for precompiler constants, allows certain preqcc using mods to compile"}, {&opt_logicops, FLAG_MIDCOMPILE,"lo", "Logic ops", "This changes the behaviour of your code. It generates additional if operations to early-out in if statements. With this flag, the line if (0 && somefunction()) will never call the function. It can thus be considered an optimisation. However, due to the change of behaviour, it is not considered so by fteqcc. Note that due to inprecisions with floats, this flag can cause runaway loop errors within the player walk and run functions. This code is advised:\nplayer_stand1:\n if (self.velocity_x || self.velocity_y)\nplayer_run\n if (!(self.velocity_x || self.velocity_y))"}, {NULL} };