diff options
Diffstat (limited to 'src/glsl/apps/process.c')
-rw-r--r-- | src/glsl/apps/process.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/glsl/apps/process.c b/src/glsl/apps/process.c index 7f392613e09..2cec9a99719 100644 --- a/src/glsl/apps/process.c +++ b/src/glsl/apps/process.c @@ -40,7 +40,6 @@ main(int argc, long size; char *inbuf; struct sl_pp_purify_options options; - char *outbuf; char errmsg[100] = ""; unsigned int errline = 0; struct sl_pp_context *context; @@ -93,35 +92,25 @@ main(int argc, memset(&options, 0, sizeof(options)); - if (sl_pp_purify(inbuf, &options, &outbuf, errmsg, sizeof(errmsg), &errline)) { - fprintf(out, "$PURIFYERROR %s\n", errmsg); - - free(inbuf); - fclose(out); - return 1; - } - - free(inbuf); - context = sl_pp_context_create(); if (!context) { fprintf(out, "$CONTEXERROR\n"); - free(outbuf); + free(inbuf); fclose(out); return 1; } - if (sl_pp_tokenise(context, outbuf, &tokens)) { + if (sl_pp_tokenise(context, inbuf, &options, &tokens)) { fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); sl_pp_context_destroy(context); - free(outbuf); + free(inbuf); fclose(out); return 1; } - free(outbuf); + free(inbuf); if (sl_pp_version(context, tokens, &version, &tokens_eaten)) { fprintf(out, "$ERROR: `%s'\n", sl_pp_context_error_message(context)); |