Skip to content

Commit

Permalink
Print variable names in testparse.c.
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 25, 2008
1 parent 4c76f8b commit 693de60
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions testparse.c
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 693de60

Please sign in to comment.