libdrawtext
changeset 51:670d0affc08f
fixed bad commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 30 Oct 2015 06:30:17 +0200 |
parents | 4452a6143d12 |
children | 49feeaf50ae8 |
files | src/drawgl.c src/drawtext_impl.h src/font.c |
diffstat | 3 files changed, 9 insertions(+), 17 deletions(-) [+] |
line diff
1.1 --- a/src/drawgl.c Fri Oct 30 06:26:15 2015 +0200 1.2 +++ b/src/drawgl.c Fri Oct 30 06:30:17 2015 +0200 1.3 @@ -169,14 +169,6 @@ 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
2.1 --- a/src/drawtext_impl.h Fri Oct 30 06:26:15 2015 +0200 2.2 +++ b/src/drawtext_impl.h Fri Oct 30 06:30:17 2015 +0200 2.3 @@ -61,7 +61,7 @@ 2.4 2.5 2.6 #define fperror(str) \ 2.7 - fprintf(stderr, "%s: %s: %s\n", __FUNCTION__, (str), strerror(errno)) 2.8 + fprintf(stderr, "%s: %s: %s\n", __func__, (str), strerror(errno)) 2.9 2.10 int dtx_gl_init(void); 2.11
3.1 --- a/src/font.c Fri Oct 30 06:26:15 2015 +0200 3.2 +++ b/src/font.c Fri Oct 30 06:30:17 2015 +0200 3.3 @@ -149,14 +149,14 @@ 3.4 void dtx_prepare(struct dtx_font *fnt, int sz) 3.5 { 3.6 if(!dtx_get_font_glyphmap_range(fnt, sz, 0, 256)) { 3.7 - fprintf(stderr, "%s: failed (sz: %d, range: 0-255 [ascii])\n", __FUNCTION__, sz); 3.8 + fprintf(stderr, "%s: failed (sz: %d, range: 0-255 [ascii])\n", __func__, sz); 3.9 } 3.10 } 3.11 3.12 void dtx_prepare_range(struct dtx_font *fnt, int sz, int cstart, int cend) 3.13 { 3.14 if(!dtx_get_font_glyphmap_range(fnt, sz, cstart, cend)) { 3.15 - fprintf(stderr, "%s: failed (sz: %d, range: %d-%d)\n", __FUNCTION__, sz, cstart, cend); 3.16 + fprintf(stderr, "%s: failed (sz: %d, range: %d-%d)\n", __func__, sz, cstart, cend); 3.17 } 3.18 } 3.19 3.20 @@ -411,7 +411,7 @@ 3.21 } 3.22 3.23 } else { 3.24 - fprintf(stderr, "%s: invalid glyph info line\n", __FUNCTION__); 3.25 + fprintf(stderr, "%s: invalid glyph info line\n", __func__); 3.26 goto err; 3.27 } 3.28 3.29 @@ -419,14 +419,14 @@ 3.30 switch(hdr_lines) { 3.31 case 0: 3.32 if(0[line] != 'P' || 1[line] != '6') { 3.33 - fprintf(stderr, "%s: invalid file format (magic)\n", __FUNCTION__); 3.34 + fprintf(stderr, "%s: invalid file format (magic)\n", __func__); 3.35 goto err; 3.36 } 3.37 break; 3.38 3.39 case 1: 3.40 if(sscanf(line, "%d %d", &gmap->xsz, &gmap->ysz) != 2) { 3.41 - fprintf(stderr, "%s: invalid file format (dim)\n", __FUNCTION__); 3.42 + fprintf(stderr, "%s: invalid file format (dim)\n", __func__); 3.43 goto err; 3.44 } 3.45 break; 3.46 @@ -436,7 +436,7 @@ 3.47 char *endp; 3.48 max_pixval = strtol(line, &endp, 10); 3.49 if(endp == line) { 3.50 - fprintf(stderr, "%s: invalid file format (maxval)\n", __FUNCTION__); 3.51 + fprintf(stderr, "%s: invalid file format (maxval)\n", __func__); 3.52 goto err; 3.53 } 3.54 } 3.55 @@ -450,7 +450,7 @@ 3.56 } 3.57 3.58 if(gmap->ptsize == -1 || gmap->line_advance == FLT_MIN) { 3.59 - fprintf(stderr, "%s: invalid glyphmap, insufficient information in ppm comments\n", __FUNCTION__); 3.60 + fprintf(stderr, "%s: invalid glyphmap, insufficient information in ppm comments\n", __func__); 3.61 goto err; 3.62 } 3.63 3.64 @@ -514,7 +514,7 @@ 3.65 int res; 3.66 3.67 if(!(fp = fopen(fname, "wb"))) { 3.68 - fprintf(stderr, "%s: failed to open file: %s: %s\n", __FUNCTION__, fname, strerror(errno)); 3.69 + fprintf(stderr, "%s: failed to open file: %s: %s\n", __func__, fname, strerror(errno)); 3.70 return -1; 3.71 } 3.72 res = dtx_save_glyphmap_stream(fp, gmap);