From: Dale Weiler Date: Fri, 14 Jun 2013 21:36:16 +0000 (+0000) Subject: Fixed whitespace X-Git-Tag: v0.3.0~137 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8afd373e4f35d363c763301af804b2628b46437d;p=xonotic%2Fgmqcc.git Fixed whitespace --- diff --git a/code.c b/code.c index c2838ef..747e589 100644 --- 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; diff --git a/doc/html/download.c b/doc/html/download.c index 33845a7..cfcf636 100644 --- a/doc/html/download.c +++ b/doc/html/download.c @@ -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 * (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 6934a0c..05d6d8d 100644 --- 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 "<<>>"; - + 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 55d4fff..7bfd28c 100644 --- 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 d6055db..b1da366 100644 --- 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 cd38295..cae0cda 100644 --- 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 8289057..cc71784 100644 --- 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 2371ee1..35e605c 100644 --- 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; } diff --git a/parser.c b/parser.c index 5b4ed65..3ab472f 100644 --- 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 f1bb121..ca8f2e8 100644 --- 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; }