History

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.

gus knight committed 11 years ago

Commit d6b64e21 parent 410312210 files · +427 −428Browse files

Showing the changes to tccpe.c (1 of 10 files). Show all

Unified · Split

tccpe.c+24−24
@@ -398,22 +398,22 @@ static int pe_find_import(TCCState * s1, ElfW(Sym) *sym) · 397 unmodified lines
398398 s = pe_export_name(s1, sym);
399399 if (n) {
400400 /* second try: */
401− if (sym->st_other & ST_PE_STDCALL) {
401+ if (sym->st_other & ST_PE_STDCALL) {
402402 /* try w/0 stdcall deco (windows API convention) */
403− p = strrchr(s, '@');
404− if (!p || s[0] != '_')
405− break;
406− strcpy(buffer, s+1)[p-s-1] = 0;
407− } else if (s[0] != '_') { /* try non-ansi function */
408− buffer[0] = '_', strcpy(buffer + 1, s);
409− } else if (0 == memcmp(s, "__imp__", 7)) { /* mingw 2.0 */
410− strcpy(buffer, s + 6);
411− } else if (0 == memcmp(s, "_imp___", 7)) { /* mingw 3.7 */
412− strcpy(buffer, s + 6);
413− } else {
414− break;
415− }
416− s = buffer;
403+ p = strrchr(s, '@');
404+ if (!p || s[0] != '_')
405+ break;
406+ strcpy(buffer, s+1)[p-s-1] = 0;
407+ } else if (s[0] != '_') { /* try non-ansi function */
408+ buffer[0] = '_', strcpy(buffer + 1, s);
409+ } else if (0 == memcmp(s, "__imp__", 7)) { /* mingw 2.0 */
410+ strcpy(buffer, s + 6);
411+ } else if (0 == memcmp(s, "_imp___", 7)) { /* mingw 3.7 */
412+ strcpy(buffer, s + 6);
413+ } else {
414+ break;
415+ }
416+ s = buffer;
417417 }
418418 sym_index = find_elf_sym(s1->dynsymtab_section, s);
419419 // printf("find (%d) %d %s\n", n, sym_index, s);
@@ -565,9 +565,9 @@ static int pe_write(struct pe_info *pe) · 145 unmodified lines
565565 #endif
566566 /* NT additional fields. */
567567 #if defined(TCC_TARGET_ARM)
568− 0x00100000, /*DWORD ImageBase; */
568+ 0x00100000, /*DWORD ImageBase; */
569569 #else
570− 0x00400000, /*DWORD ImageBase; */
570+ 0x00400000, /*DWORD ImageBase; */
571571 #endif
572572 0x00001000, /*DWORD SectionAlignment; */
573573 0x00000200, /*DWORD FileAlignment; */
@@ -1841,13 +1841,13 @@ ST_FUNC int pe_output_file(TCCState * s1, const char *filename) · 1267 unmodified lines
18411841 pe.subsystem = s1->pe_subsystem;
18421842
18431843 /* set default file/section alignment */
1844− if (pe.subsystem == 1) {
1845− pe.section_align = 0x20;
1846− pe.file_align = 0x20;
1847− } else {
1848− pe.section_align = 0x1000;
1849− pe.file_align = 0x200;
1850− }
1844+ if (pe.subsystem == 1) {
1845+ pe.section_align = 0x20;
1846+ pe.file_align = 0x20;
1847+ } else {
1848+ pe.section_align = 0x1000;
1849+ pe.file_align = 0x200;
1850+ }
18511851
18521852 if (s1->section_align != 0)
18531853 pe.section_align = s1->section_align;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t