mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-24 20:51:35 +00:00
[qfcc] Add pragma control of code options
This commit is contained in:
parent
f974192177
commit
79dbc9b866
1 changed files with 17 additions and 0 deletions
|
@ -97,6 +97,21 @@ set_traditional (int traditional)
|
||||||
opcode_init (); // reset the opcode table
|
opcode_init (); // reset the opcode table
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
set_code (pragma_arg_t *args)
|
||||||
|
{
|
||||||
|
if (!args) {
|
||||||
|
warning (0, "missing code flag");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const char *flag = args->arg;
|
||||||
|
if (!parse_code_option (flag)) {
|
||||||
|
}
|
||||||
|
if (args->next) {
|
||||||
|
warning (0, "pragma code: ignoring extra arguments");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_bug (pragma_arg_t *args)
|
set_bug (pragma_arg_t *args)
|
||||||
{
|
{
|
||||||
|
@ -203,6 +218,8 @@ pragma_process ()
|
||||||
set_traditional (0);
|
set_traditional (0);
|
||||||
} else if (!strcmp (id, "ruamoko") || !strcmp (id, "raumoko")) {
|
} else if (!strcmp (id, "ruamoko") || !strcmp (id, "raumoko")) {
|
||||||
set_traditional (-1);
|
set_traditional (-1);
|
||||||
|
} else if (!strcmp (id, "code")) {
|
||||||
|
set_code (pragma_args->next);
|
||||||
} else if (!strcmp (id, "bug")) {
|
} else if (!strcmp (id, "bug")) {
|
||||||
set_bug (pragma_args->next);
|
set_bug (pragma_args->next);
|
||||||
} else if (!strcmp (id, "warn")) {
|
} else if (!strcmp (id, "warn")) {
|
||||||
|
|
Loading…
Reference in a new issue