diff options
author | marha <marha@users.sourceforge.net> | 2012-06-28 08:12:11 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-06-28 08:12:11 +0200 |
commit | 4376eeccc64a10e2a74fd0eb4184d2a144058470 (patch) | |
tree | 6a55f2d7660286e3250038228fa33d1fa1d0017e /mesalib/src/glsl/glcpp/pp.c | |
parent | 74a24d67cefc273c717f17150b9d41607bcaf8ce (diff) | |
parent | 67551627d34fff4a0fbe719bce33a3bacb55ccef (diff) | |
download | vcxsrv-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.c | 38 |
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. */ |