libdrawtext

diff src/font.c @ 16:baec6ad7b2dd

added visual studio project and fixed some windows build problems
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 10 Mar 2013 18:29:21 +0200
parents b6ed6e9b4092
children df6d52b36bd6
line diff
     1.1 --- a/src/font.c	Thu Feb 28 18:51:33 2013 +0200
     1.2 +++ b/src/font.c	Sun Mar 10 18:29:21 2013 +0200
     1.3 @@ -331,12 +331,12 @@
     1.4  
     1.5  		if(line[0] == '#') {
     1.6  			struct glyph *g;
     1.7 -			int c;
     1.8 -			float x, y, xsz, ysz, res;
     1.9 +			int c, res;
    1.10 +			float x, y, xsz, ysz;
    1.11  
    1.12  			res = sscanf(line + 1, "%d: %fx%f+%f+%f\n", &c, &xsz, &ysz, &x, &y);
    1.13  			if(res != 5) {
    1.14 -				fprintf(stderr, "%s: invalid glyph info line\n", __func__);
    1.15 +				fprintf(stderr, "%s: invalid glyph info line\n", __FUNCTION__);
    1.16  				goto err;
    1.17  			}
    1.18  
    1.19 @@ -362,14 +362,14 @@
    1.20  			switch(hdr_lines) {
    1.21  			case 0:
    1.22  				if(0[line] != 'P' || 1[line] != '6') {
    1.23 -					fprintf(stderr, "%s: invalid file format (magic)\n", __func__);
    1.24 +					fprintf(stderr, "%s: invalid file format (magic)\n", __FUNCTION__);
    1.25  					goto err;
    1.26  				}
    1.27  				break;
    1.28  
    1.29  			case 1:
    1.30  				if(sscanf(line, "%d %d", &gmap->xsz, &gmap->ysz) != 2) {
    1.31 -					fprintf(stderr, "%s: invalid file format (dim)\n", __func__);
    1.32 +					fprintf(stderr, "%s: invalid file format (dim)\n", __FUNCTION__);
    1.33  					goto err;
    1.34  				}
    1.35  				break;
    1.36 @@ -379,7 +379,7 @@
    1.37  					char *endp;
    1.38  					max_pixval = strtol(line, &endp, 10);
    1.39  					if(endp == line) {
    1.40 -						fprintf(stderr, "%s: invalid file format (maxval)\n", __func__);
    1.41 +						fprintf(stderr, "%s: invalid file format (maxval)\n", __FUNCTION__);
    1.42  						goto err;
    1.43  					}
    1.44  				}
    1.45 @@ -442,7 +442,7 @@
    1.46  	int res;
    1.47  
    1.48  	if(!(fp = fopen(fname, "wb"))) {
    1.49 -		fprintf(stderr, "%s: failed to open file: %s: %s\n", __func__, fname, strerror(errno));
    1.50 +		fprintf(stderr, "%s: failed to open file: %s: %s\n", __FUNCTION__, fname, strerror(errno));
    1.51  		return -1;
    1.52  	}
    1.53  	res = dtx_save_glyphmap_stream(fp, gmap);