summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
committerVincent Sanders <vince@kyllikki.org>2015-05-28 16:08:46 +0100
commitc105738fa36bb2400adc47399c5b878d252d1c86 (patch)
tree138eeb449e1bf51ee1726b5f820740aada0ccd0b /amiga
parent20f2c86a511f7913cf858e7bd3668b0b59663ba0 (diff)
downloadnetsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.gz
netsurf-c105738fa36bb2400adc47399c5b878d252d1c86.tar.bz2
Change LOG() macro to be varadic
This changes the LOG macro to be varadic removing the need for all callsites to have double bracketing and allows for future improvement on how we use the logging macros. The callsites were changed with coccinelle and the changes checked by hand. Compile tested for several frontends but not all. A formatting annotation has also been added which allows the compiler to check the parameters and types passed to the logging.
Diffstat (limited to 'amiga')
-rw-r--r--amiga/arexx.c2
-rw-r--r--amiga/drag.c2
-rw-r--r--amiga/dt_anim.c14
-rw-r--r--amiga/dt_picture.c6
-rw-r--r--amiga/dt_sound.c16
-rw-r--r--amiga/filetype.c8
-rw-r--r--amiga/font.c26
-rw-r--r--amiga/font_bitmap.c2
-rw-r--r--amiga/font_scan.c16
-rw-r--r--amiga/fs_backing_store.c6
-rw-r--r--amiga/gui.c59
-rwxr-xr-xamiga/misc.c2
-rw-r--r--amiga/os3support.c12
-rw-r--r--amiga/plotters.c44
-rw-r--r--amiga/plugin_hack.c18
-rwxr-xr-xamiga/schedule.c4
16 files changed, 115 insertions, 122 deletions
diff --git a/amiga/arexx.c b/amiga/arexx.c
index 3b386d3ad..45f35f051 100644
--- a/amiga/arexx.c
+++ b/amiga/arexx.c
@@ -147,7 +147,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));
+ LOG("Executing script: %s", full_script_path);
IDoMethod(arexx_obj, AM_EXECUTE, full_script_path, NULL, NULL, NULL, NULL, NULL);
UnLock(lock);
}
diff --git a/amiga/drag.c b/amiga/drag.c
index 924deed4f..7aef426d0 100644
--- a/amiga/drag.c
+++ b/amiga/drag.c
@@ -183,7 +183,7 @@ void ami_drag_save(struct Window *win)
break;
default:
- LOG(("Unsupported drag save operation %ld",drag_save));
+ LOG("Unsupported drag save operation %ld", drag_save);
break;
}
diff --git a/amiga/dt_anim.c b/amiga/dt_anim.c
index 723bd1348..d6f1f3652 100644
--- a/amiga/dt_anim.c
+++ b/amiga/dt_anim.c
@@ -160,7 +160,7 @@ nserror amiga_dt_anim_create(const content_handler *handler,
bool amiga_dt_anim_convert(struct content *c)
{
- LOG(("amiga_dt_anim_convert"));
+ LOG("amiga_dt_anim_convert");
amiga_dt_anim_content *plugin = (amiga_dt_anim_content *) c;
union content_msg_data msg_data;
@@ -244,7 +244,7 @@ void amiga_dt_anim_destroy(struct content *c)
{
amiga_dt_anim_content *plugin = (amiga_dt_anim_content *) c;
- LOG(("amiga_dt_anim_destroy"));
+ LOG("amiga_dt_anim_destroy");
if (plugin->bitmap != NULL)
amiga_bitmap_destroy(plugin->bitmap);
@@ -261,7 +261,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"));
+ LOG("amiga_dt_anim_redraw");
if (data->repeat_x)
flags |= BITMAPF_REPEAT_X;
@@ -285,20 +285,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"));
+ LOG("amiga_dt_anim_open");
return;
}
void amiga_dt_anim_close(struct content *c)
{
- LOG(("amiga_dt_anim_close"));
+ LOG("amiga_dt_anim_close");
return;
}
void amiga_dt_anim_reformat(struct content *c, int width, int height)
{
- LOG(("amiga_dt_anim_reformat"));
+ LOG("amiga_dt_anim_reformat");
return;
}
@@ -307,7 +307,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"));
+ LOG("amiga_dt_anim_clone");
plugin = calloc(1, sizeof(amiga_dt_anim_content));
if (plugin == NULL)
diff --git a/amiga/dt_picture.c b/amiga/dt_picture.c
index b5c3ba5d0..b3dbb3481 100644
--- a/amiga/dt_picture.c
+++ b/amiga/dt_picture.c
@@ -172,7 +172,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"));
+ LOG("amiga_dt_picture_cache_convert");
union content_msg_data msg_data;
UBYTE *bm_buffer;
@@ -208,7 +208,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"));
+ LOG("amiga_dt_picture_convert");
int width, height;
char *title;
@@ -254,7 +254,7 @@ nserror amiga_dt_picture_clone(const struct content *old, struct content **newc)
struct content *adt;
nserror error;
- LOG(("amiga_dt_picture_clone"));
+ LOG("amiga_dt_picture_clone");
adt = calloc(1, sizeof(struct content));
if (adt == NULL)
diff --git a/amiga/dt_sound.c b/amiga/dt_sound.c
index 2823178e2..6c49f0960 100644
--- a/amiga/dt_sound.c
+++ b/amiga/dt_sound.c
@@ -72,7 +72,7 @@ static const content_handler amiga_dt_sound_content_handler = {
static void amiga_dt_sound_play(Object *dto)
{
- LOG(("Playing..."));
+ LOG("Playing...");
IDoMethod(dto, DTM_TRIGGER, NULL, STM_PLAY, NULL);
}
@@ -122,7 +122,7 @@ nserror amiga_dt_sound_create(const content_handler *handler,
amiga_dt_sound_content *plugin;
nserror error;
- LOG(("amiga_dt_sound_create"));
+ LOG("amiga_dt_sound_create");
plugin = calloc(1, sizeof(amiga_dt_sound_content));
if (plugin == NULL)
@@ -142,7 +142,7 @@ nserror amiga_dt_sound_create(const content_handler *handler,
bool amiga_dt_sound_convert(struct content *c)
{
- LOG(("amiga_dt_sound_convert"));
+ LOG("amiga_dt_sound_convert");
amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c;
int width = 50, height = 50;
@@ -176,7 +176,7 @@ void amiga_dt_sound_destroy(struct content *c)
{
amiga_dt_sound_content *plugin = (amiga_dt_sound_content *) c;
- LOG(("amiga_dt_sound_destroy"));
+ LOG("amiga_dt_sound_destroy");
DisposeDTObject(plugin->dto);
@@ -194,7 +194,7 @@ bool amiga_dt_sound_redraw(struct content *c,
.stroke_width = 1,
};
- LOG(("amiga_dt_sound_redraw"));
+ LOG("amiga_dt_sound_redraw");
/* this should be some sort of play/stop control */
@@ -215,7 +215,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"));
+ LOG("amiga_dt_sound_open");
plugin->immediate = false;
@@ -223,7 +223,7 @@ void amiga_dt_sound_open(struct content *c, struct browser_window *bw,
{
do
{
- LOG(("%s = %s", param->name, param->value));
+ LOG("%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) &&
@@ -244,7 +244,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"));
+ LOG("amiga_dt_sound_clone");
plugin = calloc(1, sizeof(amiga_dt_sound_content));
if (plugin == NULL)
diff --git a/amiga/filetype.c b/amiga/filetype.c
index aa3e29620..4419d712f 100644
--- a/amiga/filetype.c
+++ b/amiga/filetype.c
@@ -176,7 +176,7 @@ nserror ami_mime_init(const char *mimefile)
struct nsObject *node;
struct ami_mime_entry *mimeentry;
- LOG(("mimetypes file: %s", mimefile));
+ LOG("mimetypes file: %s", mimefile);
if(ami_mime_list == NULL)
ami_mime_list = NewObjList();
@@ -635,10 +635,6 @@ 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) : ""));
+ 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) : "");
};
}
diff --git a/amiga/font.c b/amiga/font.c
index 32f12f272..6d5200f2f 100644
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -361,14 +361,14 @@ static struct ami_font_node *ami_font_open(const char *font)
return nodedata;
}
- LOG(("Font cache miss: %s", font));
+ LOG("Font cache miss: %s", font);
nodedata = AllocVecTagList(sizeof(struct ami_font_node), NULL);
nodedata->font = OpenOutlineFont(font, &ami_diskfontlib_list, OFF_OPEN);
if(!nodedata->font)
{
- LOG(("Requested font not found: %s", font));
+ LOG("Requested font not found: %s", font);
warn_user("CompError", font);
FreeVec(nodedata);
return NULL;
@@ -376,21 +376,21 @@ static struct ami_font_node *ami_font_open(const char *font)
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));
+ LOG("Bold font defined for %s is %s", font, nodedata->bold);
else
- LOG(("Warning: No designed bold font defined for %s", font));
+ LOG("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));
+ LOG("Italic font defined for %s is %s", font, nodedata->italic);
else
- LOG(("Warning: No designed italic font defined for %s", font));
+ LOG("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));
+ LOG("Bold-italic font defined for %s is %s", font, nodedata->bolditalic);
else
- LOG(("Warning: No designed bold-italic font defined for %s", font));
+ LOG("Warning: No designed bold-italic font defined for %s", font);
GetSysTime(&nodedata->lastused);
@@ -883,7 +883,7 @@ void ami_init_fonts(void)
void ami_close_fonts(void)
{
- LOG(("Cleaning up font cache"));
+ LOG("Cleaning up font cache");
FreeObjList(ami_font_list);
ami_font_list = NULL;
ami_font_finiscanner();
@@ -915,8 +915,7 @@ static void ami_font_cleanup(struct MinList *ami_font_list)
SubTime(&curtime, &fnode->lastused);
if(curtime.Seconds > 300)
{
- LOG(("Freeing %s not used for %d seconds",
- node->dtz_Node.ln_Name, curtime.Seconds));
+ LOG("Freeing %s not used for %d seconds", node->dtz_Node.ln_Name, curtime.Seconds);
DelObject(node);
}
} while((node=nnode));
@@ -933,7 +932,7 @@ void ami_font_setdevicedpi(int id)
ULONG xdpi = nsoption_int(screen_ydpi);
if(nsoption_bool(use_diskfont) == true) {
- LOG(("WARNING: Using diskfont.library for text. Forcing DPI to 72."));
+ LOG("WARNING: Using diskfont.library for text. Forcing DPI to 72.");
nsoption_int(screen_ydpi) = 72;
}
@@ -959,8 +958,7 @@ void ami_font_setdevicedpi(int id)
xdpi = (yres * ydpi) / xres;
- LOG(("XDPI = %ld, YDPI = %ld (DisplayInfo resolution %ld x %ld, corrected %ld x %ld)",
- xdpi, ydpi, dinfo.Resolution.x, dinfo.Resolution.y, xres, yres));
+ LOG("XDPI = %ld, YDPI = %ld (DisplayInfo resolution %ld x %ld, corrected %ld x %ld)", xdpi, ydpi, dinfo.Resolution.x, dinfo.Resolution.y, xres, yres);
}
}
}
diff --git a/amiga/font_bitmap.c b/amiga/font_bitmap.c
index 8f142ae6b..90277d6e7 100644
--- a/amiga/font_bitmap.c
+++ b/amiga/font_bitmap.c
@@ -84,7 +84,7 @@ static struct TextFont *ami_font_bm_open(struct RastPort *rp, const plot_font_st
if((font = ASPrintf("%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));
+ LOG("font: %s/%d", tattr.ta_Name, tattr.ta_YSize);
if((bmfont = OpenDiskFont(&tattr))) {
SetRPAttrs(rp, RPTAG_Font, bmfont, TAG_DONE);
}
diff --git a/amiga/font_scan.c b/amiga/font_scan.c
index 95eacaadb..930a15020 100644
--- a/amiga/font_scan.c
+++ b/amiga/font_scan.c
@@ -254,7 +254,7 @@ static ULONG ami_font_scan_font(const char *fontname, lwc_string **glypharray)
}
#ifdef __amigaos4__
if(EObtainInfo(AMI_OFONT_ENGINE, OT_UnicodeRanges, &unicoderanges, TAG_END) == 0) {
- if(unicoderanges & UCR_SURROGATES) LOG(("%s supports UTF-16 surrogates", fontname));
+ if(unicoderanges & UCR_SURROGATES) LOG("%s supports UTF-16 surrogates", fontname);
EReleaseInfo(AMI_OFONT_ENGINE,
OT_UnicodeRanges, unicoderanges,
TAG_END);
@@ -287,10 +287,10 @@ static ULONG ami_font_scan_fonts(struct MinList *list,
do {
nnode = (struct nsObject *)GetSucc((struct Node *)node);
ami_font_scan_gui_update(win, node->dtz_Node.ln_Name, font_num, total);
- LOG(("Scanning %s", node->dtz_Node.ln_Name));
+ LOG("Scanning %s", node->dtz_Node.ln_Name);
found = ami_font_scan_font(node->dtz_Node.ln_Name, glypharray);
total += found;
- LOG(("Found %ld new glyphs (total = %ld)", found, total));
+ LOG("Found %ld new glyphs (total = %ld)", found, total);
font_num++;
} while((node = nnode));
@@ -339,7 +339,7 @@ static ULONG ami_font_scan_list(struct MinList *list)
if(node) {
node->dtz_Node.ln_Name = strdup(af[i].af_Attr.ta_Name);
found++;
- LOG(("Added %s", af[i].af_Attr.ta_Name));
+ LOG("Added %s", af[i].af_Attr.ta_Name);
}
}
}
@@ -377,7 +377,7 @@ static ULONG ami_font_scan_load(const char *filename, lwc_string **glypharray)
rargs = AllocDosObjectTags(DOS_RDARGS, TAG_DONE);
if((fh = FOpen(filename, MODE_OLDFILE, 0))) {
- LOG(("Loading font glyph cache from %s", filename));
+ LOG("Loading font glyph cache from %s", filename);
while(FGets(fh, (STRPTR)&buffer, 256) != 0)
{
@@ -418,7 +418,7 @@ void ami_font_scan_save(const char *filename, lwc_string **glypharray)
BPTR fh = 0;
if((fh = FOpen(filename, MODE_NEWFILE, 0))) {
- LOG(("Writing font glyph cache to %s", filename));
+ LOG("Writing font glyph cache to %s", filename);
FPrintf(fh, "; This file is auto-generated. To re-create the cache, delete this file.\n");
FPrintf(fh, "; This file is parsed using ReadArgs() with the following template:\n");
FPrintf(fh, "; CODE/A,FONT/A\n;\n");
@@ -498,7 +498,7 @@ void ami_font_scan_init(const char *filename, bool force_scan, bool save,
if(nsoption_bool(font_unicode_only) == false)
entries += ami_font_scan_list(list);
- LOG(("Found %ld fonts", entries));
+ LOG("Found %ld fonts", entries);
win = ami_font_scan_gui_open(entries);
found = ami_font_scan_fonts(list, win, glypharray);
@@ -511,6 +511,6 @@ void ami_font_scan_init(const char *filename, bool force_scan, bool save,
}
}
- LOG(("Initialised with %ld glyphs", found));
+ LOG("Initialised with %ld glyphs", found);
}
diff --git a/amiga/fs_backing_store.c b/amiga/fs_backing_store.c
index b6bd54c2b..9e7672eb1 100644
--- a/amiga/fs_backing_store.c
+++ b/amiga/fs_backing_store.c
@@ -310,7 +310,7 @@ static nserror ami_backing_store_finalise(void)
nserror error = ami_backing_store_send_reply(AMI_BSM_FINALISE, NULL, tempmsgport);
if(error != NSERROR_OK) return error;
- LOG(("Waiting for backing store process to exit..."));
+ LOG("Waiting for backing store process to exit...");
WaitPort(tempmsgport);
@@ -355,7 +355,7 @@ ami_backing_store_initialise(const struct llcache_store_parameters *parameters)
return NSERROR_NOMEM;
}
- LOG(("Waiting for backing store process to start up..."));
+ LOG("Waiting for backing store process to start up...");
WaitPort(tempmsgport);
@@ -365,7 +365,7 @@ ami_backing_store_initialise(const struct llcache_store_parameters *parameters)
ReplyMsg((struct Message *)msg);
FreeSysObject(ASOT_PORT, tempmsgport);
- LOG(("Backing store process started. Error code: %d", error));
+ LOG("Backing store process started. Error code: %d", error);
return error;
}
diff --git a/amiga/gui.c b/amiga/gui.c
index 41ecd3399..7f4677ece 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -304,7 +304,7 @@ bool ami_gui_map_filename(char **remapped, const char *path, const char *file, c
}
if(found == false) *remapped = strdup(file);
- else LOG(("Remapped %s to %s in path %s using %s", file, *remapped, path, map));
+ else LOG("Remapped %s to %s in path %s using %s", file, *remapped, path, map);
free(mapfile);
@@ -321,7 +321,7 @@ static bool ami_gui_check_resource(char *fullpath, const char *file)
ami_gui_map_filename(&remapped, fullpath, file, "Resource.map");
netsurf_mkpath(&fullpath, &fullpath_len, 2, fullpath, remapped);
- LOG(("Checking for %s", fullpath));
+ LOG("Checking for %s", fullpath);
lock = Lock(fullpath, ACCESS_READ);
if(lock)
@@ -330,7 +330,7 @@ static bool ami_gui_check_resource(char *fullpath, const char *file)
found = true;
}
- if(found) LOG(("Found %s", fullpath));
+ if(found) LOG("Found %s", fullpath);
free(remapped);
return found;
@@ -727,7 +727,7 @@ static void ami_openscreen(void)
}
if(screen_signal == -1) screen_signal = AllocSignal(-1);
- LOG(("Screen signal %d", screen_signal));
+ LOG("Screen signal %d", screen_signal);
scrn = OpenScreenTags(NULL,
SA_DisplayID, id,
SA_Title, ami_gui_get_screen_title(),
@@ -800,12 +800,12 @@ static void ami_gui_commandline(int *argc, char **argv)
if((args = ReadArgs(template, rarray, NULL))) {
if(rarray[A_URL]) {
- LOG(("URL %s specified on command line", rarray[A_URL]));
+ LOG("URL %s specified on command line", rarray[A_URL]);
temp_homepage_url = ami_to_utf8_easy((char *)rarray[A_URL]);
}
if(rarray[A_FORCE]) {
- LOG(("FORCE specified on command line"));
+ LOG("FORCE specified on command line");
cli_force = true;
}
@@ -823,7 +823,7 @@ static void ami_gui_commandline(int *argc, char **argv)
char **p = (char **)rarray[A_NSOPTS];
do {
- LOG(("Arg [%d] assigned to NSOPTS/M by ReadArgs: %s", new_argc, *p));
+ LOG("Arg [%d] assigned to NSOPTS/M by ReadArgs: %s", new_argc, *p);
new_argc++;
p++;
} while(*p != NULL);
@@ -844,7 +844,7 @@ static void ami_gui_commandline(int *argc, char **argv)
FreeArgs(args);
} else {
- LOG(("ReadArgs failed to parse command line"));
+ LOG("ReadArgs failed to parse command line");
}
}
@@ -2731,7 +2731,7 @@ static void ami_handle_applib(void)
{
struct ApplicationCustomMsg *applibcustmsg =
(struct ApplicationCustomMsg *)applibmsg;
- LOG(("Ringhio BackMsg received: %s", applibcustmsg->customMsg));
+ LOG("Ringhio BackMsg received: %s", applibcustmsg->customMsg);
OpenWorkbenchObjectA(applibcustmsg->customMsg, NULL);
}
break;
@@ -2765,7 +2765,7 @@ void ami_get_msg(void)
NULL, (unsigned int *)&signalmask) != -1) {
signal = signalmask;
} else {
- LOG(("waitselect() returned error"));
+ LOG("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.
@@ -2975,12 +2975,12 @@ static void ami_gui_close_screen(struct Screen *scrn, BOOL locked_screen, BOOL d
/* If this is our own screen, wait for visitor windows to close */
if(screen_signal != -1) {
ULONG scrnsig = 1 << screen_signal;
- LOG(("Waiting for visitor windows to close... (signal)"));
+ LOG("Waiting for visitor windows to close... (signal)");
Wait(scrnsig);
}
while (CloseScreen(scrn) == FALSE) {
- LOG(("Waiting for visitor windows to close... (polling)"));
+ LOG("Waiting for visitor windows to close... (polling)");
Delay(50);
}
@@ -3024,19 +3024,19 @@ static void gui_quit(void)
ami_close_fonts();
ami_help_free();
- LOG(("Closing screen"));
+ LOG("Closing screen");
ami_gui_close_screen(scrn, locked_screen, FALSE);
if(nsscreentitle) FreeVec(nsscreentitle);
- LOG(("Freeing menu items"));
+ LOG("Freeing menu items");
ami_context_menu_free();
ami_menu_free_glyphs();
- LOG(("Freeing mouse pointers"));
+ LOG("Freeing mouse pointers");
ami_mouse_pointers_free();
- LOG(("Freeing clipboard"));
+ LOG("Freeing clipboard");
ami_clipboard_free();
- LOG(("Removing scheduler process"));
+ LOG("Removing scheduler process");
ami_scheduler_process_delete();
FreeSysObject(ASOT_PORT, appport);
@@ -3063,7 +3063,7 @@ char *ami_gui_get_cache_favicon_name(nsurl *url, bool only_if_avail)
BPTR lock = 0;
if ((filename = ASPrintf("%s/%x", current_user_faviconcache, nsurl_hash(url)))) {
- LOG(("favicon cache location: %s", filename));
+ LOG("favicon cache location: %s", filename);
if (only_if_avail == true) {
if((lock = Lock(filename, ACCESS_READ))) {
@@ -3999,7 +3999,7 @@ gui_window_create(struct browser_window *bw,
BitMapEnd;
}
- LOG(("Creating window object"));
+ LOG("Creating window object");
g->shared->objects[OID_MAIN] = WindowObj,
WA_ScreenTitle, ami_gui_get_screen_title(),
@@ -4266,11 +4266,11 @@ gui_window_create(struct browser_window *bw,
EndWindow;
}
- LOG(("Opening window"));
+ LOG("Opening window");
g->shared->win = (struct Window *)RA_OpenWindow(g->shared->objects[OID_MAIN]);
- LOG(("Window opened, adding border gadgets"));
+ LOG("Window opened, adding border gadgets");
if(!g->shared->win)
{
@@ -4609,7 +4609,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"));
+ LOG("Ignoring deferred box redraw queue");
}
node = (struct nsObject *)GetHead((struct List *)g->deferred_rects);
@@ -4653,7 +4653,7 @@ struct nsObject *nnode;
(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"));
+ LOG("Removing queued redraw that is a subset of new box redraw");
DelObject(node);
/* Don't return - we might find more */
}
@@ -4674,7 +4674,7 @@ static void gui_window_update_box(struct gui_window *g, const struct rect *rect)
nsobj = AddObject(g->deferred_rects, AMINS_RECT);
nsobj->objstruct = deferred_rect;
} else {
- LOG(("Ignoring duplicate or subset of queued box redraw"));
+ LOG("Ignoring duplicate or subset of queued box redraw");
}
ami_schedule_redraw(g->shared, false);
}
@@ -5243,7 +5243,7 @@ Object *ami_gui_splash_open(void)
LayoutEnd,
EndWindow;
- LOG(("Attempting to open splash window..."));
+ LOG("Attempting to open splash window...");
win = RA_OpenWindow(win_obj);
GetAttrs(bm_obj, IA_Top, &top,
@@ -5307,14 +5307,14 @@ void ami_gui_splash_close(Object *win_obj)
{
if(win_obj == NULL) return;
- LOG(("Closing splash window"));
+ LOG("Closing splash window");
DisposeObject(win_obj);
}
static void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl,
struct form_control *gadget)
{
- LOG(("File open dialog request for %p/%p", g, gadget));
+ LOG("File open dialog request for %p/%p", g, gadget);
if(AslRequestTags(filereq,
ASLFR_Window, g->shared->win,
@@ -5445,8 +5445,7 @@ int main(int argc, char** argv)
popupmenu_lib_ok = FALSE;
#ifdef __amigaos4__
if((PopupMenuBase = OpenLibrary("popupmenu.library", 53))) {
- LOG(("popupmenu.library v%d.%d",
- PopupMenuBase->lib_Version, PopupMenuBase->lib_Revision));
+ LOG("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);
@@ -5464,7 +5463,7 @@ int main(int argc, char** argv)
user = GetVar("user", temp, 1024, GVF_GLOBAL_ONLY);
current_user = ASPrintf("%s", (user == -1) ? "Default" : temp);
- LOG(("User: %s", current_user));
+ LOG("User: %s", current_user);
current_user_dir = ASPrintf("PROGDIR:Users/%s", current_user);
if((lock = CreateDirTree(current_user_dir)))
diff --git a/amiga/misc.c b/amiga/misc.c
index 850382617..141994a31 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -51,7 +51,7 @@ static LONG ami_misc_req(const char *message, uint32 type)
{
LONG ret = 0;
- LOG(("%s", message));
+ LOG("%s", message);
#ifdef __amigaos4__
ret = TimedDosRequesterTags(
TDR_TitleString, messages_get("NetSurf"),
diff --git a/amiga/os3support.c b/amiga/os3support.c
index 243578540..cea466c94 100644
--- a/amiga/os3support.c
+++ b/amiga/os3support.c
@@ -67,7 +67,7 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl
/*\todo we should be opening the .font file too and checking
* for the magic bytes to indicate this is an outline font.
*/
- LOG(("Unable to open %s", otagpath));
+ LOG("Unable to open %s", otagpath);
FreeVec(otagpath);
return NULL;
}
@@ -75,7 +75,7 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl
size = GetFileSize(fh);
buffer = (struct TagItem *)AllocVec(size, MEMF_ANY);
if(buffer == NULL) {
- LOG(("Unable to allocate memory"));
+ LOG("Unable to allocate memory");
Close(fh);
FreeVec(otagpath);
return NULL;
@@ -87,7 +87,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"));
+ LOG("Invalid OTAG file");
FreeVec(buffer);
FreeVec(otagpath);
return NULL;
@@ -102,10 +102,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));
+ LOG("Using font engine %s", ti->ti_Data);
fname = ASPrintf("%s.library", ti->ti_Data);
} else {
- LOG(("Cannot find OT_Engine tag"));
+ LOG("Cannot find OT_Engine tag");
FreeVec(buffer);
FreeVec(otagpath);
return NULL;
@@ -114,7 +114,7 @@ struct OutlineFont *OpenOutlineFont(STRPTR fileName, struct List *list, ULONG fl
BulletBase = OpenLibrary(fname, 0L);
if(BulletBase == NULL) {
- LOG(("Unable to open %s", fname));
+ LOG("Unable to open %s", fname);
FreeVec(buffer);
FreeVec(fname);
FreeVec(otagpath);
diff --git a/amiga/plotters.c b/amiga/plotters.c
index fa5f661d4..202d1b879 100644
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -99,7 +99,7 @@ void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height)
struct BitMap *friend = NULL;
depth = GetBitMapAttr(scrn->RastPort.BitMap, BMA_DEPTH);
- LOG(("Screen depth = %d", depth));
+ LOG("Screen depth = %d", depth);
if(depth < 16) {
palette_mapped = true;
@@ -207,7 +207,7 @@ 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) LOG("WARNING: Cannot allocate pen for ABGR:%lx", colr);
if(shared_pens != NULL) {
if((node = (struct ami_plot_pen *)AllocVecTagList(sizeof(struct ami_plot_pen), NULL))) {
@@ -280,7 +280,7 @@ void ami_plot_clear_bbox(struct RastPort *rp, struct IBox *bbox)
static bool ami_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *style)
{
#ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_rectangle()"));
+ LOG("[ami_plotter] Entered ami_rectangle()");
#endif
if (style->fill_type != PLOT_OP_TYPE_NONE) {
@@ -325,7 +325,7 @@ static bool ami_rectangle(int x0, int y0, int x1, int y1, const plot_style_t *st
static bool ami_line(int x0, int y0, int x1, int y1, const plot_style_t *style)
{
#ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_line()"));
+ LOG("[ami_plotter] Entered ami_line()");
#endif
glob->rp->PenWidth = style->stroke_width;
@@ -360,21 +360,21 @@ static bool ami_line(int x0, int y0, int x1, int y1, const plot_style_t *style)
static bool ami_polygon(const int *p, unsigned int n, const plot_style_t *style)
{
#ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_polygon()"));
+ LOG("[ami_plotter] Entered ami_polygon()");
#endif
ami_plot_setapen(glob->rp, style->fill_colour);
if(AreaMove(glob->rp,p[0],p[1]) == -1)
- LOG(("AreaMove: vector list full"));
+ LOG("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"));
+ LOG("AreaDraw: vector list full");
}
if(AreaEnd(glob->rp) == -1)
- LOG(("AreaEnd: error"));
+ LOG("AreaEnd: error");
return true;
}
@@ -383,7 +383,7 @@ static bool ami_polygon(const int *p, unsigned int n, const plot_style_t *style)
static bool ami_clip(const struct rect *clip)
{
#ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_clip()"));
+ LOG("[ami_plotter] Entered ami_clip()");
#endif
struct Region *reg = NULL;
@@ -411,7 +411,7 @@ static bool ami_text(int x, int y, const char *text, size_t length,
const plot_font_style_t *fstyle)
{
#ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_text()"));
+ LOG("[ami_plotter] Entered ami_text()");
#endif
bool aa = true;
@@ -428,7 +428,7 @@ static bool ami_text(int x, int y, const char *text, size_t length,
static bool ami_disc(int x, int y, int radius, const plot_style_t *style)
{
#ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_disc()"));
+ LOG("[ami_plotter] Entered ami_disc()");
#endif
if (style->fill_type != PLOT_OP_TYPE_NONE) {
@@ -473,7 +473,7 @@ static void ami_arc_gfxlib(int x, int y, int radius, int angle1, int angle2)
static bool ami_arc(int x, int y, int radius, int angle1, int angle2, const plot_style_t *style)
{
#ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_arc()"));
+ LOG("[ami_plotter] Entered ami_arc()");
#endif
if (angle2 < angle1) angle2 += 360;
@@ -487,7 +487,7 @@ static bool ami_arc(int x, int y, int radius, int angle1, int angle2, const plot
static bool ami_bitmap(int x, int y, int width, int height, struct bitmap *bitmap)
{
#ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_bitmap()"));
+ LOG("[ami_plotter] Entered ami_bitmap()");
#endif
struct BitMap *tbm;
@@ -504,7 +504,7 @@ static bool ami_bitmap(int x, int y, int width, int height, struct bitmap *bitma
if(!tbm) return true;
#ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] ami_bitmap() got native bitmap"));
+ LOG("[ami_plotter] ami_bitmap() got native bitmap");
#endif
#ifdef __amigaos4__
@@ -577,7 +577,7 @@ static bool ami_bitmap_tile(int x, int y, int width, int height,
bitmap_flags_t flags)
{
#ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_bitmap_tile()"));
+ LOG("[ami_plotter] Entered ami_bitmap_tile()");
#endif
int xf,yf,xm,ym,oy,ox;
@@ -776,14 +776,14 @@ static bool ami_path(const float *p, unsigned int n, colour fill, float width,
struct bez_point start_p = {0, 0}, cur_p = {0, 0}, p_a, p_b, p_c, p_r;
#ifdef AMI_PLOTTER_DEBUG
- LOG(("[ami_plotter] Entered ami_path()"));
+ LOG("[ami_plotter] Entered ami_path()");
#endif
if (n == 0)
return true;
if (p[0] != PLOTTER_PATH_MOVE) {
- LOG(("Path does not start with move"));
+ LOG("Path does not start with move");
return false;
}
@@ -804,7 +804,7 @@ static bool ami_path(const float *p, unsigned int n, colour fill, float width,
if (p[i] == PLOTTER_PATH_MOVE) {
if (fill != NS_TRANSPARENT) {
if(AreaMove(glob->rp, p[i+1], p[i+2]) == -1)
- LOG(("AreaMove: vector list full"));
+ LOG("AreaMove: vector list full");
} else {
Move(glob->rp, p[i+1], p[i+2]);
}
@@ -817,7 +817,7 @@ static bool ami_path(const float *p, unsigned int n, colour fill, float width,
} else if (p[i] == PLOTTER_PATH_CLOSE) {
if (fill != NS_TRANSPARENT) {
if(AreaEnd(glob->rp) == -1)
- LOG(("AreaEnd: error"));
+ LOG("AreaEnd: error");
} else {
Draw(glob->rp, start_p.x, start_p.y);
}
@@ -825,7 +825,7 @@ static bool ami_path(const float *p, unsigned int n, colour fill, float width,
} else if (p[i] == PLOTTER_PATH_LINE) {
if (fill != NS_TRANSPARENT) {
if(AreaDraw(glob->rp, p[i+1], p[i+2]) == -1)
- LOG(("AreaDraw: vector list full"));
+ LOG("AreaDraw: vector list full");
} else {
Draw(glob->rp, p[i+1], p[i+2]);
}
@@ -844,7 +844,7 @@ static bool ami_path(const float *p, unsigned int n, colour fill, float width,
ami_bezier(&cur_p, &p_a, &p_b, &p_c, t, &p_r);
if (fill != NS_TRANSPARENT) {
if(AreaDraw(glob->rp, p_r.x, p_r.y) == -1)
- LOG(("AreaDraw: vector list full"));
+ LOG("AreaDraw: vector list full");
} else {
Draw(glob->rp, p_r.x, p_r.y);
}
@@ -853,7 +853,7 @@ static bool ami_path(const float *p, unsigned int n, colour fill, float width,
cur_p.y = p_c.y;
i += 7;
} else {
- LOG(("bad path command %f", p[i]));
+ LOG("bad path command %f", p[i]);
/* End path for safety if using Area commands */
if (fill != NS_TRANSPARENT) {
AreaEnd(glob->rp);
diff --git a/amiga/plugin_hack.c b/amiga/plugin_hack.c
index 23f4d3454..ad4bfaa3e 100644
--- a/amiga/plugin_hack.c
+++ b/amiga/plugin_hack.c
@@ -79,7 +79,7 @@ nserror amiga_plugin_hack_init(void)
if(node)
{
- LOG(("plugin_hack registered %s",lwc_string_data(type)));
+ LOG("plugin_hack registered %s", lwc_string_data(type));
error = content_factory_register_handler(
lwc_string_data(type),
@@ -120,7 +120,7 @@ nserror amiga_plugin_hack_create(const content_handler *handler,
bool amiga_plugin_hack_convert(struct content *c)
{
- LOG(("amiga_plugin_hack_convert"));
+ LOG("amiga_plugin_hack_convert");
content_set_ready(c);
content_set_done(c);
@@ -134,7 +134,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));
+ LOG("amiga_plugin_hack_destroy %p", plugin);
return;
}
@@ -150,7 +150,7 @@ bool amiga_plugin_hack_redraw(struct content *c,
.stroke_width = 1,
};
- LOG(("amiga_plugin_hack_redraw"));
+ LOG("amiga_plugin_hack_redraw");
ctx->plot->rectangle(data->x, data->y, data->x + data->width,
data->y + data->height, &pstyle);
@@ -173,7 +173,7 @@ 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))));
+ LOG("amiga_plugin_hack_open %s", nsurl_access(content_get_url(c)));
if(c)
{
@@ -187,13 +187,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"));
+ LOG("amiga_plugin_hack_close");
return;
}
void amiga_plugin_hack_reformat(struct content *c, int width, int height)
{
- LOG(("amiga_plugin_hack_reformat"));
+ LOG("amiga_plugin_hack_reformat");
c->width = width;
c->height = height;
@@ -206,7 +206,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"));
+ LOG("amiga_plugin_hack_clone");
plugin = calloc(1, sizeof(amiga_plugin_hack_content));
if (plugin == NULL)
@@ -253,7 +253,7 @@ void amiga_plugin_hack_execute(struct hlcache_handle *c)
if(full_cmd)
{
#ifdef __amigaos4__
- LOG(("Attempting to execute %s", full_cmd));
+ LOG("Attempting to execute %s", full_cmd);
in = Open("NIL:", MODE_OLDFILE);
out = Open("NIL:", MODE_NEWFILE);
diff --git a/amiga/schedule.c b/amiga/schedule.c
index 494b8b027..39b4fd9b6 100755
--- a/amiga/schedule.c
+++ b/amiga/schedule.c
@@ -554,7 +554,7 @@ nserror ami_scheduler_process_create(struct MsgPort *nsmsgport)
return NSERROR_NOMEM;
}
- LOG(("Waiting for scheduler process to start up..."));
+ LOG("Waiting for scheduler process to start up...");
WaitPort(nsmsgport);
struct ami_schedule_message *asmsg = (struct ami_schedule_message *)GetMsg(nsmsgport);
@@ -564,7 +564,7 @@ nserror ami_scheduler_process_create(struct MsgPort *nsmsgport)
ReplyMsg((struct Message *)asmsg);
}
#endif
- LOG(("Scheduler started"));
+ LOG("Scheduler started");
return NSERROR_OK;
}