From 693de608d7e660accc2e3ecc060639728d14cbcf Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 25 Apr 2008 04:04:19 -0400 Subject: [PATCH] Print variable names in testparse.c. --HG-- branch : trunk --- testparse.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/testparse.c b/testparse.c index 20f90588..3cee265a 100644 --- a/testparse.c +++ b/testparse.c @@ -76,7 +76,10 @@ static int do_parse(const unsigned char *buf, const int len, const char *prof) char numstr[16] = { 0 }; if (a->index != 0) snprintf(numstr, sizeof (numstr), "%d", a->index); - printf(" * %s%s\n", usagenames[(int) a->usage], numstr); + printf(" * %s%s", usagenames[(int) a->usage], numstr); + if (a->name != NULL) + printf(" (\"%s\")", a->name); + printf("\n"); } // for } // else @@ -91,7 +94,10 @@ static int do_parse(const unsigned char *buf, const int len, const char *prof) { static const char *typenames[] = { "float", "int", "bool" }; const MOJOSHADER_uniform *u = &pd->uniforms[i]; - printf(" * %d: %s\n", u->index, typenames[(int) u->type]); + printf(" * %d: %s", u->index, typenames[(int) u->type]); + if (u->name != NULL) + printf(" (\"%s\")", u->name); + printf("\n"); } // for } // else @@ -106,7 +112,10 @@ static int do_parse(const unsigned char *buf, const int len, const char *prof) { static const char *typenames[] = { "2d", "cube", "volume" }; const MOJOSHADER_sampler *s = &pd->samplers[i]; - printf(" * %d: %s\n", s->index, typenames[(int) s->type]); + printf(" * %d: %s", s->index, typenames[(int) s->type]); + if (s->name != NULL) + printf(" (\"%s\")", s->name); + printf("\n"); } // for } // else