diff options
author | 2004-08-28 20:53:01 +0000 | |
---|---|---|
committer | 2004-08-28 20:53:01 +0000 | |
commit | 0eb98079d5d5b67826298ccc3f529d2518585883 (patch) | |
tree | 07ab9fea3a324210c0996fbb5a581513274a638a /TOOLS/subfont-c/subfont.c | |
parent | 520f3f4093629d0dd902c276f1bf604333bd1331 (diff) |
fix overcomplicated macros and a few warnings
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13187 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'TOOLS/subfont-c/subfont.c')
-rw-r--r-- | TOOLS/subfont-c/subfont.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/TOOLS/subfont-c/subfont.c b/TOOLS/subfont-c/subfont.c index 70619280a3..0ac14ba6cb 100644 --- a/TOOLS/subfont-c/subfont.c +++ b/TOOLS/subfont-c/subfont.c @@ -74,12 +74,9 @@ iconv_t cd; // iconv conversion descriptor -#define eprintf(...) fprintf(stderr, __VA_ARGS__) -#define ERROR_(msg, ...) (eprintf("%s: error: " msg "\n", command, __VA_ARGS__), exit(1)) -#define WARNING_(msg, ...) eprintf("%s: warning: " msg "\n", command, __VA_ARGS__) -#define ERROR(...) ERROR_(__VA_ARGS__, NULL) -#define WARNING(...) WARNING_(__VA_ARGS__, NULL) - +#define eprintf(...) fprintf(stderr, ##__VA_ARGS__) +#define ERROR(msg, ...) eprintf("%s: error: " msg "\n", command, ##__VA_ARGS__),exit(1) +#define WARNING(msg, ...) eprintf("%s: warning: " msg "\n", command, ##__VA_ARGS__) #define f266ToInt(x) (((x)+32)>>6) // round fractional fixed point number to integer // coordinates are in 26.6 pixels (i.e. 1/64th of pixels) @@ -304,7 +301,7 @@ void render() { glyph_index = FT_Get_Char_Index(face, uni_charmap ? character:code); if (glyph_index==0) { WARNING("Glyph for char 0x%02lx|U+%04lX|%c not found.", code, character, - code<' '||code>255 ? '.':code); + code<' '||code>255 ? '.':(char)code); continue; } } @@ -368,7 +365,7 @@ void render() { fprintf(f, "0x%04lx %i %i;\tU+%04lX|%c\n", unicode_desc ? character:code, pen_x, // bitmap start pen_xa-1, // bitmap end - character, code<' '||code>255 ? '.':code); + character, code<' '||code>255 ? '.':(char)code); #endif pen_x = ALIGN(pen_xa); } |