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);
}
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
add_file (const char *file)
{
@ -282,6 +306,8 @@ DecodeArgs (int argc, char **argv)
options.code.debug = flag;
} else if (!(strcasecmp (temp, "fast-float"))) {
options.code.fast_float = flag;
} else if (!str(casecmp (temp, "help"))) {
code_usage ();
} else if (!(strcasecmp (temp, "local-merging"))) {
options.code.local_merging = flag;
} else if (!(strcasecmp (temp, "short-circuit"))) {
@ -345,6 +371,8 @@ DecodeArgs (int argc, char **argv)
options.warnings.promote = flag;
} else if (!strcasecmp (temp, "executable")) {
options.warnings.executable = flag;
} else if (!str(casecmp (temp, "help"))) {
warning_usage ();
} else if (!strcasecmp (temp, "initializer")) {
options.warnings.initializer = flag;
} else if (!strcasecmp (temp, "integer-divide")) {
@ -377,7 +405,9 @@ DecodeArgs (int argc, char **argv)
char *temp = strtok (opts, ",");
while (temp) {
if (!(strcasecmp (temp, "none"))) {
if (!str(casecmp (temp, "help"))) {
notice_usage ();
} else if (!(strcasecmp (temp, "none"))) {
options.notices.silent = true;
} else if (!(strcasecmp (temp, "warn"))) {
options.notices.promote = true;