libdrawtext

diff src/font.c @ 100:49feeaf50ae8

merged
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 18 Dec 2015 02:55:35 +0200
parents 43444ec90632
children
line diff
     1.1 --- a/src/font.c	Sat Mar 14 23:25:10 2015 +0200
     1.2 +++ b/src/font.c	Fri Dec 18 02:55:35 2015 +0200
     1.3 @@ -149,14 +149,14 @@
     1.4  void dtx_prepare(struct dtx_font *fnt, int sz)
     1.5  {
     1.6  	if(!dtx_get_font_glyphmap_range(fnt, sz, 0, 256)) {
     1.7 -		fprintf(stderr, "%s: failed (sz: %d, range: 0-255 [ascii])\n", __FUNCTION__, sz);
     1.8 +		fprintf(stderr, "%s: failed (sz: %d, range: 0-255 [ascii])\n", __func__, sz);
     1.9  	}
    1.10  }
    1.11  
    1.12  void dtx_prepare_range(struct dtx_font *fnt, int sz, int cstart, int cend)
    1.13  {
    1.14  	if(!dtx_get_font_glyphmap_range(fnt, sz, cstart, cend)) {
    1.15 -		fprintf(stderr, "%s: failed (sz: %d, range: %d-%d)\n", __FUNCTION__, sz, cstart, cend);
    1.16 +		fprintf(stderr, "%s: failed (sz: %d, range: %d-%d)\n", __func__, sz, cstart, cend);
    1.17  	}
    1.18  }
    1.19  
    1.20 @@ -411,7 +411,7 @@
    1.21  				}
    1.22  
    1.23  			} else {
    1.24 -				fprintf(stderr, "%s: invalid glyph info line\n", __FUNCTION__);
    1.25 +				fprintf(stderr, "%s: invalid glyph info line\n", __func__);
    1.26  				goto err;
    1.27  			}
    1.28  
    1.29 @@ -419,14 +419,14 @@
    1.30  			switch(hdr_lines) {
    1.31  			case 0:
    1.32  				if(0[line] != 'P' || 1[line] != '6') {
    1.33 -					fprintf(stderr, "%s: invalid file format (magic)\n", __FUNCTION__);
    1.34 +					fprintf(stderr, "%s: invalid file format (magic)\n", __func__);
    1.35  					goto err;
    1.36  				}
    1.37  				break;
    1.38  
    1.39  			case 1:
    1.40  				if(sscanf(line, "%d %d", &gmap->xsz, &gmap->ysz) != 2) {
    1.41 -					fprintf(stderr, "%s: invalid file format (dim)\n", __FUNCTION__);
    1.42 +					fprintf(stderr, "%s: invalid file format (dim)\n", __func__);
    1.43  					goto err;
    1.44  				}
    1.45  				break;
    1.46 @@ -436,7 +436,7 @@
    1.47  					char *endp;
    1.48  					max_pixval = strtol(line, &endp, 10);
    1.49  					if(endp == line) {
    1.50 -						fprintf(stderr, "%s: invalid file format (maxval)\n", __FUNCTION__);
    1.51 +						fprintf(stderr, "%s: invalid file format (maxval)\n", __func__);
    1.52  						goto err;
    1.53  					}
    1.54  				}
    1.55 @@ -450,7 +450,7 @@
    1.56  	}
    1.57  
    1.58  	if(gmap->ptsize == -1 || gmap->line_advance == FLT_MIN) {
    1.59 -		fprintf(stderr, "%s: invalid glyphmap, insufficient information in ppm comments\n", __FUNCTION__);
    1.60 +		fprintf(stderr, "%s: invalid glyphmap, insufficient information in ppm comments\n", __func__);
    1.61  		goto err;
    1.62  	}
    1.63  
    1.64 @@ -514,7 +514,7 @@
    1.65  	int res;
    1.66  
    1.67  	if(!(fp = fopen(fname, "wb"))) {
    1.68 -		fprintf(stderr, "%s: failed to open file: %s: %s\n", __FUNCTION__, fname, strerror(errno));
    1.69 +		fprintf(stderr, "%s: failed to open file: %s: %s\n", __func__, fname, strerror(errno));
    1.70  		return -1;
    1.71  	}
    1.72  	res = dtx_save_glyphmap_stream(fp, gmap);