mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Add some diagnostic variables.
__PRETTY_FUNCTION__ __FUNCTION__ __LINE__ and __FILE__
This commit is contained in:
parent
96ba4605fa
commit
b4dd1b0a89
1 changed files with 19 additions and 0 deletions
|
@ -136,6 +136,25 @@ convert_name (expr_t *e)
|
|||
expr_t *new;
|
||||
class_t *class;
|
||||
|
||||
if (!strcmp (name, "__PRETTY_FUNCTION__")
|
||||
&& current_func) {
|
||||
new = new_string_expr (current_func->name);
|
||||
goto convert;
|
||||
}
|
||||
if (!strcmp (name, "__FUNCTION__")
|
||||
&& current_func) {
|
||||
new = new_string_expr (current_func->def->name);
|
||||
goto convert;
|
||||
}
|
||||
if (!strcmp (name, "__LINE__")) {
|
||||
new = new_integer_expr (e->line);
|
||||
goto convert;
|
||||
}
|
||||
if (!strcmp (name, "__FILE__")) {
|
||||
new = new_string_expr (G_GETSTR (e->file));
|
||||
goto convert;
|
||||
}
|
||||
|
||||
/// Convert name to enum (integer constant).
|
||||
new = get_enum (name);
|
||||
if (new)
|
||||
|
|
Loading…
Reference in a new issue