X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=main.c;h=e801aaff7ea7d840a658e504273c4b0b99ed2f81;hb=533b2144c554179ba1375e3e49bee6a18715977f;hp=dee9a3293b0bc6765c81ef485265214accc0ce7a;hpb=36c5722273f1ea87603621c6ee20b7178a7a641b;p=xonotic%2Fgmqcc.git diff --git a/main.c b/main.c index dee9a32..e801aaf 100644 --- a/main.c +++ b/main.c @@ -318,7 +318,7 @@ static bool options_parse(int argc, char **argv) { con_out("Possible flags:\n\n"); for (itr = 0; itr < COUNT_FLAGS; ++itr) { util_strtononcmd(opts_flag_list[itr].name, buffer, sizeof(buffer)); - con_out(" -f%s:\n%s\n\n", buffer, opts_flag_list[itr].description); + con_out(" -f%s\n", buffer); } exit(0); } @@ -339,7 +339,9 @@ static bool options_parse(int argc, char **argv) { con_out("Possible warnings:\n"); for (itr = 0; itr < COUNT_WARNINGS; ++itr) { util_strtononcmd(opts_warn_list[itr].name, buffer, sizeof(buffer)); - con_out(" -W%s:\n%s\n\n\n", buffer, opts_warn_list[itr].description); + con_out(" -W%s\n", buffer); + if (itr == WARN_DEBUG) + con_out(" Warnings included by -Wall:\n"); } exit(0); } @@ -410,7 +412,7 @@ static bool options_parse(int argc, char **argv) { con_out("Possible optimizations:\n"); for (itr = 0; itr < COUNT_OPTIMIZATIONS; ++itr) { util_strtononcmd(opts_opt_list[itr].name, buffer, sizeof(buffer)); - con_out(" -O%-20s (-O%u):\n%s\n\n", buffer, opts_opt_oflag[itr], opts_opt_list[itr].description); + con_out(" -O%-20s (-O%u)\n", buffer, opts_opt_oflag[itr]); } exit(0); } @@ -520,7 +522,7 @@ static bool progs_nextline(char **out, size_t *alen,FILE *src) { char *end; line = *out; - len = file_getline(&line, alen, src); + len = fs_file_getline(&line, alen, src); if (len == -1) return false; @@ -606,7 +608,7 @@ int main(int argc, char **argv) { if (OPTS_OPTION_BOOL(OPTION_PP_ONLY)) { if (opts_output_wasset) { - outfile = file_open(OPTS_OPTION_STR(OPTION_OUTPUT), "wb"); + outfile = fs_file_open(OPTS_OPTION_STR(OPTION_OUTPUT), "wb"); if (!outfile) { con_err("failed to open `%s` for writing\n", OPTS_OPTION_STR(OPTION_OUTPUT)); retval = 1; @@ -658,7 +660,7 @@ int main(int argc, char **argv) { progs_src = true; - src = file_open("progs.src", "rb"); + src = fs_file_open("progs.src", "rb"); if (!src) { con_err("failed to open `progs.src` for reading\n"); retval = 1; @@ -687,7 +689,7 @@ int main(int argc, char **argv) { } srcdone: - file_close(src); + fs_file_close(src); mem_d(line); } @@ -721,7 +723,7 @@ srcdone: } out = ftepp_get(); if (out) - file_printf(outfile, "%s", out); + fs_file_printf(outfile, "%s", out); ftepp_flush(); } else {