libdrawtext
changeset 47:00f98842608f
dtx_vprintf
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 18 Sep 2015 06:40:58 +0300 |
parents | 1ff87789079b |
children | 1e72e35a85ee |
files | src/drawgl.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/src/drawgl.c Thu Sep 11 21:47:12 2014 +0300 1.2 +++ b/src/drawgl.c Fri Sep 18 06:40:58 2015 +0300 1.3 @@ -169,6 +169,14 @@ 1.4 void dtx_printf(const char *fmt, ...) 1.5 { 1.6 va_list ap; 1.7 + 1.8 + va_start(ap, fmt); 1.9 + dtx_vprintf(fmt, ap); 1.10 + va_end(ap); 1.11 +} 1.12 + 1.13 +void dtx_vprintf(const char *fmt, va_list ap) 1.14 +{ 1.15 int buf_size; 1.16 char *buf, tmp; 1.17 1.18 @@ -176,9 +184,7 @@ 1.19 return; 1.20 } 1.21 1.22 - va_start(ap, fmt); 1.23 buf_size = vsnprintf(&tmp, 0, fmt, ap); 1.24 - va_end(ap); 1.25 1.26 if(buf_size == -1) { 1.27 buf_size = 512;