summaryrefslogtreecommitdiff
path: root/src/glsl
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-11-10 00:15:54 +0100
committerMichal Krol <michal@vmware.com>2009-11-10 00:15:54 +0100
commitb5c8c87eab4cbc4f05cbd98d7647b9b83607f976 (patch)
tree84376f973f5fb4157e1f3aded461881c00147cc2 /src/glsl
parentd37f7694b60d3dad8daf9e2af4e509c15b996553 (diff)
glsl/apps: Update for glsl/pp interface changes.
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/apps/process.c6
-rw-r--r--src/glsl/apps/purify.c6
-rw-r--r--src/glsl/apps/tokenise.c6
-rw-r--r--src/glsl/apps/version.c6
4 files changed, 16 insertions, 8 deletions
diff --git a/src/glsl/apps/process.c b/src/glsl/apps/process.c
index e20b68b1a9a..7f392613e09 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 53ba2530225..8c01f4fc6a3 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 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);
diff --git a/src/glsl/apps/version.c b/src/glsl/apps/version.c
index 4570f86217e..1127dae5161 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);