libdrawtext
changeset 100:49feeaf50ae8 tip master
merged
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 18 Dec 2015 02:55:35 +0200 |
parents | 155ed299364a 670d0affc08f |
children | |
files | |
diffstat | 4 files changed, 20 insertions(+), 11 deletions(-) [+] |
line diff
1.1 --- a/src/drawgl.c Sat Mar 14 23:25:10 2015 +0200 1.2 +++ b/src/drawgl.c Fri Dec 18 02:55:35 2015 +0200 1.3 @@ -176,9 +176,7 @@ 1.4 return; 1.5 } 1.6 1.7 - va_start(ap, fmt); 1.8 buf_size = vsnprintf(&tmp, 0, fmt, ap); 1.9 - va_end(ap); 1.10 1.11 if(buf_size == -1) { 1.12 buf_size = 512;
2.1 --- a/src/drawtext_impl.h Sat Mar 14 23:25:10 2015 +0200 2.2 +++ b/src/drawtext_impl.h Fri Dec 18 02:55:35 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 Sat Mar 14 23:25:10 2015 +0200 3.2 +++ b/src/font.c Fri Dec 18 02:55:35 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);
4.1 --- a/tools/font2glyphmap/Makefile Sat Mar 14 23:25:10 2015 +0200 4.2 +++ b/tools/font2glyphmap/Makefile Fri Dec 18 02:55:35 2015 +0200 4.3 @@ -1,3 +1,5 @@ 4.4 +PREFIX = /usr/local 4.5 + 4.6 src = $(wildcard src/*.c) 4.7 obj = $(src:.c=.o) 4.8 bin = font2glyphmap 4.9 @@ -22,3 +24,12 @@ 4.10 .PHONY: clean 4.11 clean: 4.12 rm -f $(obj) $(bin) $(lib_so) 4.13 + 4.14 +.PHONY: install 4.15 +install: 4.16 + mkdir -p $(DESTDIR)$(PREFIX)/bin 4.17 + cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) 4.18 + 4.19 +.PHONY: uninstall 4.20 +uninstall: 4.21 + rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)