X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=main.c;h=39270af2e81be4e5c98ebd4d21b28ba7bd7d9f46;hb=3d1fea359377282d17186c6d61d8ca1f20b87c69;hp=71972fb823c3382604fa1ea1c408a6b36143d61b;hpb=e67ba5c2bf2970a8d7ae9c90ac0bcf0d72ae70a5;p=cparser diff --git a/main.c b/main.c index 71972fb..39270af 100644 --- a/main.c +++ b/main.c @@ -266,7 +266,7 @@ static void add_flag(struct obstack *obst, const char *format, ...) #else /* escape stuff... */ for (char *c = buf; *c != '\0'; ++c) { - switch(*c) { + switch (*c) { case ' ': case '"': case '$': @@ -402,7 +402,7 @@ static bool run_external_preprocessor(compilation_unit_t *unit) } FILE *f = popen(commandline, "r"); if (f == NULL) { - source_position_t const pos = { unit->name, 0, 0, 0 }; + position_t const pos = { unit->name, 0, 0, 0 }; errorf(&pos, "invoking preprocessor failed"); return false; } @@ -454,7 +454,7 @@ static void assemble(const char *out, const char *in) } int err = system(commandline); if (err != EXIT_SUCCESS) { - source_position_t const pos = { in, 0, 0, 0 }; + position_t const pos = { in, 0, 0, 0 }; errorf(&pos, "assembler reported an error"); exit(EXIT_FAILURE); } @@ -487,7 +487,7 @@ static void print_file_name(const char *file) } int err = system(commandline); if (err != EXIT_SUCCESS) { - source_position_t const pos = { file, 0, 0, 0 }; + position_t const pos = { file, 0, 0, 0 }; errorf(&pos, "linker reported an error"); exit(EXIT_FAILURE); } @@ -558,13 +558,13 @@ static FILE *make_temp_file(const char *prefix, const char **name_result) char *name = obstack_finish(&file_obst); int fd = mkstemp(name); if (fd == -1) { - source_position_t const pos = { name, 0, 0, 0 }; + position_t const pos = { name, 0, 0, 0 }; errorf(&pos, "could not create temporary file: %s", strerror(errno)); return NULL; } FILE *out = fdopen(fd, "w"); if (out == NULL) { - source_position_t const pos = { name, 0, 0, 0 }; + position_t const pos = { name, 0, 0, 0 }; errorf(&pos, "could not open temporary file as FILE*"); return NULL; } @@ -1236,7 +1236,7 @@ static bool open_input(compilation_unit_t *unit) } else { unit->input = fopen(inputname, "r"); if (unit->input == NULL) { - source_position_t const pos = { inputname, 0, 0, 0 }; + position_t const pos = { inputname, 0, 0, 0 }; errorf(&pos, "could not open: %s", strerror(errno)); return false; } @@ -1286,7 +1286,7 @@ again: } res = !ir_import_file(unit->input, unit->name); if (!res) { - source_position_t const pos = { inputname, 0, 0, 0 }; + position_t const pos = { inputname, 0, 0, 0 }; errorf(&pos, "import of firm graph failed"); result = EXIT_FAILURE; break; @@ -1607,7 +1607,7 @@ int main(int argc, char **argv) } else if (option[0] == 'g') { /* TODO: parse -gX with 0<=x<=3... */ set_be_option("debug=frameinfo"); - set_be_option("ia32-nooptcc=yes"); + set_be_option("ia32-optcc=false"); } else if (SINGLE_OPTION('c')) { mode = CompileAssemble; } else if (SINGLE_OPTION('E')) { @@ -2211,7 +2211,7 @@ int main(int argc, char **argv) if (outname == NULL) { const char *filename = units->name; - switch(mode) { + switch (mode) { case BenchmarkParser: case PrintAst: case PrintFluffy: @@ -2256,7 +2256,7 @@ int main(int argc, char **argv) } else { out = fopen(outname, "w"); if (out == NULL) { - source_position_t const pos = { outname, 0, 0, 0 }; + position_t const pos = { outname, 0, 0, 0 }; errorf(&pos, "could not open for writing: %s", strerror(errno)); return EXIT_FAILURE; }