]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Fixed whitespace
authorDale Weiler <killfieldengine@gmail.com>
Fri, 14 Jun 2013 21:36:16 +0000 (21:36 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Fri, 14 Jun 2013 21:36:16 +0000 (21:36 +0000)
code.c
doc/html/download.c
exec.c
ftepp.c
gmqcc.h
ir.h
lexer.c
pak.c
parser.c
util.c

diff --git a/code.c b/code.c
index c2838efa41c0aad6ad8c8f3153043445f09700de..747e5892ebc04e0d0d7138951f43ad1e8fac56dd 100644 (file)
--- a/code.c
+++ b/code.c
@@ -29,7 +29,7 @@
  * or qcint; however, it's incredibly unsafe for two reasons.
  * 1) The compilers aliasing optimization can legally make it unstable
  *    (it's undefined behaviour).
- * 
+ *
  * 2) The cast itself depends on fresh storage (newly allocated in which
  *    ever function is using the cast macros), the contents of which are
  *    transferred in a way that the obligation to release storage is not
@@ -172,7 +172,7 @@ static void code_create_header(code_t *code, prog_header *code_header) {
     /*
      * These are not part of the header but we ensure LE format here to save on duplicated
      * code.
-     */  
+     */
     util_endianswap(code->statements, vec_size(code->statements), sizeof(prog_section_statement));
     util_endianswap(code->defs,       vec_size(code->defs),       sizeof(prog_section_def));
     util_endianswap(code->fields,     vec_size(code->fields),     sizeof(prog_section_field));
@@ -184,7 +184,7 @@ static void code_create_header(code_t *code, prog_header *code_header) {
  * Same principle except this one allocates memory and writes the lno(optional) and the dat file
  * directly out to allocated memory. Which is actually very useful for the future library support
  * we're going to add.
- */   
+ */
 bool code_write_memory(code_t *code, uint8_t **datmem, size_t *sizedat, uint8_t **lnomem, size_t *sizelno) {
     prog_header code_header;
     uint32_t    offset  = 0;
index 33845a78dbbce19b413d29699d2a0d4c900734f5..cfcf6367e8a8d200e1e0957c188b482813d18cb0 100644 (file)
@@ -28,7 +28,7 @@ char value(char c) {
 int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
     unsigned char *p;
 
-    if(!*src) 
+    if(!*src)
         return 0;
 
     *dest = 0;
@@ -42,11 +42,11 @@ int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
         if(!isbase64(src[1])) {
             p -= 2;
             break;
-        } 
+        }
         else if(!isbase64(src[2])) {
             p -= 2;
             break;
-        } 
+        }
         else if(!isbase64(src[3])) {
             p--;
             break;
@@ -67,7 +67,7 @@ int security_decode(unsigned char *dest, const unsigned char *src, int srclen) {
  * If more platforms are supported add the entries between the start
  * tag here, and the end tag below. Nothing else needs to be done
  * <tag> (the table needs to match the HTML too)
- */   
+ */
 #define ARCHLINUX_32_REF "%sgmqcc-%c.%c.%c-1-i686.pkg.tar.xz%s"
 #define ARCHLINUX_64_REF "%sgmqcc-%c.%c.%c-1-x86_64.pkg.tar.xz%s"
 #define DEBIAN_32_REF    "%sgmqcc-%c.%c.%c-i686.deb%s"
@@ -155,7 +155,7 @@ void escape(url_t *str) {
     char hexstr[3];
     unsigned int  i=0;
     unsigned long l=0;
+
     p = str->data;
     for(i=0; i < str->len; i++) {
         if((p - str->data) >= str->len)
@@ -235,7 +235,7 @@ void genhtml() {
 /*
  * Builds a list of download links with the right version and handles the
  * rest of the magic.
- */  
+ */
 void build(const char *directory) {
     /* Figure out version number */
     char   find[3];
diff --git a/exec.c b/exec.c
index 6934a0c0605a9d17bf7145f96a8eec25c7718e17..05d6d8df1a6dd0701650cc5d866a755c9907d20e 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -172,7 +172,7 @@ const char* prog_getstring(qc_program *prog, qcint str) {
     /* cast for return required for C++ */
     if (str < 0 || str >= (qcint)vec_size(prog->strings))
         return  "<<<invalid string>>>";
-        
+
     return prog->strings + str;
 }
 
@@ -760,7 +760,7 @@ static int qc_strcat(qc_program *prog) {
     size_t len1,   len2;
     qcany *str1,  *str2;
     qcany  out;
-    
+
     const char *cstr1;
     const char *cstr2;
 
@@ -786,7 +786,7 @@ static int qc_strcmp(qc_program *prog) {
 
     const char *cstr1;
     const char *cstr2;
-    
+
     if (prog->argc != 2 && prog->argc != 3) {
         fprintf(stderr, "ERROR: invalid number of arguments for strcmp/strncmp: %i, expected 2 or 3\n",
                prog->argc);
@@ -905,19 +905,19 @@ void escapestring(char* dest, const char* src)  {
   char c;
   while ((c = *(src++))) {
     switch(c) {
-      case '\t': 
+      case '\t':
         *(dest++) = '\\', *(dest++) = 't';
         break;
-      case '\n': 
+      case '\n':
         *(dest++) = '\\', *(dest++) = 'n';
         break;
-      case '\r': 
+      case '\r':
         *(dest++) = '\\', *(dest++) = 'r';
         break;
-      case '\\': 
+      case '\\':
         *(dest++) = '\\', *(dest++) = '\\';
         break;
-      case '\"': 
+      case '\"':
         *(dest++) = '\\', *(dest++) = '\"';
         break;
       default:
diff --git a/ftepp.c b/ftepp.c
index 55d4fffb1e3330cb4e6f4b605a3c6ce1a61cf414..7bfd28cec9696ee4296db37563be21bafa3afefb 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -189,7 +189,7 @@ static char *ftepp_predef_timestamp(lex_file *context) {
     /*
      * ctime and its fucking annoying newline char, no worries, we're
      * professionals here.
-     */   
+     */
     find  = ctime(&finfo.st_mtime);
     value = (char*)mem_a(strlen(find) + 1);
     memcpy(&value[1], find, (size = strlen(find)) - 1);
diff --git a/gmqcc.h b/gmqcc.h
index d6055dbeedf2d27ac8e8a9061744302027fcb515..b1da366a766f053e6e5fcb6efaef77b8a11bf41a 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -721,7 +721,7 @@ typedef struct {
  * code_genstrin       -- generates string for code
  * code_alloc_field    -- allocated a field
  * code_push_statement -- keeps statements and linenumbers together
- * code_pop_statement  -- keeps statements and linenumbers together 
+ * code_pop_statement  -- keeps statements and linenumbers together
  */
 bool      code_write         (code_t *, const char *filename, const char *lno);
 GMQCC_WARN
diff --git a/ir.h b/ir.h
index cd382957f022c34d82a0bdd2f1603bf1aa1ef7d9..cae0cda839db6d20dc0f2995c608952dcf110e80 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -281,7 +281,7 @@ void         ir_builder_dump(ir_builder*, int (*oprintf)(const char*, ...));
 /*
  * This code assumes 32 bit floats while generating binary
  * Blub: don't use extern here, it's annoying and shows up in nm
- * for some reason :P  
+ * for some reason :P
  */
 typedef int static_assert_is_32bit_float  [(sizeof(int32_t) == 4)?1:-1];
 typedef int static_assert_is_32bit_integer[(sizeof(qcfloat) == 4)?1:-1];
diff --git a/lexer.c b/lexer.c
index 8289057e1f0f20c720aa506241c1afe17818b3d5..cc717848b6279e8ca651eacd514582522981e8e4 100644 (file)
--- a/lexer.c
+++ b/lexer.c
@@ -172,7 +172,7 @@ static void lex_token_new(lex_file *lex)
 #else
     if (lex->tok.value)
         vec_shrinkto(lex->tok.value, 0);
-        
+
     lex->tok.constval.t  = 0;
     lex->tok.ctx.line    = lex->sline;
     lex->tok.ctx.file    = lex->name;
@@ -298,7 +298,7 @@ static int lex_try_trigraph(lex_file *lex, int old)
         lex->line++;
         lex->column = 0;
     }
-    
+
     if (c2 != '?') {
         lex_ungetch(lex, c2);
         return old;
@@ -309,7 +309,7 @@ static int lex_try_trigraph(lex_file *lex, int old)
         lex->line++;
         lex->column = 0;
     }
-    
+
     switch (c3) {
         case '=': return '#';
         case '/': return '\\';
diff --git a/pak.c b/pak.c
index 2371ee111bdf38630efe31d42139dbef85ff6118..35e605ca59c5aae11b553ecf91e6900ee4ae9ddf 100644 (file)
--- a/pak.c
+++ b/pak.c
@@ -556,7 +556,7 @@ int main(int argc, char **argv) {
         pak_close(pak);
         vec_free(files);
         stat_info();
-        
+
         return EXIT_SUCCESS;
     }
 
index 5b4ed658f96f5236ed04f7db1aed7d1a4dabd534..3ab472f40454d1f3439c075b58f691624f5d7110 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -4339,7 +4339,7 @@ static bool parse_function_body(parser_t *parser, ast_value *var)
     }
 
     vec_push(func->blocks, block);
-    
+
 
     parser->function = old;
     if (!parser_leaveblock(parser))
diff --git a/util.c b/util.c
index f1bb1212cb3292f53f5ba09aee7f1f3cebda6509..ca8f2e87ae5d49213400bf13021118a12ba7be59 100644 (file)
--- a/util.c
+++ b/util.c
@@ -321,7 +321,7 @@ int util_asprintf(char **ret, const char *fmt, ...) {
 
         allocated = (char*)mem_a(4096); /* A page must be enough */
         strerror_s(allocated, 4096, num);
-    
+
         vec_push(vector, allocated);
         return (const char *)allocated;
     }