From 2a94fe97310ce12d57d8a696da1dcca4cd56b684 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Tue, 18 Dec 2012 12:41:29 +0100 Subject: [PATCH] qcvm -pringdefs now prints [SAVE] next to globals with DEF_SAVEFLAG set --- exec.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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) { -- 2.39.2