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 | |
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')
27 files changed, 235 insertions, 155 deletions
diff --git a/frontends/amiga/arexx.c b/frontends/amiga/arexx.c index 7bb2f5882..9484ee92b 100644 --- a/frontends/amiga/arexx.c +++ b/frontends/amiga/arexx.c @@ -173,7 +173,7 @@ void ami_arexx_execute(char *script) if((lock = Lock(script, ACCESS_READ))) { DevNameFromLock(lock, full_script_path, 1024, DN_FULLPATH); - LOG("Executing script: %s", full_script_path); + NSLOG(netsurf, INFO, "Executing script: %s", full_script_path); ami_arexx_command(full_script_path, NULL); UnLock(lock); } diff --git a/frontends/amiga/bitmap.c b/frontends/amiga/bitmap.c index 533b416fa..757b55965 100644 --- a/frontends/amiga/bitmap.c +++ b/frontends/amiga/bitmap.c @@ -161,7 +161,10 @@ static void amiga_bitmap_unmap_buffer(void *p) struct bitmap *bm = p; if((nsoption_bool(use_extmem) == true) && (bm->pixdata != NULL)) { - LOG("Unmapping ExtMem object %p for bitmap %p", bm->iextmem, bm); + NSLOG(netsurf, INFO, + "Unmapping ExtMem object %p for bitmap %p", + bm->iextmem, + bm); bm->iextmem->Unmap(bm->pixdata, bm->size); bm->pixdata = NULL; } @@ -176,7 +179,10 @@ unsigned char *amiga_bitmap_get_buffer(void *bitmap) #ifdef __amigaos4__ if(nsoption_bool(use_extmem) == true) { if(bm->pixdata == NULL) { - LOG("Mapping ExtMem object %p for bitmap %p", bm->iextmem, bm); + NSLOG(netsurf, INFO, + "Mapping ExtMem object %p for bitmap %p", + bm->iextmem, + bm); bm->pixdata = bm->iextmem->Map(NULL, bm->size, 0LL, 0); } @@ -723,7 +729,7 @@ void ami_bitmap_fini(void) static nserror bitmap_render(struct bitmap *bitmap, struct hlcache_handle *content) { #ifdef __amigaos4__ - LOG("Entering bitmap_render"); + NSLOG(netsurf, INFO, "Entering bitmap_render"); int plot_width; int plot_height; diff --git a/frontends/amiga/cookies.c b/frontends/amiga/cookies.c index fd71a9c2a..45e883fde 100644 --- a/frontends/amiga/cookies.c +++ b/frontends/amiga/cookies.c @@ -364,7 +364,7 @@ nserror ami_cookies_present(void) res = ami_cookies_create_window(ncwin); if (res != NSERROR_OK) { - LOG("SSL UI builder init failed"); + NSLOG(netsurf, INFO, "SSL UI builder init failed"); ami_utf8_free(ncwin->core.wintitle); free(ncwin); return res; diff --git a/frontends/amiga/corewindow.c b/frontends/amiga/corewindow.c index 1a94dd3b2..243146a3a 100644 --- a/frontends/amiga/corewindow.c +++ b/frontends/amiga/corewindow.c @@ -315,7 +315,7 @@ static void ami_cw_redraw_queue(struct ami_corewindow *ami_cw, bool draw) if(IsMinListEmpty(ami_cw->deferred_rects)) return; if(draw == false) { - LOG("Ignoring deferred box redraw queue"); + NSLOG(netsurf, INFO, "Ignoring deferred box redraw queue"); } // else should probably show busy pointer node = (struct nsObject *)GetHead((struct List *)ami_cw->deferred_rects); @@ -378,7 +378,8 @@ ami_cw_redraw(struct ami_corewindow *ami_cw, const struct rect *restrict r) nsobj = AddObject(ami_cw->deferred_rects, AMINS_RECT); nsobj->objstruct = deferred_rect; } else { - LOG("Ignoring duplicate or subset of queued box redraw"); + NSLOG(netsurf, INFO, + "Ignoring duplicate or subset of queued box redraw"); } ami_schedule(1, ami_cw_redraw_cb, ami_cw); } diff --git a/frontends/amiga/drag.c b/frontends/amiga/drag.c index a8d3aa9f9..ec0ee3c6a 100644 --- a/frontends/amiga/drag.c +++ b/frontends/amiga/drag.c @@ -188,7 +188,8 @@ void ami_drag_save(struct Window *win) break; default: - LOG("Unsupported drag save operation %d", drag_save); + NSLOG(netsurf, INFO, + "Unsupported drag save operation %d", drag_save); break; } diff --git a/frontends/amiga/dt_anim.c b/frontends/amiga/dt_anim.c index 2493c41ee..bd049206c 100644 --- a/frontends/amiga/dt_anim.c +++ b/frontends/amiga/dt_anim.c @@ -162,7 +162,7 @@ nserror amiga_dt_anim_create(const content_handler *handler, bool amiga_dt_anim_convert(struct content *c) { - LOG("amiga_dt_anim_convert"); + NSLOG(netsurf, INFO, "amiga_dt_anim_convert"); amiga_dt_anim_content *plugin = (amiga_dt_anim_content *) c; union content_msg_data msg_data; @@ -246,7 +246,7 @@ void amiga_dt_anim_destroy(struct content *c) { amiga_dt_anim_content *plugin = (amiga_dt_anim_content *) c; - LOG("amiga_dt_anim_destroy"); + NSLOG(netsurf, INFO, "amiga_dt_anim_destroy"); if (plugin->bitmap != NULL) amiga_bitmap_destroy(plugin->bitmap); @@ -263,7 +263,7 @@ bool amiga_dt_anim_redraw(struct content *c, amiga_dt_anim_content *plugin = (amiga_dt_anim_content *) c; bitmap_flags_t flags = BITMAPF_NONE; - LOG("amiga_dt_anim_redraw"); + NSLOG(netsurf, INFO, "amiga_dt_anim_redraw"); if (data->repeat_x) flags |= BITMAPF_REPEAT_X; @@ -290,20 +290,20 @@ bool amiga_dt_anim_redraw(struct content *c, void amiga_dt_anim_open(struct content *c, struct browser_window *bw, struct content *page, struct object_params *params) { - LOG("amiga_dt_anim_open"); + NSLOG(netsurf, INFO, "amiga_dt_anim_open"); return; } void amiga_dt_anim_close(struct content *c) { - LOG("amiga_dt_anim_close"); + NSLOG(netsurf, INFO, "amiga_dt_anim_close"); return; } void amiga_dt_anim_reformat(struct content *c, int width, int height) { - LOG("amiga_dt_anim_reformat"); + NSLOG(netsurf, INFO, "amiga_dt_anim_reformat"); return; } @@ -312,7 +312,7 @@ nserror amiga_dt_anim_clone(const struct content *old, struct content **newc) amiga_dt_anim_content *plugin; nserror error; - LOG("amiga_dt_anim_clone"); + NSLOG(netsurf, INFO, "amiga_dt_anim_clone"); plugin = calloc(1, sizeof(amiga_dt_anim_content)); if (plugin == NULL) diff --git a/frontends/amiga/dt_picture.c b/frontends/amiga/dt_picture.c index 73f6c47c1..88ce1c834 100644 --- a/frontends/amiga/dt_picture.c +++ b/frontends/amiga/dt_picture.c @@ -174,7 +174,7 @@ static char *amiga_dt_picture_datatype(struct content *c) static struct bitmap *amiga_dt_picture_cache_convert(struct content *c) { - LOG("amiga_dt_picture_cache_convert"); + NSLOG(netsurf, INFO, "amiga_dt_picture_cache_convert"); union content_msg_data msg_data; UBYTE *bm_buffer; @@ -210,7 +210,7 @@ static struct bitmap *amiga_dt_picture_cache_convert(struct content *c) bool amiga_dt_picture_convert(struct content *c) { - LOG("amiga_dt_picture_convert"); + NSLOG(netsurf, INFO, "amiga_dt_picture_convert"); int width, height; char *title; @@ -256,7 +256,7 @@ nserror amiga_dt_picture_clone(const struct content *old, struct content **newc) struct content *adt; nserror error; - LOG("amiga_dt_picture_clone"); + NSLOG(netsurf, INFO, "amiga_dt_picture_clone"); adt = calloc(1, sizeof(struct content)); if (adt == NULL) diff --git a/frontends/amiga/dt_sound.c b/frontends/amiga/dt_sound.c index eda60edc1..e0f48da83 100644 --- a/frontends/amiga/dt_sound.c +++ b/frontends/amiga/dt_sound.c @@ -76,7 +76,7 @@ static const content_handler amiga_dt_sound_content_handler = { static void amiga_dt_sound_play(Object *dto) { - LOG("Playing..."); + NSLOG(netsurf, INFO, "Playing..."); IDoMethod(dto, DTM_TRIGGER, NULL, STM_PLAY, NULL); } @@ -126,7 +126,7 @@ nserror amiga_dt_sound_create(const content_handler *handler, amiga_dt_sound_content *plugin; nserror error; - LOG("amiga_dt_sound_create"); + NSLOG(netsurf, INFO, "amiga_dt_sound_create"); plugin = calloc(1, sizeof(amiga_dt_sound_content)); if (plugin == NULL) @@ -146,7 +146,7 @@ nserror amiga_dt_sound_create(const content_handler *handler, bool amiga_dt_sound_convert(struct content *c) { - LOG("amiga_dt_sound_convert"); + NSLOG(netsurf, INFO, "amiga_dt_sound_convert"); amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c; int width = 50, height = 50; @@ -180,7 +180,7 @@ void amiga_dt_sound_destroy(struct content *c) { amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c; - LOG("amiga_dt_sound_destroy"); + NSLOG(netsurf, INFO, "amiga_dt_sound_destroy"); DisposeDTObject(plugin->dto); @@ -199,7 +199,7 @@ bool amiga_dt_sound_redraw(struct content *c, }; struct rect rect; - LOG("amiga_dt_sound_redraw"); + NSLOG(netsurf, INFO, "amiga_dt_sound_redraw"); rect.x0 = data->x; rect.y0 = data->y; @@ -226,7 +226,7 @@ void amiga_dt_sound_open(struct content *c, struct browser_window *bw, amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c; struct object_param *param; - LOG("amiga_dt_sound_open"); + NSLOG(netsurf, INFO, "amiga_dt_sound_open"); plugin->immediate = false; @@ -234,7 +234,8 @@ void amiga_dt_sound_open(struct content *c, struct browser_window *bw, { do { - LOG("%s = %s", param->name, param->value); + NSLOG(netsurf, INFO, "%s = %s", param->name, + param->value); if((strcmp(param->name, "autoplay") == 0) && (strcmp(param->value, "true") == 0)) plugin->immediate = true; if((strcmp(param->name, "autoStart") == 0) && @@ -255,7 +256,7 @@ nserror amiga_dt_sound_clone(const struct content *old, struct content **newc) amiga_dt_sound_content *plugin; nserror error; - LOG("amiga_dt_sound_clone"); + NSLOG(netsurf, INFO, "amiga_dt_sound_clone"); plugin = calloc(1, sizeof(amiga_dt_sound_content)); if (plugin == NULL) diff --git a/frontends/amiga/filetype.c b/frontends/amiga/filetype.c index a0449d848..0e535de07 100644 --- a/frontends/amiga/filetype.c +++ b/frontends/amiga/filetype.c @@ -185,7 +185,7 @@ nserror ami_mime_init(const char *mimefile) struct nsObject *node; struct ami_mime_entry *mimeentry; - LOG("mimetypes file: %s", mimefile); + NSLOG(netsurf, INFO, "mimetypes file: %s", mimefile); if(ami_mime_list == NULL) ami_mime_list = NewObjList(); @@ -642,6 +642,10 @@ void ami_mime_dump(void) struct ami_mime_entry *mimeentry; while((mimeentry = ami_mime_entry_locate(NULL, AMI_MIME_MIMETYPE, &node))) { - LOG("%s DT=\"%s\" TYPE=\"%s\" CMD=\"%s\"", mimeentry->mimetype ? lwc_string_data(mimeentry->mimetype) : "", mimeentry->datatype ? lwc_string_data(mimeentry->datatype) : "", mimeentry->filetype ? lwc_string_data(mimeentry->filetype) : "", mimeentry->plugincmd ? lwc_string_data(mimeentry->plugincmd) : ""); + NSLOG(netsurf, INFO, "%s DT=\"%s\" TYPE=\"%s\" CMD=\"%s\"", + mimeentry->mimetype ? lwc_string_data(mimeentry->mimetype) : "", + mimeentry->datatype ? lwc_string_data(mimeentry->datatype) : "", + mimeentry->filetype ? lwc_string_data(mimeentry->filetype) : "", + mimeentry->plugincmd ? lwc_string_data(mimeentry->plugincmd) : ""); }; } diff --git a/frontends/amiga/font.c b/frontends/amiga/font.c index 22a0f4a4a..63172623f 100644 --- a/frontends/amiga/font.c +++ b/frontends/amiga/font.c @@ -51,7 +51,8 @@ void ami_font_setdevicedpi(int id) struct DisplayInfo dinfo; if(nsoption_bool(bitmap_fonts) == true) { - LOG("WARNING: Using diskfont.library for text. Forcing DPI to 72."); + NSLOG(netsurf, INFO, + "WARNING: Using diskfont.library for text. Forcing DPI to 72."); nsoption_set_int(screen_ydpi, 72); } @@ -79,7 +80,14 @@ void ami_font_setdevicedpi(int id) xdpi = (yres * ydpi) / xres; - LOG("XDPI = %ld, YDPI = %ld (DisplayInfo resolution %d x %d, corrected %d x %d)", xdpi, ydpi, dinfo.Resolution.x, dinfo.Resolution.y, xres, yres); + NSLOG(netsurf, INFO, + "XDPI = %ld, YDPI = %ld (DisplayInfo resolution %d x %d, corrected %d x %d)", + xdpi, + ydpi, + dinfo.Resolution.x, + dinfo.Resolution.y, + xres, + yres); } } } diff --git a/frontends/amiga/font_bullet.c b/frontends/amiga/font_bullet.c index fd41c29a2..c8ad34c04 100644 --- a/frontends/amiga/font_bullet.c +++ b/frontends/amiga/font_bullet.c @@ -361,7 +361,7 @@ static struct ami_font_cache_node *ami_font_open(const char *font, bool critical if(!nodedata->font) { - LOG("Requested font not found: %s", font); + NSLOG(netsurf, INFO, "Requested font not found: %s", font); if(critical == true) amiga_warn_user("CompError", font); free(nodedata); return NULL; @@ -369,21 +369,28 @@ static struct ami_font_cache_node *ami_font_open(const char *font, bool critical nodedata->bold = (char *)GetTagData(OT_BName, 0, nodedata->font->olf_OTagList); if(nodedata->bold) - LOG("Bold font defined for %s is %s", font, nodedata->bold); + NSLOG(netsurf, INFO, "Bold font defined for %s is %s", font, + nodedata->bold); else - LOG("Warning: No designed bold font defined for %s", font); + NSLOG(netsurf, INFO, + "Warning: No designed bold font defined for %s", font); nodedata->italic = (char *)GetTagData(OT_IName, 0, nodedata->font->olf_OTagList); if(nodedata->italic) - LOG("Italic font defined for %s is %s", font, nodedata->italic); + NSLOG(netsurf, INFO, "Italic font defined for %s is %s", + font, nodedata->italic); else - LOG("Warning: No designed italic font defined for %s", font); + NSLOG(netsurf, INFO, + "Warning: No designed italic font defined for %s", font); nodedata->bolditalic = (char *)GetTagData(OT_BIName, 0, nodedata->font->olf_OTagList); if(nodedata->bolditalic) - LOG("Bold-italic font defined for %s is %s", font, nodedata->bolditalic); + NSLOG(netsurf, INFO, "Bold-italic font defined for %s is %s", + font, nodedata->bolditalic); else - LOG("Warning: No designed bold-italic font defined for %s", font); + NSLOG(netsurf, INFO, + "Warning: No designed bold-italic font defined for %s", + font); ami_font_cache_insert(nodedata, font); return nodedata; diff --git a/frontends/amiga/font_cache.c b/frontends/amiga/font_cache.c index 3d8330979..86e2381c0 100644 --- a/frontends/amiga/font_cache.c +++ b/frontends/amiga/font_cache.c @@ -69,7 +69,10 @@ static void ami_font_cache_cleanup(struct SkipList *skiplist) SubTime(&curtime, &node->lastused); if(curtime.Seconds > 300) { - LOG("Freeing font %p not used for %ld seconds", node->skip_node.sn_Key, curtime.Seconds); + NSLOG(netsurf, INFO, + "Freeing font %p not used for %ld seconds", + node->skip_node.sn_Key, + curtime.Seconds); ami_font_bullet_close(node); RemoveSkipNode(skiplist, node->skip_node.sn_Key); } @@ -98,7 +101,10 @@ static void ami_font_cache_cleanup(struct MinList *ami_font_cache_list) SubTime(&curtime, &fnode->lastused); if(curtime.Seconds > 300) { - LOG("Freeing %s not used for %ld seconds", node->dtz_Node.ln_Name, curtime.Seconds); + NSLOG(netsurf, INFO, + "Freeing %s not used for %ld seconds", + node->dtz_Node.ln_Name, + curtime.Seconds); DelObject(node); } } while((node=nnode)); @@ -146,7 +152,7 @@ struct ami_font_cache_node *ami_font_cache_locate(const char *font) return nodedata; } - LOG("Font cache miss: %s (%lx)", font, hash); + NSLOG(netsurf, INFO, "Font cache miss: %s (%lx)", font, hash); return NULL; } @@ -180,7 +186,7 @@ void ami_font_cache_insert(struct ami_font_cache_node *nodedata, const char *fon void ami_font_cache_fini(void) { - LOG("Cleaning up font cache"); + NSLOG(netsurf, INFO, "Cleaning up font cache"); ami_schedule(-1, (void *)ami_font_cache_cleanup, ami_font_cache_list); #ifdef __amigaos4__ ami_font_cache_del_skiplist(ami_font_cache_list); diff --git a/frontends/amiga/font_diskfont.c b/frontends/amiga/font_diskfont.c index 7abc4379b..658829237 100644 --- a/frontends/amiga/font_diskfont.c +++ b/frontends/amiga/font_diskfont.c @@ -55,7 +55,7 @@ static struct TextFont *ami_font_bm_open(struct RastPort *rp, const plot_font_st (fstyle->size == prev_fstyle->size) && (fstyle->flags == prev_fstyle->flags) && (fstyle->weight == prev_fstyle->weight)) { - LOG("(using current font)"); + NSLOG(netsurf, INFO, "(using current font)"); return prev_font; } @@ -99,7 +99,7 @@ static struct TextFont *ami_font_bm_open(struct RastPort *rp, const plot_font_st snprintf(font, MAX_FONT_NAME_SIZE, "%s.font", fontname); tattr.ta_Name = font; tattr.ta_YSize = fstyle->size / FONT_SIZE_SCALE; - LOG("font: %s/%d", tattr.ta_Name, tattr.ta_YSize); + NSLOG(netsurf, INFO, "font: %s/%d", tattr.ta_Name, tattr.ta_YSize); if(prev_font != NULL) CloseFont(prev_font); 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); } diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c index 44bba2d90..387c2151c 100644 --- a/frontends/amiga/gui.c +++ b/frontends/amiga/gui.c @@ -342,7 +342,9 @@ bool ami_gui_map_filename(char **remapped, const char *restrict path, } if(found == false) *remapped = strdup(file); - else LOG("Remapped %s to %s in path %s using %s", file, *remapped, path, map); + else NSLOG(netsurf, INFO, + "Remapped %s to %s in path %s using %s", file, + *remapped, path, map); free(mapfile); @@ -365,7 +367,7 @@ static bool ami_gui_check_resource(char *fullpath, const char *file) found = true; } - if(found) LOG("Found %s", fullpath); + if(found) NSLOG(netsurf, INFO, "Found %s", fullpath); free(remapped); return found; @@ -842,7 +844,7 @@ static void ami_openscreen(void) } if(screen_signal == -1) screen_signal = AllocSignal(-1); - LOG("Screen signal %d", screen_signal); + NSLOG(netsurf, INFO, "Screen signal %d", screen_signal); scrn = OpenScreenTags(NULL, /**\todo specify screen depth */ SA_DisplayID, id, @@ -918,19 +920,22 @@ static struct RDArgs *ami_gui_commandline(int *restrict argc, char ** argv, if((args = ReadArgs(template, rarray, NULL))) { if(rarray[A_URL]) { - LOG("URL %s specified on command line", - (char *)rarray[A_URL]); + NSLOG(netsurf, INFO, + "URL %s specified on command line", + (char *)rarray[A_URL]); temp_homepage_url = strdup((char *)rarray[A_URL]); /**\todo allow IDNs */ } if(rarray[A_USERSDIR]) { - LOG("USERSDIR %s specified on command line", - (char *)rarray[A_USERSDIR]); + NSLOG(netsurf, INFO, + "USERSDIR %s specified on command line", + (char *)rarray[A_USERSDIR]); users_dir = ASPrintf("%s", rarray[A_USERSDIR]); } if(rarray[A_FORCE]) { - LOG("FORCE specified on command line"); + NSLOG(netsurf, INFO, + "FORCE specified on command line"); cli_force = true; } @@ -950,7 +955,7 @@ static struct RDArgs *ami_gui_commandline(int *restrict argc, char ** argv, */ } } else { - LOG("ReadArgs failed to parse command line"); + NSLOG(netsurf, INFO, "ReadArgs failed to parse command line"); } FreeArgs(args); @@ -2790,7 +2795,9 @@ static void ami_handle_applib(void) { struct ApplicationCustomMsg *applibcustmsg = (struct ApplicationCustomMsg *)applibmsg; - LOG("Ringhio BackMsg received: %s", applibcustmsg->customMsg); + NSLOG(netsurf, INFO, + "Ringhio BackMsg received: %s", + applibcustmsg->customMsg); ami_download_parse_backmsg(applibcustmsg->customMsg); } @@ -2826,7 +2833,7 @@ void ami_get_msg(void) NULL, (unsigned int *)&signalmask) != -1) { signal = signalmask; } else { - LOG("waitselect() returned error"); + NSLOG(netsurf, INFO, "waitselect() returned error"); /* \todo Fix Ctrl-C handling. * WaitSelect() from bsdsocket.library returns -1 if the task was * signalled with a Ctrl-C. waitselect() from newlib.library does not. @@ -3035,11 +3042,13 @@ static void ami_gui_close_screen(struct Screen *scrn, BOOL locked_screen, BOOL d if(donotwait == TRUE) return; ULONG scrnsig = 1 << screen_signal; - LOG("Waiting for visitor windows to close... (signal)"); + NSLOG(netsurf, INFO, + "Waiting for visitor windows to close... (signal)"); Wait(scrnsig); while (CloseScreen(scrn) == FALSE) { - LOG("Waiting for visitor windows to close... (polling)"); + NSLOG(netsurf, INFO, + "Waiting for visitor windows to close... (polling)"); Delay(50); } @@ -3081,11 +3090,11 @@ static void gui_quit(void) ami_font_fini(); ami_help_free(); - LOG("Freeing menu items"); + NSLOG(netsurf, INFO, "Freeing menu items"); ami_ctxmenu_free(); ami_menu_free_glyphs(); - LOG("Freeing mouse pointers"); + NSLOG(netsurf, INFO, "Freeing mouse pointers"); ami_mouse_pointers_free(); ami_file_req_free(); @@ -3099,7 +3108,7 @@ static void gui_quit(void) ami_clipboard_free(); ami_gui_resources_free(); - LOG("Closing screen"); + NSLOG(netsurf, INFO, "Closing screen"); ami_gui_close_screen(scrn, locked_screen, FALSE); if(nsscreentitle) FreeVec(nsscreentitle); } @@ -3109,7 +3118,7 @@ char *ami_gui_get_cache_favicon_name(nsurl *url, bool only_if_avail) STRPTR filename = NULL; if ((filename = ASPrintf("%s/%x", current_user_faviconcache, nsurl_hash(url)))) { - LOG("favicon cache location: %s", filename); + NSLOG(netsurf, INFO, "favicon cache location: %s", filename); if (only_if_avail == true) { BPTR lock = 0; @@ -3723,7 +3732,8 @@ static nserror amiga_window_invalidate_area(struct gui_window *g, nsobj = AddObject(g->deferred_rects, AMINS_RECT); nsobj->objstruct = deferred_rect; } else { - LOG("Ignoring duplicate or subset of queued box redraw"); + NSLOG(netsurf, INFO, + "Ignoring duplicate or subset of queued box redraw"); } } ami_schedule_redraw(g->shared, false); @@ -3912,7 +3922,7 @@ gui_window_create(struct browser_window *bw, ULONG defer_layout = TRUE; ULONG idcmp_sizeverify = IDCMP_SIZEVERIFY; - LOG("Creating window"); + NSLOG(netsurf, INFO, "Creating window"); if (!scrn) ami_openscreenfirst(); @@ -4056,7 +4066,7 @@ gui_window_create(struct browser_window *bw, (strcmp(nsoption_charp(pubscreen_name), "Workbench") == 0)) iconifygadget = TRUE; - LOG("Creating menu"); + NSLOG(netsurf, INFO, "Creating menu"); struct Menu *menu = ami_gui_menu_create(g->shared); NewList(&g->shared->tab_list); @@ -4178,7 +4188,7 @@ gui_window_create(struct browser_window *bw, BitMapEnd; } - LOG("Creating window object"); + NSLOG(netsurf, INFO, "Creating window object"); g->shared->objects[OID_MAIN] = WindowObj, WA_ScreenTitle, ami_gui_get_screen_title(), @@ -4456,11 +4466,11 @@ gui_window_create(struct browser_window *bw, EndWindow; } - LOG("Opening window"); + NSLOG(netsurf, INFO, "Opening window"); g->shared->win = (struct Window *)RA_OpenWindow(g->shared->objects[OID_MAIN]); - LOG("Window opened, adding border gadgets"); + NSLOG(netsurf, INFO, "Window opened, adding border gadgets"); if(!g->shared->win) { @@ -4796,7 +4806,7 @@ static void ami_gui_window_update_box_deferred(struct gui_window *g, bool draw) if(draw == true) { ami_set_pointer(g->shared, GUI_POINTER_WAIT, false); } else { - LOG("Ignoring deferred box redraw queue"); + NSLOG(netsurf, INFO, "Ignoring deferred box redraw queue"); } node = (struct nsObject *)GetHead((struct List *)g->deferred_rects); @@ -4841,7 +4851,8 @@ bool ami_gui_window_update_box_deferred_check(struct MinList *deferred_rects, (new_rect->y0 <= rect->y0) && (new_rect->x1 >= rect->x1) && (new_rect->y1 >= rect->y1)) { - LOG("Removing queued redraw that is a subset of new box redraw"); + NSLOG(netsurf, INFO, + "Removing queued redraw that is a subset of new box redraw"); ami_memory_itempool_free(mempool, node->objstruct, sizeof(struct rect)); DelObjectNoFree(node); /* Don't return - we might find more */ @@ -5414,20 +5425,20 @@ Object *ami_gui_splash_open(void) EndWindow; if(win_obj == NULL) { - LOG("Splash window object not created"); + NSLOG(netsurf, INFO, "Splash window object not created"); return NULL; } - LOG("Attempting to open splash window..."); + NSLOG(netsurf, INFO, "Attempting to open splash window..."); win = RA_OpenWindow(win_obj); if(win == NULL) { - LOG("Splash window did not open"); + NSLOG(netsurf, INFO, "Splash window did not open"); return NULL; } if(bm_obj == NULL) { - LOG("BitMap object not created"); + NSLOG(netsurf, INFO, "BitMap object not created"); return NULL; } @@ -5489,14 +5500,14 @@ void ami_gui_splash_close(Object *win_obj) { if(win_obj == NULL) return; - LOG("Closing splash window"); + NSLOG(netsurf, INFO, "Closing splash window"); DisposeObject(win_obj); } static void gui_file_gadget_open(struct gui_window *g, struct hlcache_handle *hl, struct form_control *gadget) { - LOG("File open dialog request for %p/%p", g, gadget); + NSLOG(netsurf, INFO, "File open dialog request for %p/%p", g, gadget); if(AslRequestTags(filereq, ASLFR_Window, g->shared->win, @@ -5531,7 +5542,7 @@ static char *ami_gui_get_user_dir(STRPTR current_user) user = GetVar("user", temp, 1024, GVF_GLOBAL_ONLY); current_user = ASPrintf("%s", (user == -1) ? "Default" : temp); } - LOG("User: %s", current_user); + NSLOG(netsurf, INFO, "User: %s", current_user); if(users_dir == NULL) { users_dir = ASPrintf("%s", USERS_DIR); @@ -5583,7 +5594,7 @@ static char *ami_gui_get_user_dir(STRPTR current_user) FreeVec(users_dir); FreeVec(current_user); - LOG("User dir: %s", current_user_dir); + NSLOG(netsurf, INFO, "User dir: %s", current_user_dir); if((lock = CreateDirTree(current_user_dir))) UnLock(lock); @@ -5810,7 +5821,7 @@ int main(int argc, char** argv) AddPart(script, nsoption_charp(arexx_startup), 1024); ami_arexx_execute(script); - LOG("Entering main loop"); + NSLOG(netsurf, INFO, "Entering main loop"); while (!ami_quit) { ami_get_msg(); diff --git a/frontends/amiga/gui_menu.c b/frontends/amiga/gui_menu.c index 6ee0800f8..756f5e66c 100644 --- a/frontends/amiga/gui_menu.c +++ b/frontends/amiga/gui_menu.c @@ -584,7 +584,8 @@ ULONG ami_gui_menu_number(int item) break; default: - LOG("WARNING: Unrecognised menu item %d", item); + NSLOG(netsurf, INFO, + "WARNING: Unrecognised menu item %d", item); menu_num = 0; break; } diff --git a/frontends/amiga/history.c b/frontends/amiga/history.c index 7fc1ec333..e724f3e70 100644 --- a/frontends/amiga/history.c +++ b/frontends/amiga/history.c @@ -438,7 +438,7 @@ nserror ami_history_global_present(void) res = ami_history_global_create_window(ncwin); if (res != NSERROR_OK) { - LOG("SSL UI builder init failed"); + NSLOG(netsurf, INFO, "SSL UI builder init failed"); ami_utf8_free(ncwin->core.wintitle); free(ncwin); return res; diff --git a/frontends/amiga/history_local.c b/frontends/amiga/history_local.c index c293f5909..0ae9cc040 100644 --- a/frontends/amiga/history_local.c +++ b/frontends/amiga/history_local.c @@ -261,7 +261,7 @@ nserror ami_history_local_present(struct gui_window *gw) res = ami_history_local_create_window(ncwin); if (res != NSERROR_OK) { - LOG("SSL UI builder init failed"); + NSLOG(netsurf, INFO, "SSL UI builder init failed"); ami_utf8_free(ncwin->core.wintitle); free(ncwin); return res; diff --git a/frontends/amiga/hotlist.c b/frontends/amiga/hotlist.c index c0a6b6f58..c7efe9148 100644 --- a/frontends/amiga/hotlist.c +++ b/frontends/amiga/hotlist.c @@ -563,7 +563,7 @@ nserror ami_hotlist_present(void) res = ami_hotlist_create_window(ncwin); if (res != NSERROR_OK) { - LOG("SSL UI builder init failed"); + NSLOG(netsurf, INFO, "SSL UI builder init failed"); ami_utf8_free(ncwin->core.wintitle); free(ncwin); return res; diff --git a/frontends/amiga/memory.c b/frontends/amiga/memory.c index d371d2585..35ca9697f 100755 --- a/frontends/amiga/memory.c +++ b/frontends/amiga/memory.c @@ -50,23 +50,38 @@ void *ami_memory_clear_alloc(size_t size, UBYTE value) static int ami_memory_slab_usage_cb(const struct __slab_usage_information * sui) { if(sui->sui_slab_index <= 1) { - LOG("clib2 slab usage:"); - LOG(" The size of all slabs, in bytes: %ld", sui->sui_slab_size); - LOG(" Number of allocations which are not managed by slabs: %ld", - sui->sui_num_single_allocations); - LOG(" Total number of bytes allocated for memory not managed by slabs: %ld", - sui->sui_total_single_allocation_size); - LOG(" Number of slabs currently in play: %ld", sui->sui_num_slabs); - LOG(" Number of currently unused slabs: %ld", sui->sui_num_empty_slabs); - LOG(" Number of slabs in use which are completely filled with data: %ld", - sui->sui_num_full_slabs); - LOG(" Total number of bytes allocated for all slabs: %ld", - sui->sui_total_slab_allocation_size); + NSLOG(netsurf, INFO, "clib2 slab usage:"); + NSLOG(netsurf, INFO, + " The size of all slabs, in bytes: %ld", + sui->sui_slab_size); + NSLOG(netsurf, INFO, + " Number of allocations which are not managed by slabs: %ld", + sui->sui_num_single_allocations); + NSLOG(netsurf, INFO, + " Total number of bytes allocated for memory not managed by slabs: %ld", + sui->sui_total_single_allocation_size); + NSLOG(netsurf, INFO, + " Number of slabs currently in play: %ld", + sui->sui_num_slabs); + NSLOG(netsurf, INFO, + " Number of currently unused slabs: %ld", + sui->sui_num_empty_slabs); + NSLOG(netsurf, INFO, + " Number of slabs in use which are completely filled with data: %ld", + sui->sui_num_full_slabs); + NSLOG(netsurf, INFO, + " Total number of bytes allocated for all slabs: %ld", + sui->sui_total_slab_allocation_size); } - LOG("Slab %d", sui->sui_slab_index); - LOG(" Memory chunk size managed by this slab: %ld", sui->sui_chunk_size); - LOG(" Number of memory chunks that fit in this slab: %ld", sui->sui_num_chunks); - LOG(" Number of memory chunks used in this slab: %ld", sui->sui_num_chunks_used); + NSLOG(netsurf, INFO, "Slab %d", sui->sui_slab_index); + NSLOG(netsurf, INFO, " Memory chunk size managed by this slab: %ld", + sui->sui_chunk_size); + NSLOG(netsurf, INFO, + " Number of memory chunks that fit in this slab: %ld", + sui->sui_num_chunks); + NSLOG(netsurf, INFO, + " Number of memory chunks used in this slab: %ld", + sui->sui_num_chunks_used); return 0; } @@ -74,16 +89,20 @@ static int ami_memory_slab_usage_cb(const struct __slab_usage_information * sui) static int ami_memory_slab_alloc_cb(const struct __slab_allocation_information *sai) { if(sai->sai_allocation_index <= 1) { - LOG("clib2 allocation usage:"); - LOG(" Number of allocations which are not managed by slabs: %ld", - sai->sai_num_single_allocations); - LOG(" Total number of bytes allocated for memory not managed by slabs: %ld", - sai->sai_total_single_allocation_size); + NSLOG(netsurf, INFO, "clib2 allocation usage:"); + NSLOG(netsurf, INFO, + " Number of allocations which are not managed by slabs: %ld", + sai->sai_num_single_allocations); + NSLOG(netsurf, INFO, + " Total number of bytes allocated for memory not managed by slabs: %ld", + sai->sai_total_single_allocation_size); } - LOG("Alloc %d", sai->sai_allocation_index); - LOG(" Size of this allocation, as requested: %ld", sai->sai_allocation_size); - LOG(" Total size of this allocation, including management data: %ld", - sai->sai_total_allocation_size); + NSLOG(netsurf, INFO, "Alloc %d", sai->sai_allocation_index); + NSLOG(netsurf, INFO, " Size of this allocation, as requested: %ld", + sai->sai_allocation_size); + NSLOG(netsurf, INFO, + " Total size of this allocation, including management data: %ld", + sai->sai_total_allocation_size); return 0; } @@ -111,13 +130,13 @@ void ami_memory_slab_dump(BPTR fh) static void ami_memory_low_mem_handler(void *p) { if(low_mem_status == PURGE_STEP1) { - LOG("Purging llcache"); + NSLOG(netsurf, INFO, "Purging llcache"); llcache_clean(true); low_mem_status = PURGE_DONE_STEP1; } if(low_mem_status == PURGE_STEP2) { - LOG("Purging unused slabs"); + NSLOG(netsurf, INFO, "Purging unused slabs"); __free_unused_slabs(); low_mem_status = PURGE_DONE_STEP2; } diff --git a/frontends/amiga/misc.c b/frontends/amiga/misc.c index 5ca4f906a..532d2f182 100755 --- a/frontends/amiga/misc.c +++ b/frontends/amiga/misc.c @@ -46,7 +46,7 @@ static LONG ami_misc_req(const char *message, uint32 type) { LONG ret = 0; - LOG("%s", message); + NSLOG(netsurf, INFO, "%s", message); #ifdef __amigaos4__ ret = TimedDosRequesterTags( TDR_TitleString, messages_get("NetSurf"), diff --git a/frontends/amiga/os3support.c b/frontends/amiga/os3support.c index 6dc95795f..378bc04cc 100644 --- a/frontends/amiga/os3support.c +++ b/frontends/amiga/os3support.c @@ -216,13 +216,13 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl fh = Open(fontpath, MODE_OLDFILE); if(fh == 0) { - LOG("Unable to open FONT %s", fontpath); + NSLOG(netsurf, INFO, "Unable to open FONT %s", fontpath); FreeVec(fontpath); return NULL; } if(Read(fh, &fch, sizeof(struct FontContentsHeader)) != sizeof(struct FontContentsHeader)) { - LOG("Unable to read FONT %s", fontpath); + NSLOG(netsurf, INFO, "Unable to read FONT %s", fontpath); FreeVec(fontpath); Close(fh); return NULL; @@ -231,7 +231,7 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl Close(fh); if(fch.fch_FileID != OFCH_ID) { - LOG("%s is not an outline font!", fontpath); + NSLOG(netsurf, INFO, "%s is not an outline font!", fontpath); FreeVec(fontpath); return NULL; } @@ -242,7 +242,7 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl if(p) *p = '.'; if(fh == 0) { - LOG("Unable to open OTAG %s", otagpath); + NSLOG(netsurf, INFO, "Unable to open OTAG %s", otagpath); FreeVec(otagpath); return NULL; } @@ -250,7 +250,7 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl size = GetFileSize(fh); buffer = (UBYTE *)malloc(size); if(buffer == NULL) { - LOG("Unable to allocate memory"); + NSLOG(netsurf, INFO, "Unable to allocate memory"); Close(fh); FreeVec(otagpath); return NULL; @@ -262,7 +262,7 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl /* The first tag is supposed to be OT_FileIdent and should equal 'size' */ struct TagItem *tag = (struct TagItem *)buffer; if((tag->ti_Tag != OT_FileIdent) || (tag->ti_Data != (ULONG)size)) { - LOG("Invalid OTAG file"); + NSLOG(netsurf, INFO, "Invalid OTAG file"); free(buffer); FreeVec(otagpath); return NULL; @@ -277,10 +277,10 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl /* Find OT_Engine and open the font engine */ if(ti = FindTagItem(OT_Engine, buffer)) { - LOG("Using font engine %s", ti->ti_Data); + NSLOG(netsurf, INFO, "Using font engine %s", ti->ti_Data); fname = ASPrintf("%s.library", ti->ti_Data); } else { - LOG("Cannot find OT_Engine tag"); + NSLOG(netsurf, INFO, "Cannot find OT_Engine tag"); free(buffer); FreeVec(otagpath); return NULL; @@ -289,7 +289,7 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl BulletBase = (struct BulletBase *)OpenLibrary(fname, 0L); if(BulletBase == NULL) { - LOG("Unable to open font engine %s", fname); + NSLOG(netsurf, INFO, "Unable to open font engine %s", fname); free(buffer); FreeVec(fname); FreeVec(otagpath); diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c index e31d470a6..dc2c16724 100644 --- a/frontends/amiga/plotters.c +++ b/frontends/amiga/plotters.c @@ -131,7 +131,7 @@ struct gui_globals *ami_plot_ra_alloc(ULONG width, ULONG height, bool force32bit struct gui_globals *gg = malloc(sizeof(struct gui_globals)); if(force32bit == false) depth = GetBitMapAttr(scrn->RastPort.BitMap, BMA_DEPTH); - LOG("Screen depth = %d", depth); + NSLOG(netsurf, INFO, "Screen depth = %d", depth); #ifdef __amigaos4__ if(depth < 16) { @@ -241,7 +241,8 @@ struct gui_globals *ami_plot_ra_alloc(ULONG width, ULONG height, bool force32bit gg->open_num = -1; init_layers_count++; - LOG("Layer initialised (total: %d)", init_layers_count); + NSLOG(netsurf, INFO, "Layer initialised (total: %d)", + init_layers_count); return gg; } @@ -328,7 +329,8 @@ static ULONG ami_plot_obtain_pen(struct MinList *shared_pens, ULONG colr) (colr & 0x00ff0000) << 8, NULL); - if(pen == -1) LOG("WARNING: Cannot allocate pen for ABGR:%lx", colr); + if(pen == -1) NSLOG(netsurf, INFO, + "WARNING: Cannot allocate pen for ABGR:%lx", colr); if((shared_pens != NULL) && (pool_pens != NULL)) { if((node = (struct ami_plot_pen *)ami_memory_itempool_alloc(pool_pens, sizeof(struct ami_plot_pen)))) { @@ -849,17 +851,17 @@ ami_polygon(const struct redraw_context *ctx, ami_plot_setapen(glob, glob->rp, style->fill_colour); if (AreaMove(glob->rp,p[0],p[1]) == -1) { - LOG("AreaMove: vector list full"); + NSLOG(netsurf, INFO, "AreaMove: vector list full"); } for (uint32 k = 1; k < n; k++) { if (AreaDraw(glob->rp,p[k*2],p[(k*2)+1]) == -1) { - LOG("AreaDraw: vector list full"); + NSLOG(netsurf, INFO, "AreaDraw: vector list full"); } } if (AreaEnd(glob->rp) == -1) { - LOG("AreaEnd: error"); + NSLOG(netsurf, INFO, "AreaEnd: error"); } return NSERROR_OK; @@ -900,7 +902,7 @@ ami_path(const struct redraw_context *ctx, } if (p[0] != PLOTTER_PATH_MOVE) { - LOG("Path does not start with move"); + NSLOG(netsurf, INFO, "Path does not start with move"); return NSERROR_INVALID; } @@ -922,7 +924,8 @@ ami_path(const struct redraw_context *ctx, if (p[i] == PLOTTER_PATH_MOVE) { if (pstyle->fill_colour != NS_TRANSPARENT) { if (AreaMove(glob->rp, p[i+1], p[i+2]) == -1) { - LOG("AreaMove: vector list full"); + NSLOG(netsurf, INFO, + "AreaMove: vector list full"); } } else { Move(glob->rp, p[i+1], p[i+2]); @@ -936,7 +939,7 @@ ami_path(const struct redraw_context *ctx, } else if (p[i] == PLOTTER_PATH_CLOSE) { if (pstyle->fill_colour != NS_TRANSPARENT) { if (AreaEnd(glob->rp) == -1) { - LOG("AreaEnd: error"); + NSLOG(netsurf, INFO, "AreaEnd: error"); } } else { Draw(glob->rp, start_p.x, start_p.y); @@ -945,7 +948,8 @@ ami_path(const struct redraw_context *ctx, } else if (p[i] == PLOTTER_PATH_LINE) { if (pstyle->fill_colour != NS_TRANSPARENT) { if (AreaDraw(glob->rp, p[i+1], p[i+2]) == -1) { - LOG("AreaDraw: vector list full"); + NSLOG(netsurf, INFO, + "AreaDraw: vector list full"); } } else { Draw(glob->rp, p[i+1], p[i+2]); @@ -965,7 +969,8 @@ ami_path(const struct redraw_context *ctx, ami_bezier(&cur_p, &p_a, &p_b, &p_c, t, &p_r); if (pstyle->fill_colour != NS_TRANSPARENT) { if (AreaDraw(glob->rp, p_r.x, p_r.y) == -1) { - LOG("AreaDraw: vector list full"); + NSLOG(netsurf, INFO, + "AreaDraw: vector list full"); } } else { Draw(glob->rp, p_r.x, p_r.y); @@ -975,7 +980,7 @@ ami_path(const struct redraw_context *ctx, cur_p.y = p_c.y; i += 7; } else { - LOG("bad path command %f", p[i]); + NSLOG(netsurf, INFO, "bad path command %f", p[i]); /* End path for safety if using Area commands */ if (pstyle->fill_colour != NS_TRANSPARENT) { AreaEnd(glob->rp); diff --git a/frontends/amiga/plugin_hack.c b/frontends/amiga/plugin_hack.c index 2327f9190..4fd1f03f7 100644 --- a/frontends/amiga/plugin_hack.c +++ b/frontends/amiga/plugin_hack.c @@ -82,7 +82,8 @@ nserror amiga_plugin_hack_init(void) if(node) { - LOG("plugin_hack registered %s", lwc_string_data(type)); + NSLOG(netsurf, INFO, "plugin_hack registered %s", + lwc_string_data(type)); error = content_factory_register_handler( lwc_string_data(type), @@ -123,7 +124,7 @@ nserror amiga_plugin_hack_create(const content_handler *handler, bool amiga_plugin_hack_convert(struct content *c) { - LOG("amiga_plugin_hack_convert"); + NSLOG(netsurf, INFO, "amiga_plugin_hack_convert"); content_set_ready(c); content_set_done(c); @@ -137,7 +138,7 @@ void amiga_plugin_hack_destroy(struct content *c) { amiga_plugin_hack_content *plugin = (amiga_plugin_hack_content *) c; - LOG("amiga_plugin_hack_destroy %p", plugin); + NSLOG(netsurf, INFO, "amiga_plugin_hack_destroy %p", plugin); return; } @@ -155,7 +156,7 @@ bool amiga_plugin_hack_redraw(struct content *c, struct rect rect; nserror res; - LOG("amiga_plugin_hack_redraw"); + NSLOG(netsurf, INFO, "amiga_plugin_hack_redraw"); rect.x0 = data->x; rect.y0 = data->y; @@ -187,7 +188,8 @@ bool amiga_plugin_hack_redraw(struct content *c, void amiga_plugin_hack_open(struct content *c, struct browser_window *bw, struct content *page, struct object_params *params) { - LOG("amiga_plugin_hack_open %s", nsurl_access(content_get_url(c))); + NSLOG(netsurf, INFO, "amiga_plugin_hack_open %s", + nsurl_access(content_get_url(c))); if(c) { @@ -201,13 +203,13 @@ void amiga_plugin_hack_open(struct content *c, struct browser_window *bw, void amiga_plugin_hack_close(struct content *c) { - LOG("amiga_plugin_hack_close"); + NSLOG(netsurf, INFO, "amiga_plugin_hack_close"); return; } void amiga_plugin_hack_reformat(struct content *c, int width, int height) { - LOG("amiga_plugin_hack_reformat"); + NSLOG(netsurf, INFO, "amiga_plugin_hack_reformat"); c->width = width; c->height = height; @@ -220,7 +222,7 @@ nserror amiga_plugin_hack_clone(const struct content *old, struct content **newc amiga_plugin_hack_content *plugin; nserror error; - LOG("amiga_plugin_hack_clone"); + NSLOG(netsurf, INFO, "amiga_plugin_hack_clone"); plugin = calloc(1, sizeof(amiga_plugin_hack_content)); if (plugin == NULL) @@ -267,7 +269,7 @@ void amiga_plugin_hack_execute(struct hlcache_handle *c) if(full_cmd) { #ifdef __amigaos4__ - LOG("Attempting to execute %s", full_cmd); + NSLOG(netsurf, INFO, "Attempting to execute %s", full_cmd); in = Open("NIL:", MODE_OLDFILE); out = Open("NIL:", MODE_NEWFILE); diff --git a/frontends/amiga/schedule.c b/frontends/amiga/schedule.c index bfafe9c88..30a36815c 100644 --- a/frontends/amiga/schedule.c +++ b/frontends/amiga/schedule.c @@ -218,9 +218,10 @@ static void ami_schedule_dump(void) GetSysTime(&tv); Amiga2Date(tv.Seconds, &clockdata); - LOG("Current time = %d-%d-%d %d:%d:%d.%d", clockdata.mday, clockdata.month, clockdata.year, - clockdata.hour, clockdata.min, clockdata.sec, tv.Microseconds); - LOG("Events remaining in queue:"); + NSLOG(netsurf, INFO, "Current time = %d-%d-%d %d:%d:%d.%d", + clockdata.mday, clockdata.month, clockdata.year, + clockdata.hour, clockdata.min, clockdata.sec, tv.Microseconds); + NSLOG(netsurf, INFO, "Events remaining in queue:"); iterator = pblHeapIterator(schedule_list); @@ -231,9 +232,9 @@ static void ami_schedule_dump(void) nscb, clockdata.mday, clockdata.month, clockdata.year, clockdata.hour, clockdata.min, clockdata.sec, nscb->tv.Microseconds, nscb->callback, nscb->p); if(CheckIO((struct IORequest *)nscb) == NULL) { - LOG("-> ACTIVE"); + NSLOG(netsurf, INFO, "-> ACTIVE"); } else { - LOG("-> COMPLETE"); + NSLOG(netsurf, INFO, "-> COMPLETE"); } }; diff --git a/frontends/amiga/selectmenu.c b/frontends/amiga/selectmenu.c index f3a11b67a..8a8614136 100644 --- a/frontends/amiga/selectmenu.c +++ b/frontends/amiga/selectmenu.c @@ -58,7 +58,8 @@ BOOL ami_selectmenu_is_safe(void) BOOL popupmenu_lib_ok = FALSE; if((PopupMenuBase = OpenLibrary("popupmenu.library", 53))) { - LOG("popupmenu.library v%d.%d", PopupMenuBase->lib_Version, PopupMenuBase->lib_Revision); + NSLOG(netsurf, INFO, "popupmenu.library v%d.%d", + PopupMenuBase->lib_Version, PopupMenuBase->lib_Revision); if(LIB_IS_AT_LEAST((struct Library *)PopupMenuBase, 53, 11)) popupmenu_lib_ok = TRUE; CloseLibrary(PopupMenuBase); diff --git a/frontends/amiga/sslcert.c b/frontends/amiga/sslcert.c index eeb34108a..136b918fc 100644 --- a/frontends/amiga/sslcert.c +++ b/frontends/amiga/sslcert.c @@ -317,7 +317,7 @@ nserror ami_cert_verify(struct nsurl *url, res = ami_crtvrfy_create_window(ncwin); if (res != NSERROR_OK) { - LOG("SSL UI builder init failed"); + NSLOG(netsurf, INFO, "SSL UI builder init failed"); ami_utf8_free(ncwin->core.wintitle); ami_utf8_free(ncwin->sslerr); ami_utf8_free(ncwin->sslaccept); |