diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-05-28 16:08:46 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-05-28 16:08:46 +0100 |
commit | c105738fa36bb2400adc47399c5b878d252d1c86 (patch) | |
tree | 138eeb449e1bf51ee1726b5f820740aada0ccd0b /amiga/font_scan.c | |
parent | 20f2c86a511f7913cf858e7bd3668b0b59663ba0 (diff) | |
download | netsurf-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 'amiga/font_scan.c')
-rw-r--r-- | amiga/font_scan.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/amiga/font_scan.c b/amiga/font_scan.c index 95eacaadb..930a15020 100644 --- a/amiga/font_scan.c +++ b/amiga/font_scan.c @@ -254,7 +254,7 @@ 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)); + if(unicoderanges & UCR_SURROGATES) LOG("%s supports UTF-16 surrogates", fontname); EReleaseInfo(AMI_OFONT_ENGINE, OT_UnicodeRanges, unicoderanges, TAG_END); @@ -287,10 +287,10 @@ 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)); + LOG("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)); + LOG("Found %ld new glyphs (total = %ld)", found, total); font_num++; } while((node = nnode)); @@ -339,7 +339,7 @@ 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)); + LOG("Added %s", af[i].af_Attr.ta_Name); } } } @@ -377,7 +377,7 @@ 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)); + LOG("Loading font glyph cache from %s", filename); while(FGets(fh, (STRPTR)&buffer, 256) != 0) { @@ -418,7 +418,7 @@ 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)); + LOG("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"); @@ -498,7 +498,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)); + LOG("Found %ld fonts", entries); win = ami_font_scan_gui_open(entries); found = ami_font_scan_fonts(list, win, glypharray); @@ -511,6 +511,6 @@ void ami_font_scan_init(const char *filename, bool force_scan, bool save, } } - LOG(("Initialised with %ld glyphs", found)); + LOG("Initialised with %ld glyphs", found); } |