]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Remove trailing whitespace
authorDale Weiler <killfieldengine@gmail.com>
Sun, 21 Apr 2013 10:24:55 +0000 (10:24 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sun, 21 Apr 2013 10:24:55 +0000 (10:24 +0000)
15 files changed:
ast.c
ast.h
conout.c
correct.c
fs.c
ftepp.c
gmqcc.h
intrin.h
ir.c
lexer.c
opts.c
pak.c
parser.c
test.c
util.c

diff --git a/ast.c b/ast.c
index 22c4defd76c694d3b696a6509c8408dc2c27934b..ae710d6aeb2699038a53e881dd55f29e5db4d732 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2012, 2013
  *     Wolfgang Bumiller
 /*
  * Copyright (C) 2012, 2013
  *     Wolfgang Bumiller
- *     Dale Weiler 
+ *     Dale Weiler
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
@@ -2131,7 +2131,7 @@ bool ast_entfield_codegen(ast_entfield *self, ast_function *func, bool lvalue, i
     } else {
         *out = ir_block_create_load_from_ent(func->curblock, ast_ctx(self), ast_function_label(func, "efv"),
                                              ent, field, self->expression.vtype);
     } else {
         *out = ir_block_create_load_from_ent(func->curblock, ast_ctx(self), ast_function_label(func, "efv"),
                                              ent, field, self->expression.vtype);
-        /* Done AFTER error checking: 
+        /* Done AFTER error checking:
         codegen_output_type(self, *out);
         */
     }
         codegen_output_type(self, *out);
         */
     }
diff --git a/ast.h b/ast.h
index 9b554214361258d9ddebf140e5107ccdaee7466f..14d38d886458efb76207fe878b2a2d46aacee1f0 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -238,7 +238,7 @@ struct ast_binary_s
     ast_expression *left;
     ast_expression *right;
     ast_binary_ref  refs;
     ast_expression *left;
     ast_expression *right;
     ast_binary_ref  refs;
-    
+
 };
 ast_binary* ast_binary_new(lex_ctx    ctx,
                            int        op,
 };
 ast_binary* ast_binary_new(lex_ctx    ctx,
                            int        op,
index 00b81580760e90989ab4c46d9255c976d57e75f1..7e8cd9ad8f40a4c5768db4d52ae308184c357b42 100644 (file)
--- a/conout.c
+++ b/conout.c
@@ -288,7 +288,7 @@ int con_change(const char *out, const char *err) {
 /*
  * Defaultizer because stdio.h shouldn't be used anywhere except here
  * and inside file.c To prevent mis-match of wrapper-interfaces.
 /*
  * Defaultizer because stdio.h shouldn't be used anywhere except here
  * and inside file.c To prevent mis-match of wrapper-interfaces.
- */ 
+ */
 FILE *con_default_out() {
     return (console.handle_out = stdout);
 }
 FILE *con_default_out() {
     return (console.handle_out = stdout);
 }
index 6f234b0a2e985608aa777127370bd65259fca927..7e16608a0084c260810a1f9240e757f6d00f0673 100644 (file)
--- a/correct.c
+++ b/correct.c
@@ -2,7 +2,7 @@
  * Copyright (C) 2012, 2013
  *     Dale Weiler
  *     Wolfgang Bumiller
  * Copyright (C) 2012, 2013
  *     Dale Weiler
  *     Wolfgang Bumiller
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
  * the Software without restriction, including without limitation the rights to
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
  * the Software without restriction, including without limitation the rights to
  *  Bayesian interpretation. You can read more about it from here:
  *  http://www.celiagreen.com/charlesmccreery/statistics/bayestutorial.pdf
  *  (which is probably the only good online documentation for bayes theroy
  *  Bayesian interpretation. You can read more about it from here:
  *  http://www.celiagreen.com/charlesmccreery/statistics/bayestutorial.pdf
  *  (which is probably the only good online documentation for bayes theroy
- *  no lie.  Everything else just sucks ..)  
- * 
+ *  no lie.  Everything else just sucks ..)
+ *
  *  Bayes' Thereom suggests something like the following:
  *      AC P(I|C) P(C) / P(I)
  *  Bayes' Thereom suggests something like the following:
  *      AC P(I|C) P(C) / P(I)
- * 
+ *
  *  However since P(I) is the same for every possibility of I, we can
  *  completley ignore it giving just:
  *      AC P(I|C) P(C)
  *  However since P(I) is the same for every possibility of I, we can
  *  completley ignore it giving just:
  *      AC P(I|C) P(C)
@@ -72,7 +72,7 @@
  *  3: AC, the control mechanisim, an enumerator if you will, one that
  *     enumerates all feasible values of C, to determine the one that
  *     gives the greatest probability score.
  *  3: AC, the control mechanisim, an enumerator if you will, one that
  *     enumerates all feasible values of C, to determine the one that
  *     gives the greatest probability score.
- * 
+ *
  *  In reality the requirement for a more complex expression involving
  *  two seperate models is considerably a waste.  But one must recognize
  *  that P(C|I) is already conflating two factors.  It's just much simpler
  *  In reality the requirement for a more complex expression involving
  *  two seperate models is considerably a waste.  But one must recognize
  *  that P(C|I) is already conflating two factors.  It's just much simpler
@@ -85,8 +85,8 @@
  *  distance no greater than one.  Knowing this we can optimize for most
  *  cases of mistakes without taking a performance hit.  Which is what we
  *  base longer edit distances off of.  Opposed to the original method of
  *  distance no greater than one.  Knowing this we can optimize for most
  *  cases of mistakes without taking a performance hit.  Which is what we
  *  base longer edit distances off of.  Opposed to the original method of
- *  I had concieved of checking everything.     
- *  
+ *  I had concieved of checking everything.
+ *
  * A little information on additional algorithms used:
  *
  *   Initially when I implemented this corrector, it was very slow.
  * A little information on additional algorithms used:
  *
  *   Initially when I implemented this corrector, it was very slow.
  *   char-to-index map into the branches. We've complelty made the trie
  *   accesses entierly constant in lookup time.  No really, a lookup is
  *   literally trie[str[0]] [str[1]] [2] .... .value.
  *   char-to-index map into the branches. We've complelty made the trie
  *   accesses entierly constant in lookup time.  No really, a lookup is
  *   literally trie[str[0]] [str[1]] [2] .... .value.
- * 
- * 
+ *
+ *
  * Future Work (If we really need it)
  *
  *   Currently we can only distinguish one source of error in the
  * Future Work (If we really need it)
  *
  *   Currently we can only distinguish one source of error in the
  *   Currently the error model has been fairly trivial, the smaller the
  *   edit distance the smaller the error.  This usually causes some un-
  *   expected problems. e.g reciet->recite yields recipt.  For QuakeC
  *   Currently the error model has been fairly trivial, the smaller the
  *   edit distance the smaller the error.  This usually causes some un-
  *   expected problems. e.g reciet->recite yields recipt.  For QuakeC
- *   this could become a problem when lots of identifiers are involved. 
+ *   this could become a problem when lots of identifiers are involved.
  */
 
 
  */
 
 
@@ -314,7 +314,7 @@ void correct_del(correct_trie_t* dictonary, size_t **data) {
  * not in the mood to figure out that logic.  This is a reminder to
  * do it, or for someone else to :-) correct_edit however would also
  * need to take a size_t ** to carry it along (would all the argument
  * not in the mood to figure out that logic.  This is a reminder to
  * do it, or for someone else to :-) correct_edit however would also
  * need to take a size_t ** to carry it along (would all the argument
- * overhead be worth it?)  
+ * overhead be worth it?)
  */
 static GMQCC_INLINE size_t correct_deletion(const char *ident, char **array) {
     size_t       itr = 0;
  */
 static GMQCC_INLINE size_t correct_deletion(const char *ident, char **array) {
     size_t       itr = 0;
@@ -421,7 +421,7 @@ static GMQCC_INLINE int correct_exist(char **array, register size_t *sizes, size
         /*
          * We can save tons of calls to memcmp if we simply ignore comparisions
          * that we know cannot contain the same length.
         /*
          * We can save tons of calls to memcmp if we simply ignore comparisions
          * that we know cannot contain the same length.
-         */   
+         */
         if (sizes[itr] == len && !memcmp(array[itr], ident, len))
             return 1;
     }
         if (sizes[itr] == len && !memcmp(array[itr], ident, len))
             return 1;
     }
diff --git a/fs.c b/fs.c
index 997b368b13ce6bf801ff5637b9689ae464e853b0..3a482a1eb9e45eb8820ce534b78b68353dd91af5 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -33,7 +33,7 @@
  * to adding support for some other larger IO tasks (in the test-suite,
  * or even the QCVM we'll need it). There is also a third possibility of
  * building .dat files directly from zip files (which would be very cool
  * to adding support for some other larger IO tasks (in the test-suite,
  * or even the QCVM we'll need it). There is also a third possibility of
  * building .dat files directly from zip files (which would be very cool
- * at least I think so).  
+ * at least I think so).
  */
 #ifdef _MSC_VER
 /* {{{ */
  */
 #ifdef _MSC_VER
 /* {{{ */
@@ -41,7 +41,7 @@
      * Visual Studio has security CRT features which I actually want to support
      * if we ever port to Windows 8, and want GMQCC to be API safe.
      *
      * Visual Studio has security CRT features which I actually want to support
      * if we ever port to Windows 8, and want GMQCC to be API safe.
      *
-     * We handle them here, for all file-operations. 
+     * We handle them here, for all file-operations.
      */
 
     static void file_exception (
      */
 
     static void file_exception (
 
 /*
  * These are implemented as just generic wrappers to keep consistency in
 
 /*
  * These are implemented as just generic wrappers to keep consistency in
- * the API.  Not as macros though  
+ * the API.  Not as macros though
  */
 void fs_file_close(FILE *fp) {
     /* Invokes file_exception on windows if fp is null */
  */
 void fs_file_close(FILE *fp) {
     /* Invokes file_exception on windows if fp is null */
@@ -221,7 +221,7 @@ int fs_file_getline(char **lineptr, size_t *n, FILE *stream) {
 /*
  * Now we implement some directory functionality.  Windows lacks dirent.h
  * this is such a pisss off, we implement it here.
 /*
  * Now we implement some directory functionality.  Windows lacks dirent.h
  * this is such a pisss off, we implement it here.
- */  
+ */
 #if defined(_WIN32) && !defined(__MINGW32__)
     DIR *fs_dir_open(const char *name) {
         DIR *dir = (DIR*)mem_a(sizeof(DIR) + strlen(name));
 #if defined(_WIN32) && !defined(__MINGW32__)
     DIR *fs_dir_open(const char *name) {
         DIR *dir = (DIR*)mem_a(sizeof(DIR) + strlen(name));
@@ -231,7 +231,7 @@ int fs_file_getline(char **lineptr, size_t *n, FILE *stream) {
         strncpy(dir->dd_name, name, strlen(name));
         return dir;
     }
         strncpy(dir->dd_name, name, strlen(name));
         return dir;
     }
-        
+
     int fs_dir_close(DIR *dir) {
         FindClose((HANDLE)dir->dd_handle);
         mem_d ((void*)dir);
     int fs_dir_close(DIR *dir) {
         FindClose((HANDLE)dir->dd_handle);
         mem_d ((void*)dir);
@@ -267,7 +267,7 @@ int fs_file_getline(char **lineptr, size_t *n, FILE *stream) {
 
         if (!rets)
             return NULL;
 
         if (!rets)
             return NULL;
-        
+
         if ((data = (struct dirent*)mem_a(sizeof(struct dirent)))) {
             strncpy(data->d_name, info.cFileName, FILENAME_MAX - 1);
             data->d_name[FILENAME_MAX - 1] = '\0'; /* terminate */
         if ((data = (struct dirent*)mem_a(sizeof(struct dirent)))) {
             strncpy(data->d_name, info.cFileName, FILENAME_MAX - 1);
             data->d_name[FILENAME_MAX - 1] = '\0'; /* terminate */
diff --git a/ftepp.c b/ftepp.c
index 803466598e83b883858ad563e6c7a7f177f92adf..9d0fed9c0e931373779e638a66457c78a2b733bc 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2012, 2013
  *     Wolfgang Bumiller
 /*
  * Copyright (C) 2012, 2013
  *     Wolfgang Bumiller
- *     Dale Weiler 
+ *     Dale Weiler
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
@@ -76,7 +76,7 @@ typedef struct ftepp_s {
 /*
  * Implement the predef subsystem now.  We can do this safely with the
  * help of lexer contexts.
 /*
  * Implement the predef subsystem now.  We can do this safely with the
  * help of lexer contexts.
- */  
+ */
 static uint32_t ftepp_predef_countval = 0;
 static uint32_t ftepp_predef_randval  = 0;
 
 static uint32_t ftepp_predef_countval = 0;
 static uint32_t ftepp_predef_randval  = 0;
 
diff --git a/gmqcc.h b/gmqcc.h
index 4b60682a72b99073bd084f0b615103a508563714..ad185a05c6e5fda2f00d40a93544a8017b0edbf0 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -168,7 +168,7 @@ GMQCC_IND_STRING(GMQCC_VERSION_PATCH) \
     typedef __int64          int64_t;
 #endif /*! _MSC_VER */
 
     typedef __int64          int64_t;
 #endif /*! _MSC_VER */
 
-/* 
+/*
  *windows makes these prefixed because they're C99
  * TODO: utility versions that are type-safe and not
  * just plain textual subsitution.
  *windows makes these prefixed because they're C99
  * TODO: utility versions that are type-safe and not
  * just plain textual subsitution.
@@ -263,7 +263,7 @@ GMQCC_IND_STRING(GMQCC_VERSION_PATCH) \
  * On windows systems where we're not compiling with MING32 we need a
  * little extra help on dependinces for implementing our own dirent.h
  * in fs.c.
  * On windows systems where we're not compiling with MING32 we need a
  * little extra help on dependinces for implementing our own dirent.h
  * in fs.c.
- */   
+ */
 #if defined(_WIN32) && !defined(__MINGW32__)
 #   define _WIN32_LEAN_AND_MEAN
 #   include <windows.h>
 #if defined(_WIN32) && !defined(__MINGW32__)
 #   define _WIN32_LEAN_AND_MEAN
 #   include <windows.h>
@@ -421,7 +421,7 @@ void          util_htrm  (hash_table_t *ht, const char *key, void (*cb)(void*));
 
 void         *util_htget (hash_table_t *ht, const char *key);
 void         *util_htgeth(hash_table_t *ht, const char *key, size_t hash);
 
 void         *util_htget (hash_table_t *ht, const char *key);
 void         *util_htgeth(hash_table_t *ht, const char *key, size_t hash);
+
 /*===================================================================*/
 /*============================ file.c ===============================*/
 /*===================================================================*/
 /*===================================================================*/
 /*============================ file.c ===============================*/
 /*===================================================================*/
@@ -432,7 +432,7 @@ int            fs_file_getc   (FILE *);
 int            fs_file_printf (FILE *, const char *, ...);
 int            fs_file_puts   (FILE *, const char *);
 int            fs_file_seek   (FILE *, long int, int);
 int            fs_file_printf (FILE *, const char *, ...);
 int            fs_file_puts   (FILE *, const char *);
 int            fs_file_seek   (FILE *, long int, int);
-long int       fs_file_tell   (FILE *); 
+long int       fs_file_tell   (FILE *);
 
 size_t         fs_file_read   (void *,        size_t, size_t, FILE *);
 size_t         fs_file_write  (const void *,  size_t, size_t, FILE *);
 
 size_t         fs_file_read   (void *,        size_t, size_t, FILE *);
 size_t         fs_file_write  (const void *,  size_t, size_t, FILE *);
index 69490dc7cd522ef00a314230f6911e217fa32bb5..4b4c9478afa3cb760b1c7ed216ebe86377a3d22f 100644 (file)
--- a/intrin.h
+++ b/intrin.h
@@ -87,7 +87,7 @@ ast_expression *intrin_pow(parser_t *parser) {
      *     local *= x;
      *   }
      *   return local;
      *     local *= x;
      *   }
      *   return local;
-     * } 
+     * }
      */
     static ast_value *value = NULL;
 
      */
     static ast_value *value = NULL;
 
@@ -226,7 +226,7 @@ ast_expression *intrin_mod(parser_t *parser) {
      * float mod(float x, float y) {
      *   return x - y * floor(x / y);
      * }
      * float mod(float x, float y) {
      *   return x - y * floor(x / y);
      * }
-     */    
+     */
     static ast_value *value = NULL;
 
     if (!value) {
     static ast_value *value = NULL;
 
     if (!value) {
@@ -321,8 +321,8 @@ ast_expression *intrin_isnan(parser_t *parser) {
      *   local = x;
      *
      *   return (x != local);
      *   local = x;
      *
      *   return (x != local);
-     * } 
-     */      
+     * }
+     */
     static ast_value *value = NULL;
 
     if (!value) {
     static ast_value *value = NULL;
 
     if (!value) {
@@ -330,7 +330,7 @@ ast_expression *intrin_isnan(parser_t *parser) {
         ast_value    *local  = ast_value_new (parser_ctx(parser), "local", TYPE_FLOAT);
         ast_block    *body   = ast_block_new (parser_ctx(parser));
         ast_function *func   = NULL;
         ast_value    *local  = ast_value_new (parser_ctx(parser), "local", TYPE_FLOAT);
         ast_block    *body   = ast_block_new (parser_ctx(parser));
         ast_function *func   = NULL;
-    
+
         INTRIN_VAL(value, "isnan", func, "<float>", TYPE_FLOAT);
 
         vec_push(body->locals, local);
         INTRIN_VAL(value, "isnan", func, "<float>", TYPE_FLOAT);
 
         vec_push(body->locals, local);
@@ -399,8 +399,8 @@ ast_expression *intrin_func(parser_t *parser, const char *name) {
     /*
      * jesus fucking christ, Blub design something less fucking
      * impossible to use, like a ast_is_builtin(ast_expression *), also
     /*
      * jesus fucking christ, Blub design something less fucking
      * impossible to use, like a ast_is_builtin(ast_expression *), also
-     * use a hashtable :P 
-     */  
+     * use a hashtable :P
+     */
     if ((find = (void*)parser_find_global(parser, name)) && ((ast_value*)find)->expression.vtype == TYPE_FUNCTION)
         for (i = 0; i < vec_size(parser->functions); ++i)
             if (((ast_value*)find)->name && !strcmp(parser->functions[i]->name, ((ast_value*)find)->name) && parser->functions[i]->builtin < 0)
     if ((find = (void*)parser_find_global(parser, name)) && ((ast_value*)find)->expression.vtype == TYPE_FUNCTION)
         for (i = 0; i < vec_size(parser->functions); ++i)
             if (((ast_value*)find)->name && !strcmp(parser->functions[i]->name, ((ast_value*)find)->name) && parser->functions[i]->builtin < 0)
@@ -409,7 +409,7 @@ ast_expression *intrin_func(parser_t *parser, const char *name) {
     if ((find = util_htget(intrin_intrinsics(), name))) {
         /* intrinsic is in table. This will "generate the function" so
          * to speak (if it's not already generated).
     if ((find = util_htget(intrin_intrinsics(), name))) {
         /* intrinsic is in table. This will "generate the function" so
          * to speak (if it's not already generated).
-         */  
+         */
         return ((intrin_t*)find)->intrin(parser);
     }
 
         return ((intrin_t*)find)->intrin(parser);
     }
 
diff --git a/ir.c b/ir.c
index c61459499bedc3810430b77b0387343dbee7b997..cabddf4e196a6969edaa844fe6bdf360691a5fe0 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -3812,7 +3812,7 @@ void ir_function_dump(ir_function *f, char *ind,
     }
     if (vec_size(f->blocks))
     {
     }
     if (vec_size(f->blocks))
     {
-        oprintf("%slife passes: %i\n", ind, (int)f->run_id); 
+        oprintf("%slife passes: %i\n", ind, (int)f->run_id);
         for (i = 0; i < vec_size(f->blocks); ++i) {
             ir_block_dump(f->blocks[i], ind, oprintf);
         }
         for (i = 0; i < vec_size(f->blocks); ++i) {
             ir_block_dump(f->blocks[i], ind, oprintf);
         }
diff --git a/lexer.c b/lexer.c
index 7f5736dc21f0c5dceb758336cc44a0e9293bbf62..db0a8f4d9bf541bdd25597c5047e040d7dc36fc5 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -1235,7 +1235,7 @@ int lex_do(lex_file *lex)
             /*
             case '+':
             case '-':
             /*
             case '+':
             case '-':
-            */ 
+            */
             case '*':
             case '/':
             case '<':
             case '*':
             case '/':
             case '<':
diff --git a/opts.c b/opts.c
index e37ba7356d78ad6bdace480b77113c1d75863b25..c2e019e28a9ff932bf060c93de7412de2050e832 100644 (file)
--- a/opts.c
+++ b/opts.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2012, 2013
  *     Wolfgang Bumiller
 /*
  * Copyright (C) 2012, 2013
  *     Wolfgang Bumiller
- *     Dale Weiler 
+ *     Dale Weiler
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
@@ -269,7 +269,7 @@ static char *opts_ini_load(const char *section, const char *name, const char *va
     /*
      * undef all of these because they may still be defined like in my
      * case they where.
     /*
      * undef all of these because they may still be defined like in my
      * case they where.
-     */  
+     */
     #undef GMQCC_TYPE_FLAGS
     #undef GMQCC_TYPE_OPTIMIZATIONS
     #undef GMQCC_TYPE_WARNS
     #undef GMQCC_TYPE_FLAGS
     #undef GMQCC_TYPE_OPTIMIZATIONS
     #undef GMQCC_TYPE_WARNS
@@ -347,7 +347,7 @@ void opts_ini_init(const char *file) {
     size_t     line;
     FILE       *ini;
 
     size_t     line;
     FILE       *ini;
 
-    
+
     if (!file) {
         /* try ini */
         if (!(ini = fs_file_open((file = "gmqcc.ini"), "r")))
     if (!file) {
         /* try ini */
         if (!(ini = fs_file_open((file = "gmqcc.ini"), "r")))
@@ -366,4 +366,4 @@ void opts_ini_init(const char *file) {
     }
 
     fs_file_close(ini);
     }
 
     fs_file_close(ini);
-}  
+}
diff --git a/pak.c b/pak.c
index a9ef112869066920a06b46608926fc3cdf47f823..2ab417dfbbe61704f9f251bffb6dc83b5557068d 100644 (file)
--- a/pak.c
+++ b/pak.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013
 /*
  * Copyright (C) 2013
- *     Dale Weiler 
+ *     Dale Weiler
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
@@ -25,7 +25,7 @@
 /*
  * The PAK format uses a FOURCC concept for storing the magic ident within
  * the header as a uint32_t.
 /*
  * The PAK format uses a FOURCC concept for storing the magic ident within
  * the header as a uint32_t.
- */  
+ */
 #define PAK_FOURCC ((uint32_t)(('P' | ('A' << 8) | ('C' << 16) | ('K' << 24))))
 
 typedef struct {
 #define PAK_FOURCC ((uint32_t)(('P' | ('A' << 8) | ('C' << 16) | ('K' << 24))))
 
 typedef struct {
@@ -36,7 +36,7 @@ typedef struct {
      * best to store the directories at the end of the file opposed
      * to the front, since it allows easy insertion without having
      * to load the entire file into memory again.
      * best to store the directories at the end of the file opposed
      * to the front, since it allows easy insertion without having
      * to load the entire file into memory again.
-     */     
+     */
     uint32_t diroff;
     uint32_t dirlen;
 } pak_header_t;
     uint32_t diroff;
     uint32_t dirlen;
 } pak_header_t;
@@ -47,7 +47,7 @@ typedef struct {
  * describes a file (with directories/nested ones too in it's
  * file name).  Hence it can be a file, file with directory, or
  * file with directories.
  * describes a file (with directories/nested ones too in it's
  * file name).  Hence it can be a file, file with directory, or
  * file with directories.
- */ 
+ */
 typedef struct {
     char     name[56];
     uint32_t pos;
 typedef struct {
     char     name[56];
     uint32_t pos;
@@ -58,7 +58,7 @@ typedef struct {
  * Used to get the next token from a string, where the
  * strings themselfs are seperated by chracters from
  * `sep`.  This is essentially strsep.
  * Used to get the next token from a string, where the
  * strings themselfs are seperated by chracters from
  * `sep`.  This is essentially strsep.
- */   
+ */
 static char *pak_tree_sep(char **str, const char *sep) {
     char *beg = *str;
     char *end;
 static char *pak_tree_sep(char **str, const char *sep) {
     char *beg = *str;
     char *end;
@@ -158,13 +158,13 @@ static pak_file_t *pak_open_read(const char *file) {
     /*
      * Time to read in the directory handles and prepare the directories
      * vector.  We're going to be reading some the file inwards soon.
     /*
      * Time to read in the directory handles and prepare the directories
      * vector.  We're going to be reading some the file inwards soon.
-     */      
+     */
     fs_file_seek(pak->handle, pak->header.diroff, SEEK_SET);
 
     /*
      * Read in all directories from the PAK file. These are considered
      * to be the "file entries".
     fs_file_seek(pak->handle, pak->header.diroff, SEEK_SET);
 
     /*
      * Read in all directories from the PAK file. These are considered
      * to be the "file entries".
-     */   
+     */
     for (itr = 0; itr < pak->header.dirlen / 64; itr++) {
         pak_directory_t dir;
         fs_file_read   (&dir,    sizeof(pak_directory_t), 1, pak->handle);
     for (itr = 0; itr < pak->header.dirlen / 64; itr++) {
         pak_directory_t dir;
         fs_file_read   (&dir,    sizeof(pak_directory_t), 1, pak->handle);
@@ -184,14 +184,14 @@ static pak_file_t *pak_open_write(const char *file) {
     /*
      * Generate the required directory structure / tree for
      * writing this PAK file too.
     /*
      * Generate the required directory structure / tree for
      * writing this PAK file too.
-     */   
+     */
     pak_tree_build(file);
 
     if (!(pak->handle = fs_file_open(file, "wb"))) {
         /*
          * The directory tree that was created, needs to be
          * removed entierly if we failed to open a file.
     pak_tree_build(file);
 
     if (!(pak->handle = fs_file_open(file, "wb"))) {
         /*
          * The directory tree that was created, needs to be
          * removed entierly if we failed to open a file.
-         */   
+         */
         /* TODO backup directory clean */
 
         mem_d(pak);
         /* TODO backup directory clean */
 
         mem_d(pak);
@@ -239,13 +239,13 @@ bool pak_exists(pak_file_t *pak, const char *file, pak_directory_t **dir) {
 
     if (!pak || !file)
         return false;
 
     if (!pak || !file)
         return false;
-  
+
     for (itr = 0; itr < vec_size(pak->directories); itr++) {
         if (!strcmp(pak->directories[itr].name, file)) {
             /*
              * Store back a pointer to the directory that matches
              * the request if requested (NULL is not allowed).
     for (itr = 0; itr < vec_size(pak->directories); itr++) {
         if (!strcmp(pak->directories[itr].name, file)) {
             /*
              * Store back a pointer to the directory that matches
              * the request if requested (NULL is not allowed).
-             */   
+             */
             if (dir) {
                 *dir = &(pak->directories[itr]);
             }
             if (dir) {
                 *dir = &(pak->directories[itr]);
             }
@@ -258,7 +258,7 @@ bool pak_exists(pak_file_t *pak, const char *file, pak_directory_t **dir) {
 
 /*
  * Extraction abilities.  These work as you expect them to.
 
 /*
  * Extraction abilities.  These work as you expect them to.
- */ 
+ */
 bool pak_extract_one(pak_file_t *pak, const char *file, const char *outdir) {
     pak_directory_t *dir   = NULL;
     unsigned char   *dat   = NULL;
 bool pak_extract_one(pak_file_t *pak, const char *file, const char *outdir) {
     pak_directory_t *dir   = NULL;
     unsigned char   *dat   = NULL;
@@ -276,7 +276,7 @@ bool pak_extract_one(pak_file_t *pak, const char *file, const char *outdir) {
     /*
      * Generate the directory structure / tree that will be required
      * to store the extracted file.
     /*
      * Generate the directory structure / tree that will be required
      * to store the extracted file.
-     */   
+     */
     pak_tree_build(file);
 
     /* TODO portable path seperators */
     pak_tree_build(file);
 
     /* TODO portable path seperators */
@@ -285,7 +285,7 @@ bool pak_extract_one(pak_file_t *pak, const char *file, const char *outdir) {
     /*
      * Now create the file, if this operation fails.  Then abort
      * It shouldn't fail though.
     /*
      * Now create the file, if this operation fails.  Then abort
      * It shouldn't fail though.
-     */   
+     */
     if (!(out = fs_file_open(local, "wb"))) {
         mem_d(dat);
         return false;
     if (!(out = fs_file_open(local, "wb"))) {
         mem_d(dat);
         return false;
@@ -336,8 +336,8 @@ bool pak_insert_one(pak_file_t *pak, const char *file) {
     /*
      * We don't allow insertion on files that already exist within the
      * pak file.  Weird shit can happen if we allow that ;). We also
     /*
      * We don't allow insertion on files that already exist within the
      * pak file.  Weird shit can happen if we allow that ;). We also
-     * don't allow insertion if the pak isn't opened in write mode.  
-     */ 
+     * don't allow insertion if the pak isn't opened in write mode.
+     */
     if (!pak || !file || !pak->insert || pak_exists(pak, file, NULL))
         return false;
 
     if (!pak || !file || !pak->insert || pak_exists(pak, file, NULL))
         return false;
 
@@ -358,7 +358,7 @@ bool pak_insert_one(pak_file_t *pak, const char *file) {
     /*
      * We're limited to 56 bytes for a file name string, that INCLUDES
      * the directory and '/' seperators.
     /*
      * We're limited to 56 bytes for a file name string, that INCLUDES
      * the directory and '/' seperators.
-     */   
+     */
     if (strlen(file) >= 56) {
         fs_file_close(fp);
         return false;
     if (strlen(file) >= 56) {
         fs_file_close(fp);
         return false;
@@ -369,7 +369,7 @@ bool pak_insert_one(pak_file_t *pak, const char *file) {
     /*
      * Allocate some memory for loading in the data that will be
      * redirected into the PAK file.
     /*
      * Allocate some memory for loading in the data that will be
      * redirected into the PAK file.
-     */   
+     */
     if (!(dat = (unsigned char *)mem_a(dir.len))) {
         fs_file_close(fp);
         return false;
     if (!(dat = (unsigned char *)mem_a(dir.len))) {
         fs_file_close(fp);
         return false;
@@ -391,7 +391,7 @@ bool pak_insert_one(pak_file_t *pak, const char *file) {
 /*
  * Like pak_insert_one, except this collects files in all directories
  * from a root directory, and inserts them all.
 /*
  * Like pak_insert_one, except this collects files in all directories
  * from a root directory, and inserts them all.
- */  
+ */
 bool pak_insert_all(pak_file_t *pak, const char *dir) {
     DIR           *dp;
     struct dirent *dirp;
 bool pak_insert_all(pak_file_t *pak, const char *dir) {
     DIR           *dp;
     struct dirent *dirp;
@@ -422,12 +422,12 @@ bool pak_close(pak_file_t *pak) {
     /*
      * In insert mode we need to patch the header, and write
      * our directory entries at the end of the file.
     /*
      * In insert mode we need to patch the header, and write
      * our directory entries at the end of the file.
-     */  
+     */
     if (pak->insert) {
         pak->header.dirlen = vec_size(pak->directories) * 64;
         pak->header.diroff = ftell(pak->handle);
 
     if (pak->insert) {
         pak->header.dirlen = vec_size(pak->directories) * 64;
         pak->header.diroff = ftell(pak->handle);
 
-        /* patch header */ 
+        /* patch header */
         fs_file_seek (pak->handle, 0, SEEK_SET);
         fs_file_write(&(pak->header), sizeof(pak_header_t), 1, pak->handle);
 
         fs_file_seek (pak->handle, 0, SEEK_SET);
         fs_file_write(&(pak->header), sizeof(pak_header_t), 1, pak->handle);
 
index c1d3fb1d786641ecd3611c3e2f66337b897d968c..b3e98823604b553363ff9db41caa7151d1551e51 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -2,7 +2,7 @@
  * Copyright (C) 2012, 2013
  *     Wolfgang Bumiller
  *     Dale Weiler
  * Copyright (C) 2012, 2013
  *     Wolfgang Bumiller
  *     Dale Weiler
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
  * the Software without restriction, including without limitation the rights to
  * Permission is hereby granted, free of charge, to any person obtaining a copy of
  * this software and associated documentation files (the "Software"), to deal in
  * the Software without restriction, including without limitation the rights to
@@ -1902,7 +1902,7 @@ static bool parse_sya_operand(parser_t *parser, shunt *sy, bool with_labels)
             } else {
                 var = intrin_func(parser, parser_tokval(parser));
             }
             } else {
                 var = intrin_func(parser, parser_tokval(parser));
             }
-                
+
             if (!var) {
                 char *correct = NULL;
                 size_t i;
             if (!var) {
                 char *correct = NULL;
                 size_t i;
@@ -5171,7 +5171,7 @@ static bool parse_variable(parser_t *parser, ast_block *localblock, bool nofield
         /*
          * store the vstring back to var for alias and
          * deprecation messages.
         /*
          * store the vstring back to var for alias and
          * deprecation messages.
-         */   
+         */
         if (var->expression.flags & AST_FLAG_DEPRECATED ||
             var->expression.flags & AST_FLAG_ALIAS)
             var->desc = vstring;
         if (var->expression.flags & AST_FLAG_DEPRECATED ||
             var->expression.flags & AST_FLAG_ALIAS)
             var->desc = vstring;
@@ -5268,7 +5268,7 @@ static bool parse_variable(parser_t *parser, ast_block *localblock, bool nofield
                         ast_value_set_name(proto->expression.params[i], var->expression.params[i]->name);
                     if (!parser_check_qualifiers(parser, var, proto)) {
                         retval = false;
                         ast_value_set_name(proto->expression.params[i], var->expression.params[i]->name);
                     if (!parser_check_qualifiers(parser, var, proto)) {
                         retval = false;
-                        if (proto->desc) 
+                        if (proto->desc)
                             mem_d(proto->desc);
                         proto = NULL;
                         goto cleanup;
                             mem_d(proto->desc);
                         proto = NULL;
                         goto cleanup;
@@ -5409,13 +5409,13 @@ static bool parse_variable(parser_t *parser, ast_block *localblock, bool nofield
                         /*
                          * add alias to aliases table and to corrector
                          * so corrections can apply for aliases as well.
                         /*
                          * add alias to aliases table and to corrector
                          * so corrections can apply for aliases as well.
-                         */  
+                         */
                         util_htset(parser->aliases, var->name, find);
 
                         /*
                          * add to corrector so corrections can work
                          * even for aliases too.
                         util_htset(parser->aliases, var->name, find);
 
                         /*
                          * add to corrector so corrections can work
                          * even for aliases too.
-                         */ 
+                         */
                         correct_add (
                              vec_last(parser->correct_variables),
                             &vec_last(parser->correct_variables_score),
                         correct_add (
                              vec_last(parser->correct_variables),
                             &vec_last(parser->correct_variables_score),
@@ -5441,7 +5441,7 @@ static bool parse_variable(parser_t *parser, ast_block *localblock, bool nofield
                             /*
                              * add to corrector so corrections can work
                              * even for aliases too.
                             /*
                              * add to corrector so corrections can work
                              * even for aliases too.
-                             */  
+                             */
                             correct_add (
                                  vec_last(parser->correct_variables),
                                 &vec_last(parser->correct_variables_score),
                             correct_add (
                                  vec_last(parser->correct_variables),
                                 &vec_last(parser->correct_variables_score),
diff --git a/test.c b/test.c
index 107140e5cc7697f4a7e5e346e7334f12dd7a53cb..2ede2ae2c14c2ed4a2607da768f6138324e37a20 100644 (file)
--- a/test.c
+++ b/test.c
@@ -210,7 +210,7 @@ int task_pclose(FILE **handles) {
  *                  This will perform compilation and execution
  *              -fail
  *                  This will perform compilation, but requires
  *                  This will perform compilation and execution
  *              -fail
  *                  This will perform compilation, but requires
- *                  the compilation to fail in order to succeed.   
+ *                  the compilation to fail in order to succeed.
  *
  *          This must be provided, this tag is NOT optional.
  *
  *
  *          This must be provided, this tag is NOT optional.
  *
@@ -329,7 +329,7 @@ bool task_template_generate(task_template_t *tmpl, char tag, const char *file, s
         /*
          * Create some padding for the description to align the
          * printing of the rules file.
         /*
          * Create some padding for the description to align the
          * printing of the rules file.
-         */  
+         */
         if ((desclen = strlen(tmpl->description)) > pad[0])
             pad[0] = desclen;
     }
         if ((desclen = strlen(tmpl->description)) > pad[0])
             pad[0] = desclen;
     }
@@ -497,7 +497,7 @@ task_template_t *task_template_compile(const char *file, const char *dir, size_t
     /*
      * Create some padding for the printing to align the
      * printing of the rules file to the console.
     /*
      * Create some padding for the printing to align the
      * printing of the rules file to the console.
-     */  
+     */
     if ((filepadd = strlen(fullfile)) > pad[1])
         pad[1] = filepadd;
 
     if ((filepadd = strlen(fullfile)) > pad[1])
         pad[1] = filepadd;
 
@@ -859,7 +859,7 @@ void task_destroy(void) {
         /*
          * Only remove the log files if the test actually compiled otherwise
          * forget about it (or if it didn't compile, and the procedure type
         /*
          * Only remove the log files if the test actually compiled otherwise
          * forget about it (or if it didn't compile, and the procedure type
-         * was set to -fail (meaning it shouldn't compile) .. stil remove) 
+         * was set to -fail (meaning it shouldn't compile) .. stil remove)
          */
         if (task_tasks[i].compiled || !strcmp(task_tasks[i].tmpl->proceduretype, "-fail")) {
             if (remove(task_tasks[i].stdoutlogfile))
          */
         if (task_tasks[i].compiled || !strcmp(task_tasks[i].tmpl->proceduretype, "-fail")) {
             if (remove(task_tasks[i].stdoutlogfile))
@@ -887,7 +887,7 @@ void task_destroy(void) {
  * This executes the QCVM task for a specificly compiled progs.dat
  * using the template passed into it for call-flags and user defined
  * messages IF the procedure type is -execute, otherwise it matches
  * This executes the QCVM task for a specificly compiled progs.dat
  * using the template passed into it for call-flags and user defined
  * messages IF the procedure type is -execute, otherwise it matches
- * the preprocessor output. 
+ * the preprocessor output.
  */
 bool task_trymatch(task_template_t *tmpl, char ***line) {
     bool     success = true;
  */
 bool task_trymatch(task_template_t *tmpl, char ***line) {
     bool     success = true;
@@ -972,7 +972,7 @@ bool task_trymatch(task_template_t *tmpl, char ***line) {
             /*
              * Copy to output vector for diagnostics if execution match
              * fails.
             /*
              * Copy to output vector for diagnostics if execution match
              * fails.
-             */  
+             */
             vec_push(*line, data);
 
             /* reset */
             vec_push(*line, data);
 
             /* reset */
@@ -1022,7 +1022,7 @@ void task_schedualize(size_t *pad) {
     for (; i < vec_size(task_tasks); i++) {
         memset(space[1], 0, sizeof(space[1]));
         snprintf(space[1], sizeof(space[1]), "%d", (int)(i + 1));
     for (; i < vec_size(task_tasks); i++) {
         memset(space[1], 0, sizeof(space[1]));
         snprintf(space[1], sizeof(space[1]), "%d", (int)(i + 1));
-        
+
         con_out("test #%u %*s", i + 1, strlen(space[0]) - strlen(space[1]), "");
 
         util_debug("TEST", "executing task: %d: %s\n", i, task_tasks[i].tmpl->description);
         con_out("test #%u %*s", i + 1, strlen(space[0]) - strlen(space[1]), "");
 
         util_debug("TEST", "executing task: %d: %s\n", i, task_tasks[i].tmpl->description);
@@ -1086,7 +1086,7 @@ void task_schedualize(size_t *pad) {
                 task_tasks[i].tmpl->rulesfile,
                 (pad[1] + pad[2] - strlen(task_tasks[i].tmpl->rulesfile)) + (strlen(task_type(task_tasks[i].tmpl)) - pad[2]),
                 task_type(task_tasks[i].tmpl)
                 task_tasks[i].tmpl->rulesfile,
                 (pad[1] + pad[2] - strlen(task_tasks[i].tmpl->rulesfile)) + (strlen(task_type(task_tasks[i].tmpl)) - pad[2]),
                 task_type(task_tasks[i].tmpl)
-                
+
             );
             continue;
         }
             );
             continue;
         }
@@ -1094,7 +1094,7 @@ void task_schedualize(size_t *pad) {
         /*
          * If we made it here that concludes the task is to be executed
          * in the virtual machine (or the preprocessor output needs to
         /*
          * If we made it here that concludes the task is to be executed
          * in the virtual machine (or the preprocessor output needs to
-         * be matched). 
+         * be matched).
          */
         if (!task_trymatch(task_tasks[i].tmpl, &match)) {
             size_t d = 0;
          */
         if (!task_trymatch(task_tasks[i].tmpl, &match)) {
             size_t d = 0;
@@ -1136,7 +1136,7 @@ void task_schedualize(size_t *pad) {
              * Print the non-expected out (since we are simply not expecting it)
              * This will help track down bugs in template files that fail to match
              * something.
              * Print the non-expected out (since we are simply not expecting it)
              * This will help track down bugs in template files that fail to match
              * something.
-             */  
+             */
             if (vec_size(match) > vec_size(task_tasks[i].tmpl->comparematch)) {
                 for (d = 0; d < vec_size(match) - vec_size(task_tasks[i].tmpl->comparematch); d++) {
                     con_out("        Expected: Nothing                                   | Got: \"%s\"\n",
             if (vec_size(match) > vec_size(task_tasks[i].tmpl->comparematch)) {
                 for (d = 0; d < vec_size(match) - vec_size(task_tasks[i].tmpl->comparematch); d++) {
                     con_out("        Expected: Nothing                                   | Got: \"%s\"\n",
@@ -1144,7 +1144,7 @@ void task_schedualize(size_t *pad) {
                     );
                 }
             }
                     );
                 }
             }
-                    
+
 
             for (j = 0; j < vec_size(match); j++)
                 mem_d(match[j]);
 
             for (j = 0; j < vec_size(match); j++)
                 mem_d(match[j]);
@@ -1161,7 +1161,7 @@ void task_schedualize(size_t *pad) {
             task_tasks[i].tmpl->rulesfile,
             (pad[1] + pad[2] - strlen(task_tasks[i].tmpl->rulesfile)) + (strlen(task_type(task_tasks[i].tmpl))- pad[2]),
             task_type(task_tasks[i].tmpl)
             task_tasks[i].tmpl->rulesfile,
             (pad[1] + pad[2] - strlen(task_tasks[i].tmpl->rulesfile)) + (strlen(task_type(task_tasks[i].tmpl))- pad[2]),
             task_type(task_tasks[i].tmpl)
-            
+
         );
     }
     mem_d(data);
         );
     }
     mem_d(data);
@@ -1192,11 +1192,11 @@ GMQCC_WARN bool test_perform(const char *curdir, const char *defs) {
     /*
      * If the default definition file isn't set to anything.  We will
      * use the default_defs here, which is "defs.qc"
     /*
      * If the default definition file isn't set to anything.  We will
      * use the default_defs here, which is "defs.qc"
-     */   
+     */
     if (!defs) {
         defs = default_defs;
     }
     if (!defs) {
         defs = default_defs;
     }
-        
+
 
     task_precleanup(curdir);
     if (!task_propagate(curdir, pad, defs)) {
 
     task_precleanup(curdir);
     if (!task_propagate(curdir, pad, defs)) {
diff --git a/util.c b/util.c
index 73c5335e08e49a3d87929a75351bdfd5d3315ad5..b7e3c7c7295625ac395fdccb49656edccb7b8491 100644 (file)
--- a/util.c
+++ b/util.c
@@ -262,7 +262,7 @@ void util_debug(const char *area, const char *ms, ...) {
 /*
  * only required if big endian .. otherwise no need to swap
  * data.
 /*
  * only required if big endian .. otherwise no need to swap
  * data.
- */   
+ */
 #if PLATFORM_BYTE_ORDER == GMQCC_BYTE_ORDER_BIG
     static GMQCC_INLINE void util_swap16(uint16_t *d, size_t l) {
         while (l--) {
 #if PLATFORM_BYTE_ORDER == GMQCC_BYTE_ORDER_BIG
     static GMQCC_INLINE void util_swap16(uint16_t *d, size_t l) {
         while (l--) {
@@ -402,7 +402,7 @@ static const uint16_t util_crc16_table[] = {
 /* Non - Reflected */
 uint16_t util_crc16(uint16_t current, const char *k, size_t len) {
     register uint16_t h = current;
 /* Non - Reflected */
 uint16_t util_crc16(uint16_t current, const char *k, size_t len) {
     register uint16_t h = current;
-    for (; len; --len, ++k) 
+    for (; len; --len, ++k)
         h = util_crc16_table[(h>>8)^((unsigned char)*k)]^(h<<8);
     return h;
 }
         h = util_crc16_table[(h>>8)^((unsigned char)*k)]^(h<<8);
     return h;
 }
@@ -410,9 +410,9 @@ uint16_t util_crc16(uint16_t current, const char *k, size_t len) {
 #if 0
 uint16_t util_crc16(const char *k, int len, const short clamp) {
     register uint16_t h= (uint16_t)0xFFFFFFFF;
 #if 0
 uint16_t util_crc16(const char *k, int len, const short clamp) {
     register uint16_t h= (uint16_t)0xFFFFFFFF;
-    for (; len; --len, ++k) 
+    for (; len; --len, ++k)
         h = util_crc16_table[(h^((unsigned char)*k))&0xFF]^(h>>8);
         h = util_crc16_table[(h^((unsigned char)*k))&0xFF]^(h>>8);
-    return (~h)%clamp; 
+    return (~h)%clamp;
 }
 #endif
 
 }
 #endif
 
@@ -674,7 +674,7 @@ void util_htdel(hash_table_t *ht) {
  * Portable implementation of vasprintf/asprintf. Assumes vsnprintf
  * exists, otherwise compiler error.
  *
  * Portable implementation of vasprintf/asprintf. Assumes vsnprintf
  * exists, otherwise compiler error.
  *
- * TODO: fix for MSVC ....  
+ * TODO: fix for MSVC ....
  */
 int util_vasprintf(char **dat, const char *fmt, va_list args) {
     int   ret;
  */
 int util_vasprintf(char **dat, const char *fmt, va_list args) {
     int   ret;
@@ -686,7 +686,7 @@ int util_vasprintf(char **dat, const char *fmt, va_list args) {
      * formatted string if it overflows. However there is a MSVC
      * intrinsic (which is documented wrong) called _vcsprintf which
      * will return the required amount to allocate.
      * formatted string if it overflows. However there is a MSVC
      * intrinsic (which is documented wrong) called _vcsprintf which
      * will return the required amount to allocate.
-     */     
+     */
     #ifdef _MSC_VER
         char *str;
         if ((len = _vscprintf(fmt, args)) < 0) {
     #ifdef _MSC_VER
         char *str;
         if ((len = _vscprintf(fmt, args)) < 0) {
@@ -779,7 +779,7 @@ static GMQCC_INLINE void mt_generate() {
      * a branch that is executed every iteration from [0, MT_SIZE).
      *
      * Please see: http://www.quadibloc.com/crypto/co4814.htm for more
      * a branch that is executed every iteration from [0, MT_SIZE).
      *
      * Please see: http://www.quadibloc.com/crypto/co4814.htm for more
-     * information on how this clever trick works. 
+     * information on how this clever trick works.
      */
     static const uint32_t matrix[2] = {
         0x00000000,
      */
     static const uint32_t matrix[2] = {
         0x00000000,