summaryrefslogtreecommitdiff
path: root/frontends/atari/plot
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-09-06 18:28:12 +0100
committerVincent Sanders <vince@kyllikki.org>2017-09-06 18:45:27 +0100
commit75018632a9b953aafeae6f4e8aea607fd1d89dca (patch)
treed661d2fded2ad4b80c4cf019dee2954c052ab090 /frontends/atari/plot
parent8d9b2efc11529da8cb5870b39ff15249c648b10a (diff)
downloadnetsurf-75018632a9b953aafeae6f4e8aea607fd1d89dca.tar.gz
netsurf-75018632a9b953aafeae6f4e8aea607fd1d89dca.tar.bz2
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done @@ expression E; @@ -LOG(E); +NSLOG(netsurf, INFO, E); @@ expression E, E1; @@ -LOG(E, E1); +NSLOG(netsurf, INFO, E, E1); @@ expression E, E1, E2; @@ -LOG(E, E1, E2); +NSLOG(netsurf, INFO, E, E1, E2); @@ expression E, E1, E2, E3; @@ -LOG(E, E1, E2, E3); +NSLOG(netsurf, INFO, E, E1, E2, E3); @@ expression E, E1, E2, E3, E4; @@ -LOG(E, E1, E2, E3, E4); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4); @@ expression E, E1, E2, E3, E4, E5; @@ -LOG(E, E1, E2, E3, E4, E5); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5); @@ expression E, E1, E2, E3, E4, E5, E6; @@ -LOG(E, E1, E2, E3, E4, E5, E6); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6); @@ expression E, E1, E2, E3, E4, E5, E6, E7; @@ -LOG(E, E1, E2, E3, E4, E5, E6, E7); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
Diffstat (limited to 'frontends/atari/plot')
-rw-r--r--frontends/atari/plot/font_freetype.c23
-rw-r--r--frontends/atari/plot/font_internal.c2
-rw-r--r--frontends/atari/plot/font_vdi.c2
-rw-r--r--frontends/atari/plot/plot.c5
4 files changed, 20 insertions, 12 deletions
diff --git a/frontends/atari/plot/font_freetype.c b/frontends/atari/plot/font_freetype.c
index 17d3c3bfd..1688e978b 100644
--- a/frontends/atari/plot/font_freetype.c
+++ b/frontends/atari/plot/font_freetype.c
@@ -154,11 +154,12 @@ 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);
+ NSLOG(netsurf, INFO, "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);
+ NSLOG(netsurf, INFO,
+ "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 +169,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);
+ NSLOG(netsurf, INFO, "Loaded face from %s\n", ft_face->fontfile);
return error;
}
@@ -190,7 +191,9 @@ 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);
+ NSLOG(netsurf, INFO,
+ "Could not find font face %s (code %d)\n", fontfile,
+ error);
free(newf);
newf = font_faces[FONT_FACE_DEFAULT]; /* use default */
}
@@ -292,7 +295,8 @@ 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);
+ NSLOG(netsurf, INFO,
+ "Freetype could not initialised (code %d)\n", error);
return false;
}
@@ -311,7 +315,9 @@ static bool ft_font_init(void)
NULL,
&ft_cmanager);
if (error) {
- LOG("Freetype could not initialise cache manager (code %d)\n", error);
+ NSLOG(netsurf, INFO,
+ "Freetype could not initialise cache manager (code %d)\n",
+ error);
FT_Done_FreeType(library);
return false;
}
@@ -330,7 +336,8 @@ 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);
+ NSLOG(netsurf, INFO,
+ "Could not find default font (code %d)\n", error);
FTC_Manager_Done(ft_cmanager);
FT_Done_FreeType(library);
return false;
@@ -688,7 +695,7 @@ int ctor_font_plotter_freetype( FONT_PLOTTER self )
self->draw_glyph = draw_glyph8;
}
- LOG("%s: %s\n", (char *)__FILE__, __FUNCTION__);
+ NSLOG(netsurf, INFO, "%s: %s\n", (char *)__FILE__, __FUNCTION__);
if( !init ) {
ft_font_init();
fontbmp = atari_bitmap_create(48, 48, 0);
diff --git a/frontends/atari/plot/font_internal.c b/frontends/atari/plot/font_internal.c
index 3575bc3e1..709697f74 100644
--- a/frontends/atari/plot/font_internal.c
+++ b/frontends/atari/plot/font_internal.c
@@ -96,7 +96,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__);
+ NSLOG(netsurf, INFO, "%s: %s\n", (char *)__FILE__, __FUNCTION__);
if( !init ) {
vdih = self->vdi_handle;
fontbmp = atari_bitmap_create(48, 48, 0);
diff --git a/frontends/atari/plot/font_vdi.c b/frontends/atari/plot/font_vdi.c
index ef5499207..7cd82ddc9 100644
--- a/frontends/atari/plot/font_vdi.c
+++ b/frontends/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__);
+ NSLOG(netsurf, INFO, "%s: %s\n", (char *)__FILE__, __FUNCTION__);
if( !init ) {
vdih = self->vdi_handle;
}
diff --git a/frontends/atari/plot/plot.c b/frontends/atari/plot/plot.c
index 2324f82d9..14c670352 100644
--- a/frontends/atari/plot/plot.c
+++ b/frontends/atari/plot/plot.c
@@ -1628,7 +1628,7 @@ int plot_init(const struct redraw_context *ctx, 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);
+ NSLOG(netsurf, INFO, "Plot VDI handle: %d", atari_plot_vdi_handle);
}
read_vdi_sysinfo(atari_plot_vdi_handle, &vdi_sysinfo);
if(verbose_log) {
@@ -1640,7 +1640,8 @@ int plot_init(const struct redraw_context *ctx, char *fdrvrname)
atari_font_flags, &err);
if (err) {
const char * desc = plot_err_str(err);
- LOG("Unable to load font plotter %s -> %s", fdrvrname, desc );
+ NSLOG(netsurf, INFO, "Unable to load font plotter %s -> %s",
+ fdrvrname, desc);
die("font plotter");
}