From: Wolfgang (Blub) Bumiller Date: Wed, 22 Aug 2012 15:32:57 +0000 (+0200) Subject: Nicer -trace output in qcvm/exec X-Git-Tag: 0.1-rc1~90 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=be18550b024fae728ce73c8d2e15fc4a717c2cb2;p=xonotic%2Fgmqcc.git Nicer -trace output in qcvm/exec --- diff --git a/exec.c b/exec.c index fdff787..ea226c9 100644 --- a/exec.c +++ b/exec.c @@ -338,7 +338,11 @@ static void trace_print_global(qc_program *prog, unsigned int glob, int vtype) value = (qcany*)(&prog->globals[glob]); if (def) { - len = printf("[%s] ", prog_getstring(prog, def->name)); + const char *name = prog_getstring(prog, def->name); + if (name[0] == '#') + len = printf("$"); + else + len = printf("%s ", name); vtype = def->type; } else @@ -350,7 +354,7 @@ static void trace_print_global(qc_program *prog, unsigned int glob, int vtype) case TYPE_FIELD: case TYPE_FUNCTION: case TYPE_POINTER: - len += printf("%i,", value->_int); + len += printf("(%i),", value->_int); break; case TYPE_VECTOR: len += printf("'%g %g %g',", value->vector[0],