From c3df4edebd490f4e9f4dbd205e8c214c32c622a2 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sat, 28 Apr 2012 19:03:16 -0400 Subject: [PATCH] Remove trailing whitespace --- asm.c | 2 +- code.c | 12 ++++++------ ir.c | 2 +- lex.c | 2 +- main.c | 8 ++++---- parse.c | 2 +- util.c | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/asm.c b/asm.c index 0ce110a..ee83eaf 100644 --- a/asm.c +++ b/asm.c @@ -171,7 +171,7 @@ static GMQCC_INLINE bool asm_parse_func(const char *skip, size_t line, asm_state if (strchr(name, ',')) { prog_section_function function; prog_section_def def; - + char *find = strchr(name, ',') + 1; /* skip whitespace */ diff --git a/code.c b/code.c index a744f1c..616a3a9 100644 --- a/code.c +++ b/code.c @@ -87,7 +87,7 @@ void code_init() { prog_section_function empty_function = {0,0,0,0,0,0,0,{0}}; prog_section_statement empty_statement = {0,{0},{0},{0}}; int i = 0; - + /* omit creation of null code */ if (opts_omit_nullcode) return; @@ -117,7 +117,7 @@ void code_test() { prog_section_statement s1 = { INSTR_STORE_F, {30}, {OFS_PARM0}, {0}}; prog_section_statement s2 = { INSTR_CALL1, {29}, {0}, {0}}; prog_section_statement s3 = { INSTR_RETURN, {0}, {0}, {0}}; - + code_chars_put("m_init", 0x6); code_chars_put("print", 0x5); code_chars_put("hello world\n", 0xC); @@ -148,10 +148,10 @@ void code_test() { void code_write() { prog_header code_header = {0}; prog_section statements; - prog_section defs; - prog_section fields; - prog_section functions; - prog_section globals; + prog_section defs; + prog_section fields; + prog_section functions; + prog_section globals; prog_section strings; FILE *fp = NULL; size_t it = 1; diff --git a/ir.c b/ir.c index 72250f7..f2e0cae 100644 --- a/ir.c +++ b/ir.c @@ -788,7 +788,7 @@ ir_value* ir_block_create_binop(ir_block *self, { ir_value *out = NULL; ir_instr *in = NULL; - + int ot = TYPE_VOID; switch (opcode) { case INSTR_ADD_F: diff --git a/lex.c b/lex.c index 4063139..5a908b8 100644 --- a/lex.c +++ b/lex.c @@ -343,7 +343,7 @@ void lex_parse(lex_file *file) { */ lex_file *lex_include(lex_file *lex, const char *file) { lex_file *set = NULL; - + util_strrq(file); if (strncmp(lex->name, file, strlen(lex->name)) == 0) { error(lex, ERROR_LEX, "Source file cannot include itself\n"); diff --git a/main.c b/main.c index 6a08c43..81afc79 100644 --- a/main.c +++ b/main.c @@ -39,18 +39,18 @@ static const int usage(const char *const app) { " %s -a -i -oprog.dat -- assemble together(allowed multiple -i)\n" " example:\n" " %s -cfoo.qc -ibar.qc -oqc.dat -afoo.qs -ibar.qs -oqs.dat\n", app, app, app, app, app); - + printf(" additional flags:\n" " -debug -- turns on compiler debug messages\n" " -memchk -- turns on compiler memory leak check\n" " -help -- prints this help/usage text\n" " -std -- select the QuakeC compile type (types below):\n"); - + printf(" -std=qcc -- original QuakeC\n" " -std=ftqecc -- fteqcc QuakeC\n" " -std=qccx -- qccx QuakeC\n" " -std=gmqcc -- this compiler QuakeC (default selection)\n"); - + printf(" codegen flags:\n" " -fdarkplaces-string-table-bug -- patches the string table to work with bugged versions of darkplaces\n" " -fomit-nullcode -- omits the generation of null code (will break everywhere see propsal.txt)\n"); @@ -180,7 +180,7 @@ int main(int argc, char **argv) { util_meminfo(); return 0; - + clean_params_usage: for (itr = 0; itr < items_elements; itr++) mem_d(items_data[itr].name); diff --git a/parse.c b/parse.c index 40224ca..c8ff73a 100644 --- a/parse.c +++ b/parse.c @@ -212,7 +212,7 @@ int parse_gen(lex_file *file) { /* add the compile-time constant */ { constant c; - + c.name = util_strdup(name), c.type = TYPE_VECTOR, c.value[0] = compile_calc_x; diff --git a/util.c b/util.c index f97eab4..9a23aed 100644 --- a/util.c +++ b/util.c @@ -56,7 +56,7 @@ void util_memory_d(void *ptrn, unsigned int line, const char *file) { if (!ptrn) return; data = (void*)((uintptr_t)ptrn-sizeof(struct memblock_t)); info = (struct memblock_t*)data; - + util_debug("MEM", "released: % 8u (bytes) address 0x%08X @ %s:%u\n", info->byte, data, file, line); mem_db += info->byte; mem_dt++;