put in stubs for help for -C, -W and -N

This commit is contained in:
Bill Currie 2007-04-10 13:10:53 +00:00 committed by Jeff Teunissen
parent 2e6ecd97c8
commit 15dc16ff64

View file

@ -156,6 +156,30 @@ usage (int status)
exit (status); exit (status);
} }
static void
code_usage (void)
{
printf ("%s - QuakeForge Code Compiler\n", this_program);
printf ("Code generation options\n");
exit (0);
}
static void
warning_usage (void)
{
printf ("%s - QuakeForge Code Compiler\n", this_program);
printf ("Warnings options\n");
exit (0);
}
static void
notice_usage (void)
{
printf ("%s - QuakeForge Code Compiler\n", this_program);
printf ("Notice options\n");
exit (0);
}
static void static void
add_file (const char *file) add_file (const char *file)
{ {
@ -282,6 +306,8 @@ DecodeArgs (int argc, char **argv)
options.code.debug = flag; options.code.debug = flag;
} else if (!(strcasecmp (temp, "fast-float"))) { } else if (!(strcasecmp (temp, "fast-float"))) {
options.code.fast_float = flag; options.code.fast_float = flag;
} else if (!str(casecmp (temp, "help"))) {
code_usage ();
} else if (!(strcasecmp (temp, "local-merging"))) { } else if (!(strcasecmp (temp, "local-merging"))) {
options.code.local_merging = flag; options.code.local_merging = flag;
} else if (!(strcasecmp (temp, "short-circuit"))) { } else if (!(strcasecmp (temp, "short-circuit"))) {
@ -345,6 +371,8 @@ DecodeArgs (int argc, char **argv)
options.warnings.promote = flag; options.warnings.promote = flag;
} else if (!strcasecmp (temp, "executable")) { } else if (!strcasecmp (temp, "executable")) {
options.warnings.executable = flag; options.warnings.executable = flag;
} else if (!str(casecmp (temp, "help"))) {
warning_usage ();
} else if (!strcasecmp (temp, "initializer")) { } else if (!strcasecmp (temp, "initializer")) {
options.warnings.initializer = flag; options.warnings.initializer = flag;
} else if (!strcasecmp (temp, "integer-divide")) { } else if (!strcasecmp (temp, "integer-divide")) {
@ -377,7 +405,9 @@ DecodeArgs (int argc, char **argv)
char *temp = strtok (opts, ","); char *temp = strtok (opts, ",");
while (temp) { while (temp) {
if (!(strcasecmp (temp, "none"))) { if (!str(casecmp (temp, "help"))) {
notice_usage ();
} else if (!(strcasecmp (temp, "none"))) {
options.notices.silent = true; options.notices.silent = true;
} else if (!(strcasecmp (temp, "warn"))) { } else if (!(strcasecmp (temp, "warn"))) {
options.notices.promote = true; options.notices.promote = true;