summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2009-12-20 13:52:43 +0100
committerMichal Krol <[email protected]>2009-12-20 21:19:02 +0100
commite0f57a37b2533a92359942a9698427922883d227 (patch)
treeb5c2a10f3c7fbd317166c48dee586e534d8da5e6 /src
parent0874ce48a68c06d8bb7387e434af7471d6638e80 (diff)
glsl/apps: Do not print number of eaten tokens in version.
This is due to the glsl pp interface changes.
Diffstat (limited to 'src')
-rw-r--r--src/glsl/apps/version.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/glsl/apps/version.c b/src/glsl/apps/version.c
index 6f77f230ca9..40a4a069c30 100644
--- a/src/glsl/apps/version.c
+++ b/src/glsl/apps/version.c
@@ -41,9 +41,7 @@ main(int argc,
char *inbuf;
struct sl_pp_purify_options options;
struct sl_pp_context *context;
- struct sl_pp_token_info *tokens;
unsigned int version;
- unsigned int tokens_eaten;
FILE *out;
if (argc != 3) {
@@ -88,7 +86,7 @@ main(int argc,
memset(&options, 0, sizeof(options));
- context = sl_pp_context_create();
+ context = sl_pp_context_create(inbuf, &options);
if (!context) {
fprintf(out, "$CONTEXERROR\n");
@@ -97,33 +95,19 @@ main(int argc,
return 1;
}
- if (sl_pp_tokenise(context, inbuf, &options, &tokens)) {
+ if (sl_pp_version(context, &version)) {
fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
sl_pp_context_destroy(context);
free(inbuf);
fclose(out);
- return 1;
- }
-
- free(inbuf);
-
- if (sl_pp_version(context, tokens, &version, &tokens_eaten)) {
- fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context));
-
- sl_pp_context_destroy(context);
- free(tokens);
- fclose(out);
return -1;
}
sl_pp_context_destroy(context);
- free(tokens);
+ free(inbuf);
- fprintf(out,
- "%u\n%u\n",
- version,
- tokens_eaten);
+ fprintf(out, "%u\n", version);
fclose(out);