summaryrefslogtreecommitdiff
path: root/glcpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-06-21 11:47:55 -0700
committerKenneth Graunke <kenneth@whitecape.org>2010-06-21 12:41:05 -0700
commit74704e80c69f400f7712aed4287a84adc13bfbed (patch)
tree4f966f2fe8b95449557058e59dd941d8dfd5584e /glcpp
parent4a2bbdacfc29460de09e5f806fcc96040ad17dc4 (diff)
glcpp: Print to the main compiler's infolog, not stdout.
Diffstat (limited to 'glcpp')
-rw-r--r--glcpp/pp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/glcpp/pp.c b/glcpp/pp.c
index e6921db46b..5455518c7c 100644
--- a/glcpp/pp.c
+++ b/glcpp/pp.c
@@ -57,7 +57,7 @@ glcpp_warning (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...)
}
extern int
-preprocess(void *talloc_ctx, const char **shader)
+preprocess(void *talloc_ctx, const char **shader, char **info_log)
{
int errors;
glcpp_parser_t *parser = glcpp_parser_create ();
@@ -65,7 +65,7 @@ preprocess(void *talloc_ctx, const char **shader)
glcpp_parser_parse (parser);
- printf("%s", parser->info_log);
+ *info_log = talloc_strdup_append(*info_log, parser->info_log);
talloc_steal(talloc_ctx, parser->output);
*shader = parser->output;