aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glcpp/pp.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-28 08:12:11 +0200
committermarha <marha@users.sourceforge.net>2012-06-28 08:12:11 +0200
commit4376eeccc64a10e2a74fd0eb4184d2a144058470 (patch)
tree6a55f2d7660286e3250038228fa33d1fa1d0017e /mesalib/src/glsl/glcpp/pp.c
parent74a24d67cefc273c717f17150b9d41607bcaf8ce (diff)
parent67551627d34fff4a0fbe719bce33a3bacb55ccef (diff)
downloadvcxsrv-4376eeccc64a10e2a74fd0eb4184d2a144058470.tar.gz
vcxsrv-4376eeccc64a10e2a74fd0eb4184d2a144058470.tar.bz2
vcxsrv-4376eeccc64a10e2a74fd0eb4184d2a144058470.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/glsl/glcpp/pp.c')
-rw-r--r--mesalib/src/glsl/glcpp/pp.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/mesalib/src/glsl/glcpp/pp.c b/mesalib/src/glsl/glcpp/pp.c
index 3640896a2..9170d14a3 100644
--- a/mesalib/src/glsl/glcpp/pp.c
+++ b/mesalib/src/glsl/glcpp/pp.c
@@ -33,15 +33,20 @@ glcpp_error (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...)
va_list ap;
parser->error = 1;
- ralloc_asprintf_append(&parser->info_log, "%u:%u(%u): "
- "preprocessor error: ",
- locp->source,
- locp->first_line,
- locp->first_column);
+ ralloc_asprintf_rewrite_tail(&parser->info_log,
+ &parser->info_log_length,
+ "%u:%u(%u): "
+ "preprocessor error: ",
+ locp->source,
+ locp->first_line,
+ locp->first_column);
va_start(ap, fmt);
- ralloc_vasprintf_append(&parser->info_log, fmt, ap);
+ ralloc_vasprintf_rewrite_tail(&parser->info_log,
+ &parser->info_log_length,
+ fmt, ap);
va_end(ap);
- ralloc_strcat(&parser->info_log, "\n");
+ ralloc_asprintf_rewrite_tail(&parser->info_log,
+ &parser->info_log_length, "\n");
}
void
@@ -49,15 +54,20 @@ glcpp_warning (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...)
{
va_list ap;
- ralloc_asprintf_append(&parser->info_log, "%u:%u(%u): "
- "preprocessor warning: ",
- locp->source,
- locp->first_line,
- locp->first_column);
+ ralloc_asprintf_rewrite_tail(&parser->info_log,
+ &parser->info_log_length,
+ "%u:%u(%u): "
+ "preprocessor warning: ",
+ locp->source,
+ locp->first_line,
+ locp->first_column);
va_start(ap, fmt);
- ralloc_vasprintf_append(&parser->info_log, fmt, ap);
+ ralloc_vasprintf_rewrite_tail(&parser->info_log,
+ &parser->info_log_length,
+ fmt, ap);
va_end(ap);
- ralloc_strcat(&parser->info_log, "\n");
+ ralloc_asprintf_rewrite_tail(&parser->info_log,
+ &parser->info_log_length, "\n");
}
/* Searches backwards for '^ *#' from a given starting point. */