diff options
Diffstat (limited to 'src/glsl/apps')
-rw-r--r-- | src/glsl/apps/process.c | 6 | ||||
-rw-r--r-- | src/glsl/apps/purify.c | 6 | ||||
-rw-r--r-- | src/glsl/apps/tokenise.c | 6 | ||||
-rw-r--r-- | src/glsl/apps/version.c | 6 |
4 files changed, 16 insertions, 8 deletions
diff --git a/src/glsl/apps/process.c b/src/glsl/apps/process.c index e20b68b1a9..7f392613e0 100644 --- a/src/glsl/apps/process.c +++ b/src/glsl/apps/process.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; unsigned int version; @@ -91,8 +93,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); diff --git a/src/glsl/apps/purify.c b/src/glsl/apps/purify.c index 53ba253022..8c01f4fc6a 100644 --- a/src/glsl/apps/purify.c +++ b/src/glsl/apps/purify.c @@ -40,6 +40,8 @@ main(int argc, char *inbuf; struct sl_pp_purify_options options; char *outbuf; + char errmsg[100] = ""; + unsigned int errline = 0; FILE *out; if (argc != 3) { @@ -84,8 +86,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 %u: %s\n", errline, errmsg); free(inbuf); fclose(out); diff --git a/src/glsl/apps/tokenise.c b/src/glsl/apps/tokenise.c index d6b9c4fa04..9dd9631a4e 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); diff --git a/src/glsl/apps/version.c b/src/glsl/apps/version.c index 4570f86217..1127dae516 100644 --- a/src/glsl/apps/version.c +++ b/src/glsl/apps/version.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; unsigned int version; @@ -89,8 +91,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); |