summaryrefslogtreecommitdiff
path: root/framebuffer/font_freetype.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
committerVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
commitc105738fa36bb2400adc47399c5b878d252d1c86 (patch)
tree138eeb449e1bf51ee1726b5f820740aada0ccd0b /framebuffer/font_freetype.c
parent20f2c86a511f7913cf858e7bd3668b0b59663ba0 (diff)
downloadnetsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.gz
netsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.bz2
Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all callsites to have double bracketing and allows for future improvement on how we use the logging macros. The callsites were changed with coccinelle and the changes checked by hand. Compile tested for several frontends but not all. A formatting annotation has also been added which allows the compiler to check the parameters and types passed to the logging.
Diffstat (limited to 'framebuffer/font_freetype.c')
-rw-r--r--framebuffer/font_freetype.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/framebuffer/font_freetype.c b/framebuffer/font_freetype.c
index c5a18da50..ec3ceab52 100644
--- a/framebuffer/font_freetype.c
+++ b/framebuffer/font_freetype.c
@@ -83,12 +83,12 @@ static FT_Error ft_face_requester(FTC_FaceID face_id, FT_Library library, FT_Po
error = FT_New_Face(library, fb_face->fontfile, fb_face->index, face);
if (error) {
- LOG(("Could not find font (code %d)", error));
+ LOG("Could not find font (code %d)", error);
} else {
error = FT_Select_Charmap(*face, FT_ENCODING_UNICODE);
if (error) {
- LOG(("Could not select charmap (code %d)", error));
+ LOG("Could not select charmap (code %d)", error);
} else {
for (cidx = 0; cidx < (*face)->num_charmaps; cidx++) {
if ((*face)->charmap == (*face)->charmaps[cidx]) {
@@ -98,7 +98,7 @@ static FT_Error ft_face_requester(FTC_FaceID face_id, FT_Library library, FT_Po
}
}
}
- LOG(("Loaded face from %s", fb_face->fontfile));
+ LOG("Loaded face from %s", fb_face->fontfile);
return error;
}
@@ -123,7 +123,7 @@ fb_new_face(const char *option, const char *resname, const char *fontname)
error = FTC_Manager_LookupFace(ft_cmanager, (FTC_FaceID)newf, &aface);
if (error) {
- LOG(("Could not find font face %s (code %d)", fontname, error));
+ LOG("Could not find font face %s (code %d)", fontname, error);
free(newf->fontfile);
free(newf);
newf = NULL;
@@ -143,7 +143,7 @@ bool fb_font_init(void)
/* freetype library initialise */
error = FT_Init_FreeType( &library );
if (error) {
- LOG(("Freetype could not initialised (code %d)", error));
+ LOG("Freetype could not initialised (code %d)", error);
return false;
}
@@ -163,7 +163,7 @@ bool fb_font_init(void)
NULL,
&ft_cmanager);
if (error) {
- LOG(("Freetype could not initialise cache manager (code %d)", error));
+ LOG("Freetype could not initialise cache manager (code %d)", error);
FT_Done_FreeType(library);
return false;
}
@@ -180,7 +180,7 @@ bool fb_font_init(void)
NETSURF_FB_FONT_SANS_SERIF);
if (fb_face == NULL) {
/* The sans serif font is the default and must be found. */
- LOG(("Could not find the default font"));
+ LOG("Could not find the default font");
FTC_Manager_Done(ft_cmanager);
FT_Done_FreeType(library);
return false;