From: Wolfgang (Blub) Bumiller Date: Tue, 18 Dec 2012 11:41:29 +0000 (+0100) Subject: qcvm -pringdefs now prints [SAVE] next to globals with DEF_SAVEFLAG set X-Git-Tag: 0.1.9~65 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2a94fe97310ce12d57d8a696da1dcca4cd56b684;p=xonotic%2Fgmqcc.git qcvm -pringdefs now prints [SAVE] next to globals with DEF_SAVEFLAG set --- diff --git a/exec.c b/exec.c index 6d66ef2..41c4366 100644 --- a/exec.c +++ b/exec.c @@ -930,18 +930,20 @@ int main(int argc, char **argv) } if (opts_printdefs) { for (i = 0; i < vec_size(prog->defs); ++i) { - printf("Global: %8s %-16s at %u\n", + printf("Global: %8s %-16s at %u%s\n", type_name[prog->defs[i].type & DEF_TYPEMASK], prog_getstring(prog, prog->defs[i].name), - (unsigned int)prog->defs[i].offset); + (unsigned int)prog->defs[i].offset, + ((prog->defs[i].type & DEF_SAVEGLOBAL) ? " [SAVE]" : "")); } } else if (opts_printfields) { for (i = 0; i < vec_size(prog->fields); ++i) { - printf("Field: %8s %-16s at %u\n", + printf("Field: %8s %-16s at %u%s\n", type_name[prog->fields[i].type], prog_getstring(prog, prog->fields[i].name), - (unsigned int)prog->fields[i].offset); + (unsigned int)prog->fields[i].offset, + ((prog->fields[i].type & DEF_SAVEGLOBAL) ? " [SAVE]" : "")); } } else if (opts_printfuns) {