summaryrefslogtreecommitdiffstats
path: root/src/glsl/apps/tokenise.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/apps/tokenise.c')
-rw-r--r--src/glsl/apps/tokenise.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/glsl/apps/tokenise.c b/src/glsl/apps/tokenise.c
index d6b9c4fa045..9dd9631a4ed 100644
--- a/src/glsl/apps/tokenise.c
+++ b/src/glsl/apps/tokenise.c
@@ -41,6 +41,8 @@ main(int argc,
char *inbuf;
struct sl_pp_purify_options options;
char *outbuf;
+ char errmsg[100] = "";
+ unsigned int errline = 0;
struct sl_pp_context *context;
struct sl_pp_token_info *tokens;
FILE *out;
@@ -88,8 +90,8 @@ main(int argc,
memset(&options, 0, sizeof(options));
- if (sl_pp_purify(inbuf, &options, &outbuf)) {
- fprintf(out, "$PURIFYERROR\n");
+ if (sl_pp_purify(inbuf, &options, &outbuf, errmsg, sizeof(errmsg), &errline)) {
+ fprintf(out, "$PURIFYERROR %s\n", errmsg);
free(inbuf);
fclose(out);