From d6b64e2574bb4bc3c19e472b83073ff4d8786df2 Mon Sep 17 00:00:00 2001 From: gus knight Date: Mon, 27 Jul 2015 14:14:41 -0400 Subject: Clean up lots of rogue tabs. Still some more tabs to be taken care of. arm-gen.c and tcccoff.c have so many style issues that I'm just going to throw clang-format at them. --- tccpe.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'tccpe.c') diff --git a/tccpe.c b/tccpe.c index 3af2047..a13eac7 100644 --- a/tccpe.c +++ b/tccpe.c @@ -398,22 +398,22 @@ static int pe_find_import(TCCState * s1, ElfW(Sym) *sym) s = pe_export_name(s1, sym); if (n) { /* second try: */ - if (sym->st_other & ST_PE_STDCALL) { + if (sym->st_other & ST_PE_STDCALL) { /* try w/0 stdcall deco (windows API convention) */ - p = strrchr(s, '@'); - if (!p || s[0] != '_') - break; - strcpy(buffer, s+1)[p-s-1] = 0; - } else if (s[0] != '_') { /* try non-ansi function */ - buffer[0] = '_', strcpy(buffer + 1, s); - } else if (0 == memcmp(s, "__imp__", 7)) { /* mingw 2.0 */ - strcpy(buffer, s + 6); - } else if (0 == memcmp(s, "_imp___", 7)) { /* mingw 3.7 */ - strcpy(buffer, s + 6); - } else { - break; - } - s = buffer; + p = strrchr(s, '@'); + if (!p || s[0] != '_') + break; + strcpy(buffer, s+1)[p-s-1] = 0; + } else if (s[0] != '_') { /* try non-ansi function */ + buffer[0] = '_', strcpy(buffer + 1, s); + } else if (0 == memcmp(s, "__imp__", 7)) { /* mingw 2.0 */ + strcpy(buffer, s + 6); + } else if (0 == memcmp(s, "_imp___", 7)) { /* mingw 3.7 */ + strcpy(buffer, s + 6); + } else { + break; + } + s = buffer; } sym_index = find_elf_sym(s1->dynsymtab_section, s); // printf("find (%d) %d %s\n", n, sym_index, s); @@ -565,9 +565,9 @@ static int pe_write(struct pe_info *pe) #endif /* NT additional fields. */ #if defined(TCC_TARGET_ARM) - 0x00100000, /*DWORD ImageBase; */ + 0x00100000, /*DWORD ImageBase; */ #else - 0x00400000, /*DWORD ImageBase; */ + 0x00400000, /*DWORD ImageBase; */ #endif 0x00001000, /*DWORD SectionAlignment; */ 0x00000200, /*DWORD FileAlignment; */ @@ -1841,13 +1841,13 @@ ST_FUNC int pe_output_file(TCCState * s1, const char *filename) pe.subsystem = s1->pe_subsystem; /* set default file/section alignment */ - if (pe.subsystem == 1) { - pe.section_align = 0x20; - pe.file_align = 0x20; - } else { - pe.section_align = 0x1000; - pe.file_align = 0x200; - } + if (pe.subsystem == 1) { + pe.section_align = 0x20; + pe.file_align = 0x20; + } else { + pe.section_align = 0x1000; + pe.file_align = 0x200; + } if (s1->section_align != 0) pe.section_align = s1->section_align; -- cgit v1.3.1