]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Please the whitespace gods
authorDale Weiler <killfieldengine@gmail.com>
Sat, 27 Jul 2013 11:48:55 +0000 (11:48 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 27 Jul 2013 11:48:55 +0000 (11:48 +0000)
ast.c
ir.c
ir.h
main.c
parser.c
stat.c

diff --git a/ast.c b/ast.c
index 87d34cedc84d83badf820f32ac492916138e8e56..bb15b3570ec68f8b2d2b797e3c796890941af9c1 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1185,7 +1185,7 @@ ast_function* ast_function_new(lex_ctx ctx, const char *name, ast_value *vtype)
     self->return_value     = NULL;
 
     return self;
     self->return_value     = NULL;
 
     return self;
-    
+
 cleanup:
     mem_d(self);
     return NULL;
 cleanup:
     mem_d(self);
     return NULL;
@@ -2884,12 +2884,12 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value
     /* From 'bin' we jump to whatever comes first */
     if      (bprecond)   tmpblock = bprecond;
     else                 tmpblock = bbody;    /* can never be null */
     /* From 'bin' we jump to whatever comes first */
     if      (bprecond)   tmpblock = bprecond;
     else                 tmpblock = bbody;    /* can never be null */
-    
+
     /* DEAD CODE
     else if (bpostcond)  tmpblock = bpostcond;
     else                 tmpblock = bout;
     */
     /* DEAD CODE
     else if (bpostcond)  tmpblock = bpostcond;
     else                 tmpblock = bout;
     */
-    
+
     if (!ir_block_create_jump(bin, ast_ctx(self), tmpblock))
         return false;
 
     if (!ir_block_create_jump(bin, ast_ctx(self), tmpblock))
         return false;
 
@@ -2899,7 +2899,7 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value
         ir_block *ontrue, *onfalse;
         ontrue = bbody; /* can never be null */
 
         ir_block *ontrue, *onfalse;
         ontrue = bbody; /* can never be null */
 
-        /* all of this is dead code 
+        /* all of this is dead code
         else if (bincrement) ontrue = bincrement;
         else                 ontrue = bpostcond;
         */
         else if (bincrement) ontrue = bincrement;
         else                 ontrue = bpostcond;
         */
@@ -2943,7 +2943,7 @@ bool ast_loop_codegen(ast_loop *self, ast_function *func, bool lvalue, ir_value
         if      (bprecond)   ontrue = bprecond;
         else                 ontrue = bbody; /* can never be null */
 
         if      (bprecond)   ontrue = bprecond;
         else                 ontrue = bbody; /* can never be null */
 
-        /* all of this is dead code 
+        /* all of this is dead code
         else if (bincrement) ontrue = bincrement;
         else                 ontrue = bpostcond;
         */
         else if (bincrement) ontrue = bincrement;
         else                 ontrue = bpostcond;
         */
diff --git a/ir.c b/ir.c
index 5e885872876327ea17a9325b79a4a527800d9d67..f570cbec6de06c8c3d9ceffb5531b041c979a1d3 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -1807,21 +1807,21 @@ ir_value* ir_block_create_binop(ir_block *self, lex_ctx ctx,
         default:
             /* ranges: */
             /* boolean operations result in floats */
         default:
             /* ranges: */
             /* boolean operations result in floats */
-            
+
             /*
              * opcode >= 10 takes true branch opcode is at least 10
              * opcode <= 23 takes false branch opcode is at least 24
              */
             if (opcode >= INSTR_EQ_F && opcode <= INSTR_GT)
                 ot = TYPE_FLOAT;
             /*
              * opcode >= 10 takes true branch opcode is at least 10
              * opcode <= 23 takes false branch opcode is at least 24
              */
             if (opcode >= INSTR_EQ_F && opcode <= INSTR_GT)
                 ot = TYPE_FLOAT;
-                
-            /* 
-             * At condition "opcode <= 23", the value of "opcode" must be 
+
+            /*
+             * At condition "opcode <= 23", the value of "opcode" must be
              * at least 24.
              * At condition "opcode <= 23", the value of "opcode" cannot be
              * equal to any of {1, 2, 3, 4, 5, 6, 7, 8, 9, 62, 63, 64, 65}.
              * The condition "opcode <= 23" cannot be true.
              * at least 24.
              * At condition "opcode <= 23", the value of "opcode" cannot be
              * equal to any of {1, 2, 3, 4, 5, 6, 7, 8, 9, 62, 63, 64, 65}.
              * The condition "opcode <= 23" cannot be true.
-             * 
+             *
              * Thus ot=2 (TYPE_FLOAT) can never be true
              */
 #if 0
              * Thus ot=2 (TYPE_FLOAT) can never be true
              */
 #if 0
diff --git a/ir.h b/ir.h
index f5b47da8dcf2e3d4dfc0f2191e097dc6b0ee89bb..34dea1a99cdbd285e586be25c95db8dc782d8504 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -267,7 +267,7 @@ typedef struct ir_builder_s
     /* there should just be this one nil */
     ir_value    *nil;
     ir_value    *reserved_va_count;
     /* there should just be this one nil */
     ir_value    *nil;
     ir_value    *reserved_va_count;
-    
+
     /* code generator */
     code_t      *code;
 } ir_builder;
     /* code generator */
     code_t      *code;
 } ir_builder;
diff --git a/main.c b/main.c
index 6029d6d2e64d5d0dfebf1925319b3b1a1f54e83c..d12e4c39bcd6159ab3412613189ddcd8dc525c56 100644 (file)
--- a/main.c
+++ b/main.c
@@ -682,7 +682,7 @@ int main(int argc, char **argv) {
 
             if (!line[0] || (line[0] == '/' && line[1] == '/'))
                 continue;
 
             if (!line[0] || (line[0] == '/' && line[1] == '/'))
                 continue;
-                
+
             if (hasline) {
                 item.filename = util_strdup(line);
                 item.type     = TYPE_QC;
             if (hasline) {
                 item.filename = util_strdup(line);
                 item.type     = TYPE_QC;
index 159c7c93dc35185b6a5b73391ff2b5fe75fb410e..ea4930f02b79f8d0d4b4f52e4a6e9fdee7d1b94c 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1042,20 +1042,20 @@ static bool parser_sy_apply_operator(parser_t *parser, shunt *sy)
              * Further more, the only time it is legal to do XOR otherwise
              * is when both operand are floats. This nicely crafted if
              * statement catches them all.
              * Further more, the only time it is legal to do XOR otherwise
              * is when both operand are floats. This nicely crafted if
              * statement catches them all.
-             * 
+             *
              * In the event that the first operand is a vector, two
              * possible situations can arise, thus, each element of
              * vector A (operand A) is exclusive-ORed with the corresponding
              * element of vector B (operand B), If B is scalar, the
              * scalar value is first replicated for each element.
              * In the event that the first operand is a vector, two
              * possible situations can arise, thus, each element of
              * vector A (operand A) is exclusive-ORed with the corresponding
              * element of vector B (operand B), If B is scalar, the
              * scalar value is first replicated for each element.
-             * 
+             *
              * The QCVM itself lacks a BITXOR instruction. Thus emulating
              * the mathematics of it is required. The following equation
              * is used: (LHS | RHS) & ~(LHS & RHS). However, due to the
              * QCVM also lacking a BITNEG instruction, we need to emulate
              * ~FOO with -1 - FOO, the whole process becoming this nicely
              * crafted expression: (LHS | RHS) & (-1 - (LHS & RHS)).
              * The QCVM itself lacks a BITXOR instruction. Thus emulating
              * the mathematics of it is required. The following equation
              * is used: (LHS | RHS) & ~(LHS & RHS). However, due to the
              * QCVM also lacking a BITNEG instruction, we need to emulate
              * ~FOO with -1 - FOO, the whole process becoming this nicely
              * crafted expression: (LHS | RHS) & (-1 - (LHS & RHS)).
-             * 
+             *
              * When A is not scalar, this process is repeated for all
              * components of vector A with the value in operand B,
              * only if operand B is scalar. When A is not scalar, and B
              * When A is not scalar, this process is repeated for all
              * components of vector A with the value in operand B,
              * only if operand B is scalar. When A is not scalar, and B
@@ -1063,7 +1063,7 @@ static bool parser_sy_apply_operator(parser_t *parser, shunt *sy)
              * components of the vector A with the components of vector B.
              * Finally when A is scalar and B is scalar, this process is
              * simply used once for A and B being LHS and RHS respectfully.
              * components of the vector A with the components of vector B.
              * Finally when A is scalar and B is scalar, this process is
              * simply used once for A and B being LHS and RHS respectfully.
-             * 
+             *
              * Yes the semantics are a bit strange (no pun intended).
              * But then again BITXOR is strange itself, consdering it's
              * commutative, assocative, and elements of the BITXOR operation
              * Yes the semantics are a bit strange (no pun intended).
              * But then again BITXOR is strange itself, consdering it's
              * commutative, assocative, and elements of the BITXOR operation
@@ -1099,7 +1099,7 @@ static bool parser_sy_apply_operator(parser_t *parser, shunt *sy)
                         )
                     );
                     expr->refs = AST_REF_NONE;
                         )
                     );
                     expr->refs = AST_REF_NONE;
-                    
+
                     out = (ast_expression*)
                         ast_binary_new(
                             ctx,
                     out = (ast_expression*)
                         ast_binary_new(
                             ctx,
@@ -1152,7 +1152,7 @@ static bool parser_sy_apply_operator(parser_t *parser, shunt *sy)
                     }
                 }
             }
                     }
                 }
             }
-                
+
             break;
 
         case opid2('<','<'):
             break;
 
         case opid2('<','<'):
@@ -6463,7 +6463,7 @@ static void parser_remove_ast(parser_t *parser)
     ast_value_delete(parser->const_vec[0]);
     ast_value_delete(parser->const_vec[1]);
     ast_value_delete(parser->const_vec[2]);
     ast_value_delete(parser->const_vec[0]);
     ast_value_delete(parser->const_vec[1]);
     ast_value_delete(parser->const_vec[2]);
-    
+
     if (parser->reserved_version)
         ast_value_delete(parser->reserved_version);
 
     if (parser->reserved_version)
         ast_value_delete(parser->reserved_version);
 
diff --git a/stat.c b/stat.c
index 869a11fcdcc9107a7dc11b4ed4508c93e34525b3..b9df032a36966f42604ab8435c8d1ab47a51e12d 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -276,20 +276,20 @@ typedef struct hash_node_t {
  * This is a patched version of the Murmur2 hashing function to use
  * a proper pre-mix and post-mix setup. Infact this is Murmur3 for
  * the most part just reinvented.
  * This is a patched version of the Murmur2 hashing function to use
  * a proper pre-mix and post-mix setup. Infact this is Murmur3 for
  * the most part just reinvented.
- * 
+ *
  * Murmur 2 contains an inner loop such as:
  * while (l >= 4) {
  *      u32 k = *(u32*)d;
  *      k *= m;
  *      k ^= k >> r;
  *      k *= m;
  * Murmur 2 contains an inner loop such as:
  * while (l >= 4) {
  *      u32 k = *(u32*)d;
  *      k *= m;
  *      k ^= k >> r;
  *      k *= m;
- * 
+ *
  *      h *= m;
  *      h ^= k;
  *      d += 4;
  *      l -= 4;
  * }
  *      h *= m;
  *      h ^= k;
  *      d += 4;
  *      l -= 4;
  * }
- * 
+ *
  * The two u32s that form the key are the same value x (pulled from data)
  * this premix stage will perform the same results for both values. Unrolled
  * this produces just:
  * The two u32s that form the key are the same value x (pulled from data)
  * this premix stage will perform the same results for both values. Unrolled
  * this produces just:
@@ -301,18 +301,18 @@ typedef struct hash_node_t {
  *  h ^= x;
  *  h *= m;
  *  h ^= x;
  *  h ^= x;
  *  h *= m;
  *  h ^= x;
- * 
+ *
  * This appears to be fine, except what happens when m == 1? well x
  * cancels out entierly, leaving just:
  *  x ^= x >> r;
  *  h ^= x;
  *  h ^= x;
  * This appears to be fine, except what happens when m == 1? well x
  * cancels out entierly, leaving just:
  *  x ^= x >> r;
  *  h ^= x;
  *  h ^= x;
- * 
+ *
  * So all keys hash to the same value, but how often does m == 1?
  * well, it turns out testing x for all possible values yeilds only
  * 172,013,942 unique results instead of 2^32. So nearly ~4.6 bits
  * are cancelled out on average!
  * So all keys hash to the same value, but how often does m == 1?
  * well, it turns out testing x for all possible values yeilds only
  * 172,013,942 unique results instead of 2^32. So nearly ~4.6 bits
  * are cancelled out on average!
- * 
+ *
  * This means we have a 14.5% (rounded) chance of colliding more, which
  * results in another bucket/chain for the hashtable.
  *
  * This means we have a 14.5% (rounded) chance of colliding more, which
  * results in another bucket/chain for the hashtable.
  *