diff options
Diffstat (limited to 'frontends/amiga')
34 files changed, 304 insertions, 221 deletions
diff --git a/frontends/amiga/Makefile b/frontends/amiga/Makefile index f57b4ef8a..5089b4a46 100644 --- a/frontends/amiga/Makefile +++ b/frontends/amiga/Makefile @@ -5,7 +5,7 @@ CFLAGS += -std=c99 -Dnsamiga ifneq ($(SUBTARGET),os3) - CFLAGS += -O2 -finline-functions -U__STRICT_ANSI__ -D__USE_INLINE__ -D__USE_BASETYPE__ + CFLAGS += -O2 -mstrict-align -finline-functions -U__STRICT_ANSI__ -D__USE_INLINE__ -D__USE_BASETYPE__ else CFLAGS += -O2 -DPATH_MAX=1024 -D__m68k__ -m68020 endif 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..0fde677ae 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); } @@ -596,8 +602,12 @@ static inline struct BitMap *ami_bitmap_get_generic(struct bitmap *bitmap, TAG_DONE); if (err != COMPERR_Success) { - LOG("Composite error %ld - falling back", err); - /* If it failed, do it again the way which works in software */ + NSLOG(netsurf, INFO, + "Composite error %ld - falling back", + err); + /* If it failed, do it again the way + * which works in software + */ #else { #endif @@ -611,7 +621,8 @@ static inline struct BitMap *ami_bitmap_get_generic(struct bitmap *bitmap, COMPTAG_FriendBitMap, scrn->RastPort.BitMap, TAG_DONE); /* If it still fails... it's non-fatal */ - LOG("Fallback returned error %ld", err); + NSLOG(netsurf, INFO, + "Fallback returned error %ld", err); } } else /* Do it the old-fashioned way. This is pretty slow, even on OS4.1 */ #endif @@ -723,7 +734,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..42ee866ea 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); } @@ -525,7 +526,8 @@ HOOKF(void, ami_cw_idcmp_hook, Object *, object, struct IntuiMessage *) break; default: - LOG("IDCMP hook unhandled event: %ld", msg->Class); + NSLOG(netsurf, INFO, + "IDCMP hook unhandled event: %ld", msg->Class); break; } } diff --git a/frontends/amiga/dist/NetSurf.guide b/frontends/amiga/dist/NetSurf.guide index d628a1c3b..0bdd90076 100755 --- a/frontends/amiga/dist/NetSurf.guide +++ b/frontends/amiga/dist/NetSurf.guide @@ -144,7 +144,7 @@ There are a couple of Amiga-specific options which can only be changed directly @{b}redraw_tile_size_x@{ub}/@{b}redraw_tile_size_y@{ub} Specify the size of the off-screen bitmap. Higher will speed up redraws at the expense of memory. 0 disables tiling (will use a bitmap at least the size of the screen NetSurf is running on) @{b}web_search_width@{ub} Defaults to 0. Larger values will increase the size of the web search gadget next to the URL bar. @{b}mask_alpha@{ub} Threshold to use when determining which alpha values to convert to full transparency (0 - 255, where 255 will convert even opaque pixels to transparent). Defaults to 0. This is only used in palette-mapped modes where alpha blending is not currently supported. -@{b}tab_new_session{ub} If NetSurf is already running, this will cause any passed URLs to open in a new tab rather than a new window. +@{b}tab_new_session@{ub} If NetSurf is already running, this will cause any passed URLs to open in a new tab rather than a new window. @{b}use_extmem@{ub} Defaults to 1 (enabled). Setting to 0 will prevent NetSurf using Extended Memory to store uncompressed images - this may have a performance benefit and no disadvantage for <2GB configurations. OS4.1FEU1 only. @{b}download_notify_progress@{ub} Defaults to 0 (disabled). Display download progress in a Ringhio notification. Requires Enhancer Pack (Ringhio 53.65+), behaviour without it is undefined. @{b}url_file@{ub} Path to URL database file 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 2f998d299..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; @@ -190,7 +190,7 @@ bool amiga_dt_anim_convert(struct content *c) plugin->bitmap = amiga_bitmap_create(width, height, bm_flags); if (!plugin->bitmap) { msg_data.error = messages_get("NoMemory"); - content_broadcast(c, CONTENT_MSG_ERROR, msg_data); + content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; } @@ -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 e7f1c9724..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; @@ -187,7 +187,7 @@ static struct bitmap *amiga_dt_picture_cache_convert(struct content *c) bitmap = amiga_bitmap_create(c->width, c->height, BITMAP_NEW); if (!bitmap) { msg_data.error = messages_get("NoMemory"); - content_broadcast(c, CONTENT_MSG_ERROR, msg_data); + content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return NULL; } @@ -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..e69ff55f0 100644 --- a/frontends/amiga/font.c +++ b/frontends/amiga/font.c @@ -37,7 +37,7 @@ static ULONG ami_xdpi = 72; ULONG ami_font_dpi_get_devicedpi(void) { - return ami_devicedpi; + return (ami_xdpi << 16) | ami_devicedpi; } ULONG ami_font_dpi_get_xdpi(void) @@ -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..2da3f0038 100644 --- a/frontends/amiga/font_diskfont.c +++ b/frontends/amiga/font_diskfont.c @@ -55,7 +55,6 @@ 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)"); return prev_font; } @@ -99,7 +98,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..8e822f3ac 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); @@ -1220,12 +1225,10 @@ static void ami_update_buttons(struct gui_window_2 *gwin) } } -#ifdef __amigaos4__ GetAttr(GA_Disabled, gwin->objects[GID_BACK], (uint32 *)&s_back); GetAttr(GA_Disabled, gwin->objects[GID_FORWARD], (uint32 *)&s_forward); GetAttr(GA_Disabled, gwin->objects[GID_RELOAD], (uint32 *)&s_reload); GetAttr(GA_Disabled, gwin->objects[GID_STOP], (uint32 *)&s_stop); -#endif if(BOOL_MISMATCH(s_back, back)) SetGadgetAttrs((struct Gadget *)gwin->objects[GID_BACK], @@ -1245,9 +1248,9 @@ static void ami_update_buttons(struct gui_window_2 *gwin) if(ClickTabBase->lib_Version < 53) { if(gwin->tabs <= 1) tabclose = TRUE; -#ifdef __amigaos4__ + GetAttr(GA_Disabled, gwin->objects[GID_CLOSETAB], (uint32 *)&s_tabclose); -#endif + if(BOOL_MISMATCH(s_tabclose, tabclose)) SetGadgetAttrs((struct Gadget *)gwin->objects[GID_CLOSETAB], gwin->win, NULL, GA_Disabled, tabclose, TAG_DONE); @@ -2522,10 +2525,9 @@ static BOOL ami_gui_event(void *w) #ifdef __amigaos4__ case WMHI_ICONIFY: { - struct bitmap *bm; - - bm = urldb_get_thumbnail(browser_window_get_url(gwin->gw->bw)); - if(!bm) bm = content_get_bitmap(browser_window_get_content(gwin->gw->bw)); + struct bitmap *bm = NULL; + browser_window_history_get_thumbnail(gwin->gw->bw, + &bm); gwin->dobj = amiga_icon_from_bitmap(bm); amiga_icon_superimpose_favicon_internal(gwin->gw->favicon, gwin->dobj); @@ -2790,7 +2792,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 +2830,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 +3039,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 +3087,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 +3105,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 +3115,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 +3729,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); @@ -3853,7 +3860,8 @@ HOOKF(void, ami_scroller_hook, Object *, object, struct IntuiMessage *) break; default: - LOG("IDCMP hook unhandled event: %ld", msg->Class); + NSLOG(netsurf, INFO, + "IDCMP hook unhandled event: %ld", msg->Class); break; } // ReplyMsg((struct Message *)msg); @@ -3912,7 +3920,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(); @@ -4051,12 +4059,14 @@ gui_window_create(struct browser_window *bw, ULONG addtabclosegadget = TAG_IGNORE; ULONG iconifygadget = FALSE; +#ifdef __amigaos4__ if (nsoption_charp(pubscreen_name) && (locked_screen == TRUE) && (strcmp(nsoption_charp(pubscreen_name), "Workbench") == 0)) iconifygadget = TRUE; +#endif - 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(); @@ -5829,6 +5840,9 @@ int main(int argc, char** argv) free(current_user_dir); FreeVec(current_user_faviconcache); + /* finalise logging */ + nslog_finalise(); + #ifndef __amigaos4__ /* OS3 low memory handler */ ami_memory_fini(memhandler); 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/gui_options.c b/frontends/amiga/gui_options.c index 48228407f..cc3a915df 100755 --- a/frontends/amiga/gui_options.c +++ b/frontends/amiga/gui_options.c @@ -270,9 +270,8 @@ static void ami_gui_opts_array_to_list(struct List *list, const char *array[], i node = AllocChooserNode(CNA_Text, array[i], TAG_DONE); break; case NSA_LIST_RADIO: - /* Note: RBNA_Labels is RBNA_Label in OS4 - * Also note: These labels don't work (FIXME) */ - node = AllocRadioButtonNode(RBNA_Labels, array[i], TAG_DONE); + /* Note: RBNA_Labels is RBNA_Label in OS4 */ + node = AllocRadioButtonNode(0, RBNA_Labels, array[i], TAG_DONE); break; default: break; @@ -1107,8 +1106,8 @@ void ami_gui_opts_open(void) GA_ID, GID_OPTS_DPI_Y, GA_RelVerify, TRUE, INTEGER_Number, nsoption_int(screen_ydpi), - INTEGER_Minimum, 60, - INTEGER_Maximum, 150, + INTEGER_Minimum, 20, + INTEGER_Maximum, 200, INTEGER_Arrows, TRUE, GA_Disabled, nsoption_bool(bitmap_fonts), IntegerEnd, @@ -1748,7 +1747,7 @@ static void ami_gui_opts_use(bool save) switch(data) { case 0: - nsoption_set_charp(pubscreen_name, strdup("\0")); + nsoption_set_charp(pubscreen_name, NULL); break; case 1: 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/icon.c b/frontends/amiga/icon.c index 9de040d37..582d355b6 100644 --- a/frontends/amiga/icon.c +++ b/frontends/amiga/icon.c @@ -155,7 +155,7 @@ bool amiga_icon_convert(struct content *c) if(filename == NULL) { msg_data.error = messages_get("NoMemory"); - content_broadcast(c, CONTENT_MSG_ERROR, msg_data); + content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; } @@ -167,7 +167,7 @@ bool amiga_icon_convert(struct content *c) if(dobj == NULL) { msg_data.error = messages_get("NoMemory"); - content_broadcast(c, CONTENT_MSG_ERROR, msg_data); + content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); return false; } @@ -187,14 +187,14 @@ bool amiga_icon_convert(struct content *c) icon_c->bitmap = amiga_bitmap_create(width, height, BITMAP_NEW); if (!icon_c->bitmap) { msg_data.error = messages_get("NoMemory"); - content_broadcast(c, CONTENT_MSG_ERROR, msg_data); + content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); if(dobj) FreeDiskObject(dobj); return false; } imagebuf = (ULONG *) amiga_bitmap_get_buffer(icon_c->bitmap); if (!imagebuf) { msg_data.error = messages_get("NoMemory"); - content_broadcast(c, CONTENT_MSG_ERROR, msg_data); + content_broadcast(c, CONTENT_MSG_ERROR, &msg_data); if(dobj) FreeDiskObject(dobj); return false; } diff --git a/frontends/amiga/libs.c b/frontends/amiga/libs.c index 30694542c..305818076 100644 --- a/frontends/amiga/libs.c +++ b/frontends/amiga/libs.c @@ -23,6 +23,7 @@ #include "utils/utils.h" #include "utils/log.h" +#include <proto/dos.h> #include <proto/exec.h> #include <proto/intuition.h> #include <proto/utility.h> @@ -56,11 +57,11 @@ #ifdef __amigaos4__ #define AMINS_LIB_OPEN(LIB, LIBVER, PREFIX, INTERFACE, INTVER, FAIL) \ - LOG("Opening %s v%d", LIB, LIBVER); \ + NSLOG(netsurf, INFO, "Opening %s v%d", LIB, LIBVER); \ if((PREFIX##Base = (struct PREFIX##Base *)OpenLibrary(LIB, LIBVER))) { \ I##PREFIX = (struct PREFIX##IFace *)GetInterface((struct Library *)PREFIX##Base, INTERFACE, INTVER, NULL); \ if(I##PREFIX == NULL) { \ - LOG("Failed to get %s interface v%d of %s", INTERFACE, INTVER, LIB); \ + NSLOG(netsurf, INFO, "Failed to get %s interface v%d of %s", INTERFACE, INTVER, LIB); \ AMINS_LIB_CLOSE(PREFIX) \ if(FAIL == true) { \ STRPTR error = ASPrintf("Unable to open interface %s v%d\nof %s v%ld (fatal error - not an OS4 lib?)", INTERFACE, INTVER, LIB, LIBVER); \ @@ -70,7 +71,7 @@ } \ } \ } else { \ - LOG("Failed to open %s v%d", LIB, LIBVER); \ + NSLOG(netsurf, INFO, "Failed to open %s v%d", LIB, LIBVER); \ if(FAIL == true) { \ STRPTR error = ASPrintf("Unable to open %s v%ld (fatal error)", LIB, LIBVER); \ ami_misc_fatal_error(error); \ @@ -90,13 +91,13 @@ struct PREFIX##IFace *I##PREFIX = NULL; #define AMINS_CLASS_OPEN(CLASS, CLASSVER, PREFIX, CLASSGET, NEEDINTERFACE) \ - LOG("Opening %s v%d", CLASS, CLASSVER); \ + NSLOG(netsurf, INFO, "Opening %s v%d", CLASS, CLASSVER); \ if((PREFIX##Base = OpenClass(CLASS, CLASSVER, &PREFIX##Class))) { \ if(NEEDINTERFACE == true) { \ - LOG(" + interface"); \ + NSLOG(netsurf, INFO, " + interface"); \ I##PREFIX = (struct PREFIX##IFace *)GetInterface((struct Library *)PREFIX##Base, "main", 1, NULL); \ if(I##PREFIX == NULL) { \ - LOG("Failed to get main interface v1 of %s", CLASS); \ + NSLOG(netsurf, INFO, "Failed to get main interface v1 of %s", CLASS); \ } \ } \ } \ @@ -118,10 +119,10 @@ #else #define AMINS_LIB_OPEN(LIB, LIBVER, PREFIX, INTERFACE, INTVER, FAIL) \ - LOG("Opening %s v%d", LIB, LIBVER); \ + NSLOG(netsurf, INFO, "Opening %s v%d", LIB, LIBVER); \ if((PREFIX##Base = (struct PREFIX##Base *)OpenLibrary(LIB, LIBVER))) { \ } else { \ - LOG("Failed to open %s v%d", LIB, LIBVER); \ + NSLOG(netsurf, INFO, "Failed to open %s v%d", LIB, LIBVER); \ if(FAIL == true) { \ STRPTR error = ASPrintf("Unable to open %s v%d (fatal error)", LIB, LIBVER); \ ami_misc_fatal_error(error); \ @@ -137,7 +138,7 @@ struct PREFIX##Base *PREFIX##Base = NULL; #define AMINS_CLASS_OPEN(CLASS, CLASSVER, PREFIX, CLASSGET, NEEDINTERFACE) \ - LOG("Opening %s v%d", CLASS, CLASSVER); \ + NSLOG(netsurf, INFO, "Opening %s v%d", CLASS, CLASSVER); \ if((PREFIX##Base = OpenLibrary(CLASS, CLASSVER))) { \ PREFIX##Class = CLASSGET##_GetClass(); \ } \ @@ -219,6 +220,7 @@ bool ami_libs_open(void) AMINS_LIB_OPEN("asl.library", 37, Asl, "main", 1, true) AMINS_LIB_OPEN("datatypes.library", 39, DataTypes, "main", 1, true) AMINS_LIB_OPEN("diskfont.library", 40, Diskfont, "main", 1, true) + AMINS_LIB_OPEN("dos.library", 37, DOS, "main", 1, true) AMINS_LIB_OPEN("gadtools.library", 37, GadTools, "main", 1, true) AMINS_LIB_OPEN("graphics.library", 40, Graphics, "main", 1, true) AMINS_LIB_OPEN("icon.library", 44, Icon, "main", 1, true) @@ -321,6 +323,7 @@ void ami_libs_close(void) AMINS_LIB_CLOSE(Asl) AMINS_LIB_CLOSE(DataTypes) AMINS_LIB_CLOSE(Diskfont) + AMINS_LIB_CLOSE(DOS) AMINS_LIB_CLOSE(GadTools) AMINS_LIB_CLOSE(Graphics) AMINS_LIB_CLOSE(Icon) 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/menu.c b/frontends/amiga/menu.c index 65265c34d..1f3f981ea 100644 --- a/frontends/amiga/menu.c +++ b/frontends/amiga/menu.c @@ -263,7 +263,9 @@ static int ami_menu_layout_mc_recursive(Object *menu_parent, struct ami_menu_dat TAG_DONE); } - //LOG("Adding item %p ID %d (%s) to parent %p", menu_item, j, md[j]->menulab, menu_parent); + NSLOG(netsurf, DEEPDEBUG, + "Adding item %p ID %d (%s) to parent %p", + menu_item, j, md[j]->menulab, menu_parent); IDoMethod(menu_parent, OM_ADDMEMBER, menu_item); continue; } else if (md[j]->menutype > level) { 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..645496b73 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); @@ -405,9 +405,10 @@ ULONG RefreshSetGadgetAttrsA(struct Gadget *g, struct Window *w, struct Requeste ULONG retval; BOOL changedisabled = FALSE; BOOL disabled; + struct TagItem *ti; if (w) { - if (FindTagItem(GA_Disabled,tags)) { + if ((ti = FindTagItem(GA_Disabled,tags)) && (ti->ti_Data != FALSE)) { changedisabled = TRUE; disabled = g->Flags & GFLG_DISABLED; } diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c index e31d470a6..7c5df4678 100644 --- a/frontends/amiga/plotters.c +++ b/frontends/amiga/plotters.c @@ -53,15 +53,6 @@ #include "amiga/rtg.h" #include "amiga/utf8.h" -/* set AMI_PLOTTER_DEBUG to 0 for no debugging, 1 for debugging */ -//#define AMI_PLOTTER_DEBUG 1 - -#ifdef AMI_PLOTTER_DEBUG -#define PLOT_LOG(x...) LOG(x) -#else -#define PLOT_LOG(x...) ((void) 0) -#endif - HOOKF(void, ami_bitmap_tile_hook, struct RastPort *, rp, struct BackFillMessage *); struct bfbitmap { @@ -119,9 +110,6 @@ static bool palette_mapped = true; /* palette-mapped state for the screen */ */ #define AREA_SIZE 25000 -/* Define the below to get additional debug */ -#undef AMI_PLOTTER_DEBUG - struct gui_globals *ami_plot_ra_alloc(ULONG width, ULONG height, bool force32bit, bool alloc_pen_list) { /* init shared bitmaps */ @@ -131,7 +119,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 +229,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 +317,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)))) { @@ -436,7 +426,7 @@ static void ami_arc_gfxlib(struct RastPort *rp, int x, int y, int radius, int an static nserror ami_bitmap(struct gui_globals *glob, int x, int y, int width, int height, struct bitmap *bitmap) { - PLOT_LOG("[ami_plotter] Entered ami_bitmap()"); + NSLOG(plot, DEEPDEBUG, "[ami_plotter] Entered ami_bitmap()"); struct BitMap *tbm; @@ -456,7 +446,7 @@ ami_bitmap(struct gui_globals *glob, int x, int y, int width, int height, struct return NSERROR_OK; } - PLOT_LOG("[ami_plotter] ami_bitmap() got native bitmap"); + NSLOG(plot, DEEPDEBUG, "[ami_plotter] ami_bitmap() got native bitmap"); #ifdef __amigaos4__ if (__builtin_expect((GfxBase->LibNode.lib_Version >= 53) && @@ -615,7 +605,7 @@ ami_clip(const struct redraw_context *ctx, const struct rect *clip) struct gui_globals *glob = (struct gui_globals *)ctx->priv; struct Region *reg = NULL; - PLOT_LOG("[ami_plotter] Entered ami_clip()"); + NSLOG(plot, DEEPDEBUG, "[ami_plotter] Entered ami_clip()"); if (glob->rp->Layer) { reg = NewRegion(); @@ -659,7 +649,7 @@ ami_arc(const struct redraw_context *ctx, const plot_style_t *style, int x, int y, int radius, int angle1, int angle2) { - PLOT_LOG("[ami_plotter] Entered ami_arc()"); + NSLOG(plot, DEEPDEBUG, "[ami_plotter] Entered ami_arc()"); struct gui_globals *glob = (struct gui_globals *)ctx->priv; @@ -691,7 +681,7 @@ ami_disc(const struct redraw_context *ctx, const plot_style_t *style, int x, int y, int radius) { - PLOT_LOG("[ami_plotter] Entered ami_disc()"); + NSLOG(plot, DEEPDEBUG, "[ami_plotter] Entered ami_disc()"); struct gui_globals *glob = (struct gui_globals *)ctx->priv; @@ -726,7 +716,7 @@ ami_line(const struct redraw_context *ctx, const plot_style_t *style, const struct rect *line) { - PLOT_LOG("[ami_plotter] Entered ami_line()"); + NSLOG(plot, DEEPDEBUG, "[ami_plotter] Entered ami_line()"); struct gui_globals *glob = (struct gui_globals *)ctx->priv; @@ -778,7 +768,7 @@ ami_rectangle(const struct redraw_context *ctx, const plot_style_t *style, const struct rect *rect) { - PLOT_LOG("[ami_plotter] Entered ami_rectangle()"); + NSLOG(plot, DEEPDEBUG, "[ami_plotter] Entered ami_rectangle()"); struct gui_globals *glob = (struct gui_globals *)ctx->priv; @@ -842,24 +832,24 @@ ami_polygon(const struct redraw_context *ctx, const int *p, unsigned int n) { - PLOT_LOG("[ami_plotter] Entered ami_polygon()"); + NSLOG(plot, DEEPDEBUG, "[ami_plotter] Entered ami_polygon()"); struct gui_globals *glob = (struct gui_globals *)ctx->priv; 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; @@ -891,7 +881,7 @@ ami_path(const struct redraw_context *ctx, unsigned int i; struct bez_point start_p = {0, 0}, cur_p = {0, 0}, p_a, p_b, p_c, p_r; - PLOT_LOG("[ami_plotter] Entered ami_path()"); + NSLOG(plot, DEEPDEBUG, "[ami_plotter] Entered ami_path()"); struct gui_globals *glob = (struct gui_globals *)ctx->priv; @@ -900,7 +890,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 +912,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 +927,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 +936,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 +957,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 +968,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); @@ -1032,7 +1025,7 @@ ami_bitmap_tile(const struct redraw_context *ctx, bool repeat_x = (flags & BITMAPF_REPEAT_X); bool repeat_y = (flags & BITMAPF_REPEAT_Y); - PLOT_LOG("[ami_plotter] Entered ami_bitmap_tile()"); + NSLOG(plot, DEEPDEBUG, "[ami_plotter] Entered ami_bitmap_tile()"); struct gui_globals *glob = (struct gui_globals *)ctx->priv; @@ -1149,7 +1142,7 @@ ami_text(const struct redraw_context *ctx, const char *text, size_t length) { - PLOT_LOG("[ami_plotter] Entered ami_text()"); + NSLOG(plot, DEEPDEBUG, "[ami_plotter] Entered ami_text()"); struct gui_globals *glob = (struct gui_globals *)ctx->priv; 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..043edc7fe 100644 --- a/frontends/amiga/schedule.c +++ b/frontends/amiga/schedule.c @@ -218,22 +218,25 @@ 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); while ((nscb = pblIteratorNext(iterator)) != -1) { Amiga2Date(nscb->tv.Seconds, &clockdata); - LOG("nscb: %p, at %d-%d-%d %d:%d:%d.%d, callback: %p, %p", - nscb, clockdata.mday, clockdata.month, clockdata.year, clockdata.hour, clockdata.min, clockdata.sec, - nscb->tv.Microseconds, nscb->callback, nscb->p); + NSLOG(netsurf, INFO, + "nscb: %p, at %d-%d-%d %d:%d:%d.%d, callback: %p, %p", + 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); diff --git a/frontends/amiga/version.c b/frontends/amiga/version.c index c3cd9e2b5..61fbd7176 100644 --- a/frontends/amiga/version.c +++ b/frontends/amiga/version.c @@ -25,7 +25,7 @@ * problems created by "0" not being a valid AmigaOS revision number. */ #define NETSURF_VERSION_MAJOR "3" -#define NETSURF_VERSION_MINOR_EXTERNAL "7" +#define NETSURF_VERSION_MINOR_EXTERNAL "8" #if defined(CI_BUILD) #define NETSURF_VERSION_MINOR CI_BUILD #else |