summaryrefslogtreecommitdiff
path: root/atari/plot
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 /atari/plot
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 'atari/plot')
-rw-r--r--atari/plot/font_freetype.c16
-rw-r--r--atari/plot/font_internal.c2
-rw-r--r--atari/plot/font_vdi.c2
-rw-r--r--atari/plot/plot.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/atari/plot/font_freetype.c b/atari/plot/font_freetype.c
index 086008dd7..a77aff855 100644
--- a/atari/plot/font_freetype.c
+++ b/atari/plot/font_freetype.c
@@ -154,11 +154,11 @@ static FT_Error ft_face_requester(FTC_FaceID face_id, FT_Library library, FT_Po
error = FT_New_Face(library, ft_face->fontfile, ft_face->index, face);
if (error) {
- LOG(("Could not find font (code %d)\n", error));
+ LOG("Could not find font (code %d)\n", error);
} else {
error = FT_Select_Charmap(*face, FT_ENCODING_UNICODE);
if (error) {
- LOG(("Could not select charmap (code %d)\n", error));
+ LOG("Could not select charmap (code %d)\n", error);
} else {
for (cidx = 0; cidx < (*face)->num_charmaps; cidx++) {
if ((*face)->charmap == (*face)->charmaps[cidx]) {
@@ -168,7 +168,7 @@ static FT_Error ft_face_requester(FTC_FaceID face_id, FT_Library library, FT_Po
}
}
}
- LOG(("Loaded face from %s\n", ft_face->fontfile));
+ LOG("Loaded face from %s\n", ft_face->fontfile);
return error;
}
@@ -190,7 +190,7 @@ ft_new_face(const char *option, const char *resname, const char *fontfile)
}
error = FTC_Manager_LookupFace(ft_cmanager, (FTC_FaceID)newf, &aface);
if (error) {
- LOG(("Could not find font face %s (code %d)\n", fontfile, error));
+ LOG("Could not find font face %s (code %d)\n", fontfile, error);
free(newf);
newf = font_faces[FONT_FACE_DEFAULT]; /* use default */
}
@@ -291,7 +291,7 @@ static bool ft_font_init(void)
/* freetype library initialise */
error = FT_Init_FreeType( &library );
if (error) {
- LOG(("Freetype could not initialised (code %d)\n", error));
+ LOG("Freetype could not initialised (code %d)\n", error);
return false;
}
@@ -310,7 +310,7 @@ static bool ft_font_init(void)
NULL,
&ft_cmanager);
if (error) {
- LOG(("Freetype could not initialise cache manager (code %d)\n", error));
+ LOG("Freetype could not initialise cache manager (code %d)\n", error);
FT_Done_FreeType(library);
return false;
}
@@ -329,7 +329,7 @@ static bool ft_font_init(void)
FONT_PKG_PATH FONT_FILE_SANS
);
if (font_faces[FONT_FACE_SANS_SERIF] == NULL) {
- LOG(("Could not find default font (code %d)\n", error));
+ LOG("Could not find default font (code %d)\n", error);
FTC_Manager_Done(ft_cmanager);
FT_Done_FreeType(library);
return false;
@@ -687,7 +687,7 @@ int ctor_font_plotter_freetype( FONT_PLOTTER self )
self->draw_glyph = draw_glyph8;
}
- LOG(("%s: %s\n", (char*)__FILE__, __FUNCTION__));
+ LOG("%s: %s\n", (char *)__FILE__, __FUNCTION__);
if( !init ) {
ft_font_init();
fontbmp = atari_bitmap_create(48, 48, 0);
diff --git a/atari/plot/font_internal.c b/atari/plot/font_internal.c
index 66413f49c..1578b39d6 100644
--- a/atari/plot/font_internal.c
+++ b/atari/plot/font_internal.c
@@ -95,7 +95,7 @@ int ctor_font_plotter_internal( FONT_PLOTTER self )
self->str_split = str_split;
self->pixel_pos = pixel_pos;
self->text = text;
- LOG(("%s: %s\n", (char*)__FILE__, __FUNCTION__));
+ LOG("%s: %s\n", (char *)__FILE__, __FUNCTION__);
if( !init ) {
vdih = self->vdi_handle;
fontbmp = atari_bitmap_create(48, 48, 0);
diff --git a/atari/plot/font_vdi.c b/atari/plot/font_vdi.c
index 7c186107a..ef5499207 100644
--- a/atari/plot/font_vdi.c
+++ b/atari/plot/font_vdi.c
@@ -70,7 +70,7 @@ int ctor_font_plotter_vdi( FONT_PLOTTER self )
self->str_split = str_split;
self->pixel_pos = pixel_pos;
self->text = text;
- LOG(("%s: %s\n", (char*)__FILE__, __FUNCTION__));
+ LOG("%s: %s\n", (char *)__FILE__, __FUNCTION__);
if( !init ) {
vdih = self->vdi_handle;
}
diff --git a/atari/plot/plot.c b/atari/plot/plot.c
index ac998a4d5..1ac3ee973 100644
--- a/atari/plot/plot.c
+++ b/atari/plot/plot.c
@@ -1542,7 +1542,7 @@ int plot_init(char * fdrvrname)
short work_out[57];
atari_plot_vdi_handle=graf_handle(&dummy, &dummy, &dummy, &dummy);
v_opnvwk(work_in, &atari_plot_vdi_handle, work_out);
- LOG(("Plot VDI handle: %d", atari_plot_vdi_handle));
+ LOG("Plot VDI handle: %d", atari_plot_vdi_handle);
}
read_vdi_sysinfo(atari_plot_vdi_handle, &vdi_sysinfo);
if(verbose_log) {