diff options
author | Vincent Sanders <vince@kyllikki.org> | 2017-09-06 18:28:12 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2017-09-06 18:45:27 +0100 |
commit | 75018632a9b953aafeae6f4e8aea607fd1d89dca (patch) | |
tree | d661d2fded2ad4b80c4cf019dee2954c052ab090 /frontends/amiga/font_scan.c | |
parent | 8d9b2efc11529da8cb5870b39ff15249c648b10a (diff) | |
download | netsurf-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/amiga/font_scan.c')
-rw-r--r-- | frontends/amiga/font_scan.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/frontends/amiga/font_scan.c b/frontends/amiga/font_scan.c index 932179e3e..cb37f97fa 100644 --- a/frontends/amiga/font_scan.c +++ b/frontends/amiga/font_scan.c @@ -255,7 +255,8 @@ static ULONG ami_font_scan_font(const char *fontname, lwc_string **glypharray) #ifdef __amigaos4__ if(EObtainInfo(AMI_OFONT_ENGINE, OT_UnicodeRanges, &unicoderanges, TAG_END) == 0) { if(unicoderanges & UCR_SURROGATES) { - LOG("%s supports UTF-16 surrogates", fontname); + NSLOG(netsurf, INFO, "%s supports UTF-16 surrogates", + fontname); if (nsoption_charp(font_surrogate) == NULL) { nsoption_set_charp(font_surrogate, (char *)strdup(fontname)); } @@ -292,10 +293,11 @@ static ULONG ami_font_scan_fonts(struct MinList *list, do { nnode = (struct nsObject *)GetSucc((struct Node *)node); ami_font_scan_gui_update(win, node->dtz_Node.ln_Name, font_num, total); - LOG("Scanning %s", node->dtz_Node.ln_Name); + NSLOG(netsurf, INFO, "Scanning %s", node->dtz_Node.ln_Name); found = ami_font_scan_font(node->dtz_Node.ln_Name, glypharray); total += found; - LOG("Found %ld new glyphs (total = %ld)", found, total); + NSLOG(netsurf, INFO, "Found %ld new glyphs (total = %ld)", + found, total); font_num++; } while((node = nnode)); @@ -344,7 +346,9 @@ static ULONG ami_font_scan_list(struct MinList *list) if(node) { node->dtz_Node.ln_Name = strdup(af[i].af_Attr.ta_Name); found++; - LOG("Added %s", af[i].af_Attr.ta_Name); + NSLOG(netsurf, INFO, + "Added %s", + af[i].af_Attr.ta_Name); } } } @@ -382,7 +386,8 @@ static ULONG ami_font_scan_load(const char *filename, lwc_string **glypharray) rargs = AllocDosObjectTags(DOS_RDARGS, TAG_DONE); if((fh = FOpen(filename, MODE_OLDFILE, 0))) { - LOG("Loading font glyph cache from %s", filename); + NSLOG(netsurf, INFO, "Loading font glyph cache from %s", + filename); while(FGets(fh, (STRPTR)&buffer, 256) != 0) { @@ -423,7 +428,8 @@ void ami_font_scan_save(const char *filename, lwc_string **glypharray) BPTR fh = 0; if((fh = FOpen(filename, MODE_NEWFILE, 0))) { - LOG("Writing font glyph cache to %s", filename); + NSLOG(netsurf, INFO, "Writing font glyph cache to %s", + filename); FPrintf(fh, "; This file is auto-generated. To re-create the cache, delete this file.\n"); FPrintf(fh, "; This file is parsed using ReadArgs() with the following template:\n"); FPrintf(fh, "; CODE/A,FONT/A\n;\n"); @@ -482,7 +488,7 @@ void ami_font_scan_init(const char *filename, bool force_scan, bool save, found = ami_font_scan_load(filename, glypharray); if(found == 0) { - LOG("Creating new font glyph cache"); + NSLOG(netsurf, INFO, "Creating new font glyph cache"); if((list = NewObjList())) { /* add preferred fonts list */ @@ -504,7 +510,7 @@ void ami_font_scan_init(const char *filename, bool force_scan, bool save, if(nsoption_bool(font_unicode_only) == false) entries += ami_font_scan_list(list); - LOG("Found %ld fonts", entries); + NSLOG(netsurf, INFO, "Found %ld fonts", entries); win = ami_font_scan_gui_open(entries); found = ami_font_scan_fonts(list, win, glypharray); @@ -517,6 +523,6 @@ void ami_font_scan_init(const char *filename, bool force_scan, bool save, } } - LOG("Initialised with %ld glyphs", found); + NSLOG(netsurf, INFO, "Initialised with %ld glyphs", found); } |