Commit 15db9127 authored by Andrew Hodgkinson's avatar Andrew Hodgkinson
Browse files

Load balancer pulled apart. DebugLib support. Temporary debug in place.

Detail:
  This is in the middle of some load balancer changes, but I'm checking it
  in as there's a sweeping source code change to use DebugLib. See Global.c
  for full details. Temporary debug code for the load balancer stuff is
  currently held under undocumented area "test".
Admin:
  This build now identifies itself as 2.08 i2-4 and says Pace on the about:
  page. Run for some time with no unexpected problems. Tried a mixture of
  debug levels successfully.

Version 2.08. Not tagged
parent 1c9291d7
......@@ -54,4 +54,8 @@ ahodgkin_208_i2 Intermediate 2.08 build. Printing headers and
features (25-Feb-2000).
ahodgkin_208_i3 Intermediate 2.08 build. Printing headers and
footers now work... (01-Mar-2000).
ahodgkin_208_i4 Intermediate 2.08 build. Various fixes over i3.
ahodgkin_208_i4 Intermediate 2.08 build. Various fixes over i3
(31-May-2000).
ahodgkin_208_i4_2 The Phoenix variant identifies itself as 2.08
i2-4. Source changed to use DebugLib, not that
much else changed (14-Nov-2000).
......@@ -235,7 +235,7 @@ SeeFetches:yes
# high you might want to set UnusedImageLimit.
# FreeRAMLimit - If free memory falls below this amount when a new image is
# to be created, the garbage collection system is run to try
# and get more RAM. The amount is specified in kilobytes.
# and get more RAM. The amount is specified in bytes.
# Only as many images as need to be deleted to maintain the
# required free memory, are deleted. So, use 0 for unlimited
# (UnusedImageLimit becomes the only constraint).
......
<table cellspacing="0" cellpadding="0" border="0">
<tr valign="top">
<td><font size="2"><strong><a href="http://www.cdrom.com/pub/infozip/zlib/">zlib&nbsp;1.1.2</a></strong></font></td>
<td><font size="2"><strong><a href="http://www.freesoftware.com/pub/infozip/zlib/">zlib&nbsp;1.1.2</a></strong></font></td>
<td>
<font size="2">Copyright &copy; 1995&ndash;1998 Jean-loup Gailly and Mark Adler.</font>
</td>
</tr>
<tr valign="top">
<td><font size="2"><strong><a href="http://www.cdrom.com/pub/png/">libpng&nbsp;1.0.0</a></strong></font></td>
<td><font size="2"><strong><a href="http://www.libpng.com/pub/png/">libpng&nbsp;1.0.0</a></strong></font></td>
<td>
<font size="2">
Copyright &copy; 1995, 1996 Guy Eric Schalnat, Group 42, Inc.;
......
......@@ -8,13 +8,13 @@
</td>
</tr>
<tr valign="top">
<td><font size="2"><strong><a href="http://www.cdrom.com/pub/infozip/zlib/">zlib&nbsp;1.1.2</a></strong></font></td>
<td><font size="2"><strong><a href="http://www.freesoftware.com/pub/infozip/zlib/">zlib&nbsp;1.1.2</a></strong></font></td>
<td>
<font size="2">Copyright &copy; 1995&ndash;1998 Jean-loup Gailly and Mark Adler.</font>
</td>
</tr>
<tr valign="top">
<td><font size="2"><strong><a href="http://www.cdrom.com/pub/png/">libpng&nbsp;1.0.0</a></strong></font></td>
<td><font size="2"><strong><a href="http://www.libpng.com/pub/png/">libpng&nbsp;1.0.0</a></strong></font></td>
<td>
<font size="2">
Copyright &copy; 1995, 1996 Guy Eric Schalnat, Group 42, Inc.;
......
......@@ -231,7 +231,6 @@ LeftIndent:38400
# SupportObject - If 'yes', OBJECT, EMBED and APPLET will be handled,
# else if 'no' they will be ignored (so any alternative
# HTML in an OBJECT tag, say, will always be shown).
# SupportJS - Support JavaScript (in JavaScript capable builds only).
# PlugInControl - Controls when Plug-Ins are started, relative to page
# loading - 'never' for never, 'viewed' for when the bit of
# page in which a Plug-In lies is viewed (i.e. redrawn for
......@@ -261,7 +260,6 @@ MaxImages:2
SupportPJPEG:both
SupportFrames:yes
SupportObject:yes
SupportJS:no
PlugInControl:asap
ClientPull:yes
SeeFetches:no
......@@ -278,7 +276,7 @@ Faith:sometimes
# high you might want to set UnusedImageLimit.
# FreeRAMLimit - If free memory falls below this amount when a new image is
# to be created, the garbage collection system is run to try
# and get more RAM. The amount is specified in kilobytes.
# and get more RAM. The amount is specified in bytes.
# Only as many images as need to be deleted to maintain the
# required free memory, are deleted. So, use 0 for unlimited
# (UnusedImageLimit becomes the only constraint).
......
......@@ -3,8 +3,8 @@
_TaskName:Phoenix
_SpriName:!phoenix
Version:2.08 (intermediate)
FullName:Acorn Phoenix
Version:2.08 i2-4 (10 Nov 2000)
FullName:Phoenix
DAGen:- General
DAJSc:- JavaScript
......@@ -428,7 +428,7 @@ NoData:The server returned a blank page.
pemptydoc:<html><head><title>Empty document</title></head><body><h2>The server returned an empty document.</h2></body></html>
pabouthdr:<!doctype html public "-//W3C//DTD HTML 3.2//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>About this software</title></head><body bgcolor="#dddddd" text="#000000" background="file:/Phoenix:About/Background"><center><table border="0" cellspacing="2">
paboutbrw:<tr><td colspan="2" align="center"><h2>Acorn Phoenix %%s</h2><tr><td colspan="2" align="center"><h5>Copyright &copy; Acorn Computers Ltd. 1994</h5><tr><td colspan="2"><hr noshade size="2">
paboutbrw:<tr><td colspan="2" align="center"><h2>Phoenix %%s</h2><tr><td colspan="2" align="center"><h5>Copyright &copy; Pace Micro Technology PLC 2000</h5><tr><td colspan="2"><hr noshade size="2">
paboutpl1:<tr><td align="center"><td valign="middle">
paboutpl2:<tr><td align="center" valign="middle"><img src="%%s"><td valign="middle">
paboutpl3:<tr><td align="center" valign="middle"><img src="%%s" width="%%d" height="%%d"><td valign="middle">
......
......@@ -235,7 +235,7 @@ SeeFetches:no
# high you might want to set UnusedImageLimit.
# FreeRAMLimit - If free memory falls below this amount when a new image is
# to be created, the garbage collection system is run to try
# and get more RAM. The amount is specified in kilobytes.
# and get more RAM. The amount is specified in bytes.
# Only as many images as need to be deleted to maintain the
# required free memory, are deleted. So, use 0 for unlimited
# (UnusedImageLimit becomes the only constraint).
......
......@@ -5,11 +5,18 @@
*/
#define Module_MajorVersion_CMHG 2.08
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 31 May 2000
#define Module_Date_CMHG 14 Nov 2000
#define Module_MajorVersion "2.08"
#define Module_Version 208
#define Module_MinorVersion ""
#define Module_Date "31 May 2000"
#define Module_Date "14 Nov 2000"
#define Module_ApplicationDate2 "14-Nov-00"
#define Module_ApplicationDate4 "14-Nov-2000"
#define Module_ComponentName "Browse"
#define Module_ComponentPath "RiscOS/Sources/Apps/Browse"
#define Module_FullVersion "2.08"
#define Module_HelpVersion "2.08 (14 Nov 2000)"
......@@ -44,11 +44,6 @@
#include <tboxlibs/window.h>
#include <tboxlibs/gadgets.h>
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "Utils.h"
......
......@@ -38,11 +38,6 @@
#include <tboxlibs/window.h>
#include <tboxlibs/gadgets.h>
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "Utils.h"
......
......@@ -41,11 +41,6 @@
#include "NestWimp.h"
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "FromROSLib.h"
#include "MiscDefs.h"
......@@ -503,9 +498,7 @@ HStream * browser_find_selectable_top_r(browser_data * b, reformat_cell * cell,
if (!cell || !cell->nlines || !cell->ldata || !cell->cdata) return NULL;
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_top_r: Proceeding for %p, cell %p\n", b, cell);
#endif
dprintf(("KeyC", "browser_find_selectable_top_r: Proceeding for %p, cell %p\n", b, cell));
/* Work out where the visible page region starts and ends */
......@@ -526,9 +519,7 @@ HStream * browser_find_selectable_top_r(browser_data * b, reformat_cell * cell,
ytop = s->yscroll - htop;
ybot = s->yscroll - (s->visible_area.ymax - s->visible_area.ymin) + hbot;
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_top_r: ytop, ybot: -%d, -%d\n",-ytop,-ybot);
#endif
dprintf(("KeyC", "browser_find_selectable_top_r: ytop, ybot: -%d, -%d\n",-ytop,-ybot));
/* Go through the cell's chunks, getting tokens for as long */
/* as the chunk holding lines are in the visible area. */
......@@ -586,9 +577,7 @@ HStream * browser_find_selectable_top_r(browser_data * b, reformat_cell * cell,
while (line < cell->nlines && y_origin + cell->ldata[line].y + cell->ldata[line].h > ybot && !exit)
{
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_top_r: Line %d\n",line);
#endif
dprintf(("KeyC", "browser_find_selectable_top_r: Line %d\n",line));
chunk = cell->ldata[line].chunks;
chunkmax = cell->ldata[line].n + chunk;
......@@ -601,11 +590,8 @@ HStream * browser_find_selectable_top_r(browser_data * b, reformat_cell * cell,
if (!t) break;
#ifdef TRACE
if (tl & (1u<<22))
{
Printf("browser_find_selectable_top_r: Chunk %d of %d, token %p\n", chunk, chunkmax, t);
if (t == last) Printf("browser_find_selectable_top_r: t = last, so won't deal with this chunk\n");
}
dprintf(("KeyC", "browser_find_selectable_top_r: Chunk %d of %d, token %p\n", chunk, chunkmax, t));
if (t == last) dprintf(("KeyC", "browser_find_selectable_top_r: t = last, so won't deal with this chunk\n"));
#endif
/* Several chunks can represent the same token - don't want to */
......@@ -620,9 +606,7 @@ HStream * browser_find_selectable_top_r(browser_data * b, reformat_cell * cell,
if (!*current && CanBeSelected(t) && browser_check_visible(b, s, t))
{
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_top_r: ** Found %p **\n", t);
#endif
dprintf(("KeyC", "browser_find_selectable_top_r: ** Found %p **\n", t));
exit = 1;
break;
......@@ -661,9 +645,7 @@ HStream * browser_find_selectable_top_r(browser_data * b, reformat_cell * cell,
int cellindex;
int xorg, yorg;
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_top_r: Dealing with table\n");
#endif
dprintf(("KeyC", "browser_find_selectable_top_r: Dealing with table\n"));
/* Proceed if the cell array can be found */
......@@ -693,9 +675,7 @@ HStream * browser_find_selectable_top_r(browser_data * b, reformat_cell * cell,
{
c = &cellarray[cellindex];
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_top_r: Cell index %d, cell %p\n",cellindex,cellarray);
#endif
dprintf(("KeyC", "browser_find_selectable_top_r: Cell index %d, cell %p\n",cellindex,cellarray));
convert_pair_to_os(c->x, c->y, &xorg, &yorg);
......@@ -707,9 +687,7 @@ HStream * browser_find_selectable_top_r(browser_data * b, reformat_cell * cell,
cell->ldata[line].y + cell->ldata[line].h + y_origin + yorg,
s);
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_top_r: Cell index %d, cell %p - Found: %p\n",cellindex, cellarray, found);
#endif
dprintf(("KeyC", "browser_find_selectable_top_r: Cell index %d, cell %p - Found: %p\n",cellindex, cellarray, found));
}
}
......@@ -734,15 +712,13 @@ HStream * browser_find_selectable_top_r(browser_data * b, reformat_cell * cell,
t = found;
exit = 1;
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_top_r: ** Found %p in table, exitting **\n",t);
#endif
dprintf(("KeyC", "browser_find_selectable_top_r: ** Found %p in table, exitting **\n",t));
break;
}
#ifdef TRACE
else if (tl & (1u<<22)) Printf("browser_find_selectable_top_r: Nothing found in table\n");
else dprintf(("KeyC", "browser_find_selectable_top_r: Nothing found in table\n"));
#endif
}
......@@ -767,9 +743,7 @@ HStream * browser_find_selectable_top_r(browser_data * b, reformat_cell * cell,
/* Return the found value, be it NULL or a valid selectable token */
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_top_r: -- Returning %p --\n", t);
#endif
dprintf(("KeyC", "browser_find_selectable_top_r: -- Returning %p --\n", t));
return t;
}
......@@ -811,9 +785,7 @@ HStream * browser_find_selectable_bot_r(browser_data * b, reformat_cell * cell,
if (!cell || !cell->nlines || !cell->ldata || !cell->cdata) return NULL;
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_bot_r: Proceeding for %p, cell %p\n", b, cell);
#endif
dprintf(("KeyC", "browser_find_selectable_bot_r: Proceeding for %p, cell %p\n", b, cell));
/* Work out where the visible page region starts and ends */
......@@ -834,9 +806,7 @@ HStream * browser_find_selectable_bot_r(browser_data * b, reformat_cell * cell,
ytop = s->yscroll - htop;
ybot = s->yscroll - (s->visible_area.ymax - s->visible_area.ymin) + hbot;
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_bot_r: ytop, ybot: -%d, -%d\n",-ytop,-ybot);
#endif
dprintf(("KeyC", "browser_find_selectable_bot_r: ytop, ybot: -%d, -%d\n",-ytop,-ybot));
/* Go through the cell's chunks, getting tokens for as long */
/* as the chunk holding lines are in the visible area. */
......@@ -891,9 +861,7 @@ HStream * browser_find_selectable_bot_r(browser_data * b, reformat_cell * cell,
while (line >= 0 && y_origin + cell->ldata[line].y < ytop && !exit)
{
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_bot_r: Line %d\n",line);
#endif
dprintf(("KeyC", "browser_find_selectable_bot_r: Line %d\n",line));
chunkmin = cell->ldata[line].chunks;
chunk = cell->ldata[line].n + chunkmin - 1;
......@@ -906,11 +874,8 @@ HStream * browser_find_selectable_bot_r(browser_data * b, reformat_cell * cell,
if (!t) break;
#ifdef TRACE
if (tl & (1u<<22))
{
Printf("browser_find_selectable_bot_r: Chunk %d of %d minimum, token %p\n", chunk, chunkmin, t);
if (t == last) Printf("browser_find_selectable_bot_r: t = last, so won't deal with this chunk\n");
}
dprintf(("KeyC", "browser_find_selectable_bot_r: Chunk %d of %d minimum, token %p\n", chunk, chunkmin, t));
if (t == last) dprintf(("KeyC", "browser_find_selectable_bot_r: t = last, so won't deal with this chunk\n"));
#endif
/* Several chunks can represent the same token - don't want to */
......@@ -925,9 +890,7 @@ HStream * browser_find_selectable_bot_r(browser_data * b, reformat_cell * cell,
if (!*current && CanBeSelected(t) && browser_check_visible(b, s, t))
{
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_bot_r: ** Found %p **\n", t);
#endif
dprintf(("KeyC", "browser_find_selectable_bot_r: ** Found %p **\n", t));
exit = 1;
break;
......@@ -967,9 +930,7 @@ HStream * browser_find_selectable_bot_r(browser_data * b, reformat_cell * cell,
int cellindex;
int xorg, yorg;
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_bot_r: Dealing with table\n");
#endif
dprintf(("KeyC", "browser_find_selectable_bot_r: Dealing with table\n"));
/* Proceed if the cell array can be found */
......@@ -1009,9 +970,7 @@ HStream * browser_find_selectable_bot_r(browser_data * b, reformat_cell * cell,
{
c = &cellarray[cellindex];
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_bot_r: Cell index %d, cell %p\n",cellindex,cellarray);
#endif
dprintf(("KeyC", "browser_find_selectable_bot_r: Cell index %d, cell %p\n",cellindex,cellarray));
convert_pair_to_os(c->x, c->y, &xorg, &yorg);
......@@ -1023,9 +982,7 @@ HStream * browser_find_selectable_bot_r(browser_data * b, reformat_cell * cell,
cell->ldata[line].y + cell->ldata[line].h + y_origin + yorg,
s);
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_bot_r: Cell index %d, cell %p - Found: %p\n",cellindex, cellarray, found);
#endif
dprintf(("KeyC", "browser_find_selectable_bot_r: Cell index %d, cell %p - Found: %p\n",cellindex, cellarray, found));
}
}
......@@ -1050,15 +1007,13 @@ HStream * browser_find_selectable_bot_r(browser_data * b, reformat_cell * cell,
t = found;
exit = 1;
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_bot_r: ** Found %p in table, exitting **\n",t);
#endif
dprintf(("KeyC", "browser_find_selectable_bot_r: ** Found %p in table, exitting **\n",t));
break;
}
#ifdef TRACE
else if (tl & (1u<<22)) Printf("browser_find_selectable_bot_r: Nothing found in table\n");
else dprintf(("KeyC", "browser_find_selectable_bot_r: Nothing found in table\n"));
#endif
}
......@@ -1083,9 +1038,7 @@ HStream * browser_find_selectable_bot_r(browser_data * b, reformat_cell * cell,
/* Return the found value, be it NULL or a valid selectable token */
#ifdef TRACE
if (tl & (1u<<22)) Printf("browser_find_selectable_bot_r: -- Returning %p --\n", t);
#endif
dprintf(("KeyC", "browser_find_selectable_bot_r: -- Returning %p --\n", t));
return t;
}
......@@ -1648,9 +1601,9 @@ void browser_destroy_source(browser_data * b)
if (b->source)
{
#ifdef TRACE
if (tl & (1u<<12)) Printf("browser_destroy_source: flex_free block %p which held page source\n",&b->source);
dprintf(("LMem", "browser_destroy_source: flex_free block %p which held page source\n",&b->source));
flexcount -= flex_size((flex_ptr) &b->source);
if (tl & (1u<<14)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CFle", "** flexcount: %d\n",flexcount));
#endif
flex_free((flex_ptr) &b->source);
......@@ -1906,9 +1859,9 @@ int browser_add_match_list_entry(flex_ptr match_list, const char * add)
else (*((char **) match_list))[0] = '\0';
#ifdef TRACE
if (tl & (1u<<12)) Printf("browser_add_match_list_entry: flex_alloc match_list block for first (terminating) entry");
dprintf(("LMem", "browser_add_match_list_entry: flex_alloc match_list block for first (terminating) entry"));
flexcount += 1;
if (tl & (1u<<14)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CFle", "** flexcount: %d\n",flexcount));
#endif
}
......@@ -1927,17 +1880,15 @@ int browser_add_match_list_entry(flex_ptr match_list, const char * add)
old_size + ulen)
)
{
#ifdef TRACE
if (tl & (1u<<12)) Printf("browser_add_match_list_entry: flex_extend of match_list failed!\n");
#endif
dprintf(("LMem", "browser_add_match_list_entry: flex_extend of match_list failed!\n"));
return 0;
}
#ifdef TRACE
if (tl & (1u<<12)) Printf("browser_add_match_list_entry: flex_extend of match_list block to %d bytes successful", old_size + ulen);
dprintf(("LMem", "browser_add_match_list_entry: flex_extend of match_list block to %d bytes successful", old_size + ulen));
flexcount += ulen;
if (tl & (1u<<14)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CFle", "** flexcount: %d\n",flexcount));
#endif
/* Lock flex whilst copying in the entry */
......@@ -1971,9 +1922,9 @@ void browser_empty_match_list(flex_ptr match_list)
if (match_list && *((char **) match_list))
{
#ifdef TRACE
if (tl & (1u<<12)) Printf("browser_empty_match_list: flex_free block %p\n",match_list);
dprintf(("LMem", "browser_empty_match_list: flex_free block %p\n",match_list));
flexcount -= flex_size(match_list);
if (tl & (1u<<13)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CMal", "** flexcount: %d\n",flexcount));
#endif
flex_free(match_list);
......@@ -2474,25 +2425,26 @@ static HStream * browser_get_pointer_token_r(browser_data * b, reformat_cell * c
tp = cell->cdata[cell->ldata[line].chunks + n].t;
#ifdef TRACE
if (tl & (1u<<3))
{
static tracelastchunk = -1;
if (tracelastchunk != cell->ldata[line].chunks + n)
{
Printf("Chunk : %d, token: %d\n",cell->ldata[line].chunks + n,cell->cdata[cell->ldata[line].chunks + n].t);
Printf("Text : '%s'\n",tp->text);
Printf("Style : %p\n",(void *) tp->style);
dprintf(("Wind", "Chunk : %d, token: &%08X\n",cell->ldata[line].chunks + n, (int) cell->cdata[cell->ldata[line].chunks + n].t));
dprintf(("Wind", "Text : '%s'\n",tp->text));
dprintf(("Wind", "Style : %p\n",(void *) tp->style));
if (ISLINK(tp))
{
Printf("Link : '%s'\n",tp->anchor);
Printf("Target: '%s'\n",tp->target);
dprintf(("Wind", "Link : '%s'\n",tp->anchor));
dprintf(("Wind", "Target: '%s'\n",tp->target));
}
tracelastchunk = cell->ldata[line].chunks + n;
}
}
#endif
/* If the token represents a table... */
......@@ -3416,9 +3368,7 @@ _kernel_oserror * browser_update_bottom(browser_data * b, int top_y)
_kernel_oserror * e;
WimpRedrawWindowBlock r;
#ifdef TRACE
if (tl & (1u<<9)) Printf("\nbrowser_update_bottom: Called, -top_y = %d\n",-top_y);
#endif
dprintf(("Redr", "\nbrowser_update_bottom: Called, -top_y = %d\n",-top_y));
/* Fill in the visible area and scroll info from the */
/* GetWindowState call */
......@@ -3450,9 +3400,11 @@ _kernel_oserror * browser_update_bottom(browser_data * b, int top_y)
}
#ifdef TRACE
else if (tl & (1u<<9)) Printf("\nbrowser_update_bottom: Nothing to redraw\n");
if (tl & (1u<<9)) Printf("\nbrowser_update_bottom: Successful\n");
else dprintf(("Redr", "\nbrowser_update_bottom: Nothing to redraw\n"));
dprintf(("Redr", "\nbrowser_update_bottom: Successful\n"));
#endif
return NULL;
......
......@@ -38,11 +38,6 @@
#include <tboxlibs/wimplib.h>
#include <tboxlibs/event.h>
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "FromROSLib.h"
#include "MiscDefs.h"
......
......@@ -50,11 +50,6 @@
#include <ImageLib/imagetrans.h>
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "FromROSLib.h"
#include "Utils.h"
......@@ -64,7 +59,6 @@
#include "FetchPage.h"
#include "FontManage.h"
#include "History.h"
#include "Limits.h"
#include "Menus.h"
#include "NestWimp.h"
#include "Redraw.h"
......@@ -277,9 +271,7 @@ static _kernel_oserror * choices_show_subwindow(ObjectId choices_window, int sub
/* Adjustments for different types of window */
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_show_subwindow: Wimp flags = %x\n", state.flags);
#endif
dprintf(("Choi", "choices_show_subwindow: Wimp flags = %x\n", state.flags));
RetError(window_get_wimp_handle(0, subwindows[subwindow], &state.window_handle));
RetError(wimp_get_window_state(&state));
......@@ -358,9 +350,7 @@ int choices_to_be_shown(int eventcode, ToolboxEvent * event, IdBlock * idb, void
ObjectId window;
int subwindow_tobeshown;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_to_be_shown: Called\n");
#endif
dprintf(("Choi", "choices_to_be_shown: Called\n"));
/* In multiuser builds, need to be logged in - otherwise, close */
/* the dialogue! */
......@@ -1667,9 +1657,7 @@ static int choices_colour_closed_handler(int eventcode, ToolboxEvent * event, Id
e = toolbox_delete_object(0, idb->self_id);
if (e) {show_error_ret(e); return 1;}
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_colour_closed_handler: Colour DBox deleted\n");
#endif
dprintf(("Choi", "choices_colour_closed_handler: Colour DBox deleted\n"));
return 1;
}
......@@ -1895,9 +1883,7 @@ static _kernel_oserror * choices_set_save_field(ObjectId obj, ComponentId comp,
_kernel_oserror *e;
char *tempstring;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_set_display_field: Called\n");
#endif
dprintf(("Choi", "choices_set_display_field: Called\n"));
RetError(choices_get_menu_entry_text("ChSave", state, &tempstring));
......@@ -1920,9 +1906,7 @@ static _kernel_oserror * choices_set_display_field(ObjectId obj, ComponentId com
_kernel_oserror *e;
char *tempstring;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_set_display_field: Called\n");
#endif
dprintf(("Choi", "choices_set_display_field: Called\n"));
RetError(choices_get_menu_entry_text("ChDisplay", state, &tempstring));
......@@ -2955,9 +2939,7 @@ static int choices_font_closed_handler(int eventcode, ToolboxEvent * event, IdBl
e = toolbox_delete_object(0, idb->self_id);
if (e) {show_error_ret(e); return 1;}
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_font_closed_handler: FontMenu deleted\n");
#endif
dprintf(("Choi", "choices_font_closed_handler: FontMenu deleted\n"));
return 1;
}
......@@ -2974,13 +2956,10 @@ static int choices_font_selected_handler(int eventcode, ToolboxEvent * event, Id
int found;
fm_typeface * target;
#ifdef TRACE
if (tl & (1u<<29))
{
Printf("choices_font_selected_handler: called\n");
Printf("Selected font = %s\n", ((FontMenuSelectionEvent*)event)->font_id);
}
#endif
dprintf(("Choi", "choices_font_selected_handler: called\n"
"choices_font_selected_handler: Selected font = %s\n",
((FontMenuSelectionEvent *) event)->font_id));
p2 = font[0];
......@@ -2998,15 +2977,15 @@ static int choices_font_selected_handler(int eventcode, ToolboxEvent * event, Id
choices_modified_font(font[0], getenv("Font$Bold"), font[2]); /* Get bold version of base font */
choices_modified_font(font[2], getenv("Font$Italic"), font[3]); /* Get italic version of bold font */
#ifdef TRACE
if (tl & (1u<<29))
{
Printf("Base font = %s\n", font[0]);
Printf("Italic version = %s\n", font[1]);
Printf("Bold version = %s\n", font[2]);
Printf("Bold-Italic version = %s\n", font[3]);
}
#endif
dprintf(("Choi", "Base font = %s\n"
"Italic version = %s\n"
"Bold version = %s\n"
"Bold-Italic version = %s\n",
font[0],
font[1],
font[2],
font[3]));
/* Set display field to name of new font */
/* Ignore error as the display isn't */
......@@ -3077,9 +3056,7 @@ static _kernel_oserror * choices_set_plugin_field(void)
ObjectId destwind;
char * tempstring;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_set_plugin_field: Called\n");
#endif
dprintf(("Choi", "choices_set_plugin_field: Called\n"));
/* Find which window the plugin display is in */
......@@ -3340,9 +3317,7 @@ static _kernel_oserror * choices_set_uri_field(void)
ObjectId destwind;
char * tempstring;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_set_uri_field: Called\n");
#endif
dprintf(("Choi", "choices_set_uri_field: Called\n"));
/* Find which window the URI display is in */
......@@ -3469,9 +3444,7 @@ static _kernel_oserror * choices_set_cookie_field(void)
ObjectId destwind;
char * tempstring;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_set_cookie_field: Called\n");
#endif
dprintf(("Choi", "choices_set_cookie_field: Called\n"));
/* Find which window the cookie display is in */
......@@ -3596,9 +3569,7 @@ static _kernel_oserror * choices_set_jpeg_field(void)
ObjectId destwind;
char * tempstring;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_set_jpeg_field: Called\n");
#endif
dprintf(("Choi", "choices_set_jpeg_field: Called\n"));
/* Find which window the JPEG display is in */
......@@ -3723,9 +3694,7 @@ static _kernel_oserror * choices_set_referer_field(void)
ObjectId destwind;
char * tempstring;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_set_referer_field: Called\n");
#endif
dprintf(("Choi", "choices_set_referer_field: Called\n"));
/* Find which window the referer display is in */
......@@ -3855,9 +3824,7 @@ static _kernel_oserror * choices_set_referer_field(void)
ObjectId destwind;
char * tempstring;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_set_win_open_field: Called\n");
#endif
dprintf(("Choi", "choices_set_win_open_field: Called\n"));
/* Find which window the win_open display is in */
......@@ -3985,9 +3952,7 @@ static _kernel_oserror * choices_set_referer_field(void)
ObjectId destwind;
char * tempstring;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_set_win_close_field: Called\n");
#endif
dprintf(("Choi", "choices_set_win_close_field: Called\n"));
/* Find which window the win_close display is in */
......@@ -4252,9 +4217,7 @@ static _kernel_oserror * choices_set_timetype_field(int timetype, ComponentId co
ObjectId menu_id;
char * tempstring;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_set_timetype_field: Called\n");
#endif
dprintf(("Choi", "choices_set_timetype_field: Called\n"));
/* Find which window the time display is in */
......@@ -4573,9 +4536,7 @@ static _kernel_oserror * choices_set_table_border_field(ObjectId obj, ComponentI
_kernel_oserror *e;
char *tempstring;
#ifdef TRACE
if (tl & (1u<<29)) Printf("choices_set_table_border_field: Called\n");
#endif
dprintf(("Choi", "choices_set_table_border_field: Called\n"));
RetError(choices_get_menu_entry_text("ChTabBord", state, &tempstring));
......
......@@ -37,11 +37,6 @@
#include <tboxlibs/wimplib.h>
#include <tboxlibs/event.h>
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "Utils.h"
......
......@@ -38,11 +38,6 @@
#include <tboxlibs/wimplib.h>
#include <tboxlibs/event.h>
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "FromROSLib.h"
#include "Utils.h"
......@@ -152,23 +147,17 @@ void dragbox_plot_eor_box(WimpRedrawWindowBlock * r, BBox * rect)
/* Set the dash pattern */
#ifdef TRACE
if (tl & (1u<<27)) Printf("Set dotdash\n");
#endif
dprintf(("Drag", "Set dotdash\n"));
dragbox_set_dotdash(pattern);
/* Set the colour and plot the box */
#ifdef TRACE
if (tl & (1u<<27)) Printf("Set colour\n");
#endif
dprintf(("Drag", "Set colour\n"));
_swix(Wimp_SetColour, _IN(0), 0x3f);
#ifdef TRACE
if (tl & (1u<<27)) Printf("Draw over %d, %d, %d, %d\n",box.xmin,box.ymin,box.xmax,box.ymax);
#endif
dprintf(("Drag", "Draw over %d, %d, %d, %d\n",box.xmin,box.ymin,box.xmax,box.ymax));
_swix(OS_Plot, _INR(0,2), 4, box.xmin, box.ymin);
_swix(OS_Plot, _INR(0,2), 5 | 24, box.xmax, box.ymin);
......@@ -219,9 +208,7 @@ void dragbox_update_eor_box(int handle, BBox * rect)
while (more)
{
#ifdef TRACE
if (tl & (1u<<27)) Printf("Plot EOR\n");
#endif
dprintf(("Drag", "Plot EOR\n"));
dragbox_plot_eor_box(&r, rect);
......@@ -263,21 +250,15 @@ void dragbox_end_rotate_box(void)
void dragbox_draw_box(void)
{
#ifdef TRACE
if (tl & (1u<<27)) Printf("Draw\n");
#endif
dprintf(("Drag", "Draw\n"));
}
void dragbox_remove_box(void)
{
#ifdef TRACE
if (tl & (1u<<27)) Printf("Remove\n");
#endif
dprintf(("Drag", "Remove\n"));
}
void dragbox_move_box(void)
{
#ifdef TRACE
if (tl & (1u<<27)) Printf("Move\n");
#endif
dprintf(("Drag", "Move\n"));
}
......@@ -42,11 +42,6 @@
#include <tboxlibs/ScrollList.h>
#include "TextArea.h"
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "Utils.h"
......@@ -710,7 +705,7 @@ static _kernel_oserror * eventlogs_update_log_structure(browser_data * b, int co
#ifdef TRACE
malloccount += sizeof(eventlogs_log);
if (tl & (1u<<13)) Printf("** malloccount (eventlogs_update_log_structure): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (eventlogs_update_log_structure): \0211%d\0217\n",malloccount));
#endif
found->b = b;
......@@ -924,7 +919,7 @@ static _kernel_oserror * eventlogs_log_message_known(eventlogs_log * found, brow
#ifdef TRACE
malloccount += news + 1;
if (tl & (1u<<13)) Printf("** malloccount (eventlogs_log_message): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (eventlogs_log_message): \0211%d\0217\n",malloccount));
#endif
strcat(found->text, full);
......@@ -941,7 +936,7 @@ static _kernel_oserror * eventlogs_log_message_known(eventlogs_log * found, brow
#ifdef TRACE
malloccount += size;
if (tl & (1u<<13)) Printf("** malloccount (eventlogs_log_message): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (eventlogs_log_message): \0211%d\0217\n",malloccount));
#endif
strcpy(found->text, full);
......@@ -1017,7 +1012,7 @@ _kernel_oserror * eventlogs_url_changed(browser_data * b, unsigned int ok_to_cle
{
#ifdef TRACE
malloccount -= (strlen(found->text) + 1);
if (tl & (1u<<13)) Printf("** malloccount (eventlogs_browser_died): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (eventlogs_browser_died): \0211%d\0217\n",malloccount));
#endif
free(found->text), found->text = NULL;
......@@ -1118,7 +1113,7 @@ _kernel_oserror * eventlogs_browser_died(browser_data * b)
{
#ifdef TRACE
malloccount -= (strlen(found->text) + 1);
if (tl & (1u<<13)) Printf("** malloccount (eventlogs_browser_died): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (eventlogs_browser_died): \0211%d\0217\n",malloccount));
#endif
free(found->text);
......@@ -1141,7 +1136,7 @@ _kernel_oserror * eventlogs_browser_died(browser_data * b)
#ifdef TRACE
malloccount -= sizeof(eventlogs_log);
if (tl & (1u<<13)) Printf("** malloccount (eventlogs_browser_died): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (eventlogs_browser_died): \0211%d\0217\n",malloccount));
#endif
return eventlogs_update_list(b);
......
......@@ -45,11 +45,6 @@
#include <tboxlibs/wimplib.h>
#include <tboxlibs/event.h>
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "MiscDefs.h"
#include "Utils.h"
......@@ -113,9 +108,7 @@ _kernel_oserror * fetch_start(browser_data * b)
const char * referer;
int handle, method;
#ifdef TRACE
if (tl & (1u<<6)) Printf("\nfetch_start: Called\n");
#endif
dprintf(("Fetc", "\nfetch_start: Called\n"));
/* (Order of evaluation ensures the check for the contents of */
/* the memory pointed to by browser_fetch_url only occurs if */
......@@ -183,7 +176,7 @@ _kernel_oserror * fetch_start(browser_data * b)
if (b->post_data)
{
flexcount -= flex_size((flex_ptr) &b->post_data);
if (tl & (1u<<13)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CMal", "** flexcount: %d\n",flexcount));
}
#endif
......@@ -207,11 +200,10 @@ _kernel_oserror * fetch_start(browser_data * b)
/* so the full trace code is being left in for now */
#ifdef TRACE
if (tl & (1u<<6))
{
if (e) Printf("fetch_start: Exiting with error\n");
else Printf("fetch_start: Successful\n");
}
if (e) dprintf(("Fetc", "fetch_start: Exiting with error\n"));
else dprintf(("Fetc", "fetch_start: Successful\n"));
#endif
return e;
......@@ -1275,9 +1267,7 @@ void fetch_preprocess_token(browser_data * b, HStream * tptr)
b->background_colour = HtmlBODYbgcolour(tptr);
#ifdef TRACE
if (tl & (1u<<6)) Printf("fetch_preprocess_token: Background colour set to %d\n", b->background_colour);
#endif
dprintf(("Fetc", "fetch_preprocess_token: Background colour set to %d\n", b->background_colour));
/* If there's no actual background image, set the anti-alias */
/* colour to be the same as the background colour. */
......@@ -1357,9 +1347,10 @@ void fetch_preprocess_token(browser_data * b, HStream * tptr)
void fetch_fetcher(browser_data * b)
{
HStream * tptr;
int start = -1;
int i, remain, sofar, waiting;
HStream * tptr;
int start = -1;
int remain, sofar, waiting;
unsigned int now, beginning;
/* It really helps to understand this function if you realise that */
/* it's coded more or less backwards (Merlyn was weird...). For */
......@@ -1371,15 +1362,18 @@ void fetch_fetcher(browser_data * b)
/* */
/* BS stands for Browser Status, by the way, and nothing else ;-) */
for (i = 0; i < 10; i ++) /* Get several tokens on each null event */
_swix(OS_ReadMonotonicTime,
_OUT(0),
&beginning);
do
{
/* For BS_DATAFETCH, save the file */
if (b->fetch_status == BS_DATAFETCH)
{
#ifdef TRACE
if (tl & (1u<<6)) Printf("fetch_fetcher: fetch_status = BS_DATAFETCH / BS_DATAWHERE.\n");
#endif
dprintf(("Fetc", "fetch_fetcher: fetch_status = BS_DATAFETCH / BS_DATAWHERE.\n"));
/* This code gets called by the stuff further down advancing */
/* the status to BS_DATAFETCH. */
......@@ -1463,9 +1457,7 @@ void fetch_fetcher(browser_data * b)
return;
}
#ifdef TRACE
if (tl & (1u<<6)) Printf("fetch_fetcher: Get next token\n");
#endif
dprintf(("Fetc", "fetch_fetcher: Get next token\n"));
/* Get the next token, with fetch_chkerror allowing us to exit */
/* relatively cleanly should an error occur. */
......@@ -1529,9 +1521,7 @@ void fetch_fetcher(browser_data * b)
}
else
{
#ifdef TRACE
if (tl & (1u<<6)) Printf("fetch_fetcher: fetch_status moved to BS_DATAFETCH\n");
#endif
dprintf(("Fetc", "fetch_fetcher: fetch_status moved to BS_DATAFETCH\n"));
b->fetch_status = BS_DATAFETCH;
......@@ -1602,9 +1592,7 @@ void fetch_fetcher(browser_data * b)
char * url;
int internal = 0;
#ifdef TRACE
if (tl & (1u<<6)) Printf("fetch_fetcher: Redirect to %s\n",(char *) remain);
#endif
dprintf(("Fetc", "fetch_fetcher: Redirect to %s\n",(char *) remain));
/* Get the new URL pointed to by 'url' */
......@@ -1616,9 +1604,7 @@ void fetch_fetcher(browser_data * b)
{
/* Allocate space for new URL and copy it into that space */
#ifdef TRACE
if (tl & (1u<<12)) Printf("fetch_fetcher: Chunk CK_FURL set to %d\n",strlen(url) + 1);
#endif
dprintf(("LMem", "fetch_fetcher: Chunk CK_FURL set to %d\n",strlen(url) + 1));
if (fetch_chkerror(b, memory_set_chunk_size(b, NULL, CK_FURL, strlen(url) + 1))) return;
strcpy(b->urlfdata, url);
......@@ -1630,9 +1616,7 @@ void fetch_fetcher(browser_data * b)
/* Allocate space for new URL plus old URL and separator, */
/* and copy them into that space */
#ifdef TRACE
if (tl & (1u<<12)) Printf("fetch_fetcher: Chunk CK_FURL set to %d\n",strlen(url) + strlen(furl) + 2);
#endif
dprintf(("LMem", "fetch_fetcher: Chunk CK_FURL set to %d\n",strlen(url) + strlen(furl) + 2));
StrNCpy0(furl, browser_fetch_url(b));
......@@ -1693,9 +1677,7 @@ void fetch_fetcher(browser_data * b)
/* Allocate memory for it, and copy the string across */
#ifdef TRACE
if (tl & (1u<<12)) Printf("fetch_fetcher: Chunk CK_DURL set to %d\n",l + 1);
#endif
dprintf(("LMem", "fetch_fetcher: Chunk CK_DURL set to %d\n",l + 1));
if (fetch_chkerror(b, memory_set_chunk_size(b, NULL, CK_DURL, l + 1))) return;
......@@ -1745,9 +1727,7 @@ void fetch_fetcher(browser_data * b)
/* Initialise various things inside the browser_data structure */
/* to do with colours and so-forth */
#ifdef TRACE
if (tl & (1u<<18)) Printf("New fetch for %p, stream %p\n",b,tptr);
#endif
dprintf(("Stre", "New fetch for %p, stream %p\n",b,tptr));
b->stream = tptr; /* Pointer to list of HStream structures */
b->final_token = NULL; /* Last HStream structure dealt with */
......@@ -1828,24 +1808,14 @@ void fetch_fetcher(browser_data * b)
b->selected = NULL; /* No tokens are selected */
b->selected_owner = NULL;
#ifdef TRACE
if (tl & (1u<<6)) Printf("\nfetch_fetcher: Document colours etc. set to default values\n");
#endif
dprintf(("Fetc", "\nfetch_fetcher: Document colours etc. set to default values\n"));
/* Clear the status bar contents block for an ancestor */
/* window beginning a new fetch. */
if (!b->ancestor && b->nstatus)
{
#ifdef TRACE
if (
(tl & (1u<<1)) ||
(tl & (1u<<6))
)
Printf("fetch_fetcher: Freeing status_contents array\n");
#endif
dprintf(("Fetc,TBar", "fetch_fetcher: Freeing status_contents array\n"));
b->nstatus = 0;
memory_set_chunk_size(b, NULL, CK_STAT, 0);
......@@ -1991,9 +1961,7 @@ void fetch_fetcher(browser_data * b)
reformat_format_from(b, b->cell->nlines - 2, 1, -1);
}
#ifdef TRACE
if (tl & (1u<<6)) Printf("\nfetch_fetcher: Finished, so stopping and exiting.\n");
#endif
dprintf(("Fetc", "\nfetch_fetcher: Finished, so stopping and exiting.\n"));
fetch_stop(b, 1);
......@@ -2012,8 +1980,14 @@ void fetch_fetcher(browser_data * b)
/* of the code deals with a conventional fetch. */
}
/* Closure of for loop that deals with several fetches per null */
_swix(OS_ReadMonotonicTime,
_OUT(0),
&now);
/* Closure of loop that deals with several fetches per null */
}
while (now > beginning && now - beginning < 25);
/* If start is >= 0, there is data that can be used for */
/* displaying the page; so start a reformat based on that */
......@@ -2227,9 +2201,7 @@ void fetch_stop(browser_data * b, int keep_source)
/* Discard the URL being fetched */
#ifdef TRACE
if (tl & (1u<<12)) Printf("fetch_stop: Chunk CK_FURL set to 0\n");
#endif
dprintf(("LMem", "fetch_stop: Chunk CK_FURL set to 0\n"));
memory_set_chunk_size(b, NULL, CK_FURL, 0);
......@@ -2476,6 +2448,9 @@ _kernel_oserror * fetch_get_raw_data(browser_data * b, unsigned int handle, char
return &erb;
}
dprintf(("temp", "For %p (%p), handle &%08X, fetching %d\n",b,up,handle,up->fetching));
/* If we're not fetching, some earlier fetch process must have */
/* shut things down; so say that we're finished and exit. */
......
......@@ -41,11 +41,6 @@
#include <tboxlibs/wimp.h>
#include <tboxlibs/event.h>
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "MiscDefs.h"
#include "Utils.h"
......@@ -121,9 +116,7 @@ static _kernel_oserror * html_allocate_fetch_buffer(void)
if (!fetch_buffer)
{
#ifdef TRACE
if (tl & (1u<<6)) Printf("html_allocate_fetch_buffer: Exiting with error\n");
#endif
dprintf(("Fetc", "html_allocate_fetch_buffer: Exiting with error\n"));
return make_no_cont_memory_error(8);
}
......@@ -325,9 +318,7 @@ _kernel_oserror * html_get(char * url, char ** extradata, int * handle, int meth
int ok;
unsigned int h;
#ifdef TRACE
if (tl & (1u<<6)) Printf("html_get: Called\n");
#endif
dprintf(("Fetc", "html_get: Called\n"));
*handle = 0;
......@@ -365,9 +356,7 @@ _kernel_oserror * html_get(char * url, char ** extradata, int * handle, int meth
{
urlstat * up;
#ifdef TRACE
if (tl & (1u<<6)) Printf("html_get: Session registered, ID is %d\n",h);
#endif
dprintf(("Fetc", "html_get: Session registered, ID is %d\n",h));
e = urlstat_add_entry(1, &up);
......@@ -400,9 +389,7 @@ _kernel_oserror * html_get(char * url, char ** extradata, int * handle, int meth
/* Allocate space for the extra data, the anchor stored in up->extradata */
#ifdef TRACE
if (tl & (1u<<12)) Printf("html_get: flex_alloc %d for 'extradata' store\n",len + 3);
#endif
dprintf(("LMem", "html_get: flex_alloc %d for 'extradata' store\n",len + 3));
if (!flex_alloc((flex_ptr) &up->extradata, len + 3))
{
......@@ -416,7 +403,7 @@ _kernel_oserror * html_get(char * url, char ** extradata, int * handle, int meth
#ifdef TRACE
flexcount += (len + 3);
if (tl & (1u<<14)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CFle", "** flexcount: %d\n",flexcount));
#endif
/* CR+LF into the top of the new block of memory */
......@@ -552,6 +539,7 @@ _kernel_oserror * html_get(char * url, char ** extradata, int * handle, int meth
if (p) c = *p, *p = 0;
dprintf(("temp", "url_get_url for %p, url = '%s'\n",up,url));
e = url_get_url(URL_GetURL_AgentGiven, /* Should use a custom User Agent */
h, /* Session handle */
method, /* Fetch method */
......@@ -567,11 +555,10 @@ _kernel_oserror * html_get(char * url, char ** extradata, int * handle, int meth
}
#ifdef TRACE
if (tl & (1u<<6))
{
if (!e) Printf("html_get: Successful\n");
else Printf("html_get: Exitting with an error\n");
}
if (!e) dprintf(("Fetc", "html_get: Successful\n"));
else dprintf(("Fetc", "html_get: Exitting with an error\n"));
#endif
return e;
......@@ -616,11 +603,8 @@ int html_insert_header(const char * header, flex_ptr data)
/* block was allocated, else it holds the old block size. */
#ifdef TRACE
if (tl & (1u<<12))
{
if (s) Printf("html_insert_header: flex_extend to %d for header store\n",len + s);
else Printf("html_insert_header: flex_alloc %d for header store\n",len + 1);
}
if (s) dprintf(("LMem", "html_insert_header: flex_extend to %d for header store\n",len + s));
else dprintf(("LMem", "html_insert_header: flex_alloc %d for header store\n",len + 1));
#endif
if (s) ok = flex_extend(data, len + s);
......@@ -631,15 +615,13 @@ int html_insert_header(const char * header, flex_ptr data)
#ifdef TRACE
if (s) flexcount += len;
else flexcount += (len + 1);
if (tl & (1u<<14)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CFle", "** flexcount: %d\n",flexcount));
#endif
/* Shuffle the header data down to make room for the new */
/* stuff at the top, if there was any data there to move. */
#ifdef TRACE
if (tl & (1u<<18)) Printf("\0213html_insert_header: memove from %p to %p for %d bytes\0217\n",((int) (*data)) + len, *data, s);
#endif
dprintf(("Stre", "\0213html_insert_header: memove from &%08X to &%08X for %d bytes\0217\n",((int) (*data)) + len, (int) (*data), s));
if (s) memmove((void *) (((int) (*data)) + len), *data, s);
......@@ -679,9 +661,7 @@ _kernel_oserror * html_close(int handle)
{
urlstat * up;
#ifdef TRACE
if (tl & (1u<<6)) Printf("html_close: Called\n");
#endif
dprintf(("Fetc", "html_close: Called\n"));
url_deregister(0, handle);
......@@ -710,9 +690,7 @@ _kernel_oserror * html_close(int handle)
0,
"html_close"));
#ifdef TRACE
if (tl & (1u<<6)) Printf("html_close: Exiting with error\n");
#endif
dprintf(("Fetc", "html_close: Exiting with error\n"));
return &erb;
}
......@@ -785,8 +763,8 @@ _kernel_oserror * html_close(int handle)
#ifdef TRACE
if (up->stream)
{
if (tl & (1u<<12)) Printf("html_close: Calling HtmlStreamFree on %p\n",up->stream);
if (tl & (1u<<18)) Printf("\0212Closing stream %p\0217\n",up->stream);
dprintf(("LMem", "html_close: Calling HtmlStreamFree on %p\n", up->stream));
dprintf(("Stre", "\0212html_close: Closing stream %p\0217\n", up->stream));
}
#endif
......@@ -797,9 +775,7 @@ _kernel_oserror * html_close(int handle)
if (up->context)
{
#ifdef TRACE
if (tl & (1u<<12)) Printf("html_close: free block %p for 'context' field of 'urlstat' structure\n",up->context);
#endif
dprintf(("LMem", "html_close: free block %p for 'context' field of 'urlstat' structure\n",up->context));
HtmlEndParse(up->context);
up->context = NULL;
......@@ -808,9 +784,9 @@ _kernel_oserror * html_close(int handle)
#ifdef TRACE
if (up->extradata)
{
if (tl & (1u<<12)) Printf("html_close: flex_free block %p for 'extradata' field of 'urlstat' structure\n",&up->extradata);
dprintf(("LMem", "html_close: flex_free block %p for 'extradata' field of 'urlstat' structure\n",&up->extradata));
flexcount -= flex_size((flex_ptr) &up->extradata);
if (tl & (1u<<14)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CFle", "** flexcount: %d\n",flexcount));
}
#endif
......@@ -822,9 +798,7 @@ _kernel_oserror * html_close(int handle)
urlstat_remove_entry(up);
#ifdef TRACE
if (tl & (1u<<6)) Printf("html_close: Successful\n");
#endif
dprintf(("Fetc", "html_close: Successful\n"));
return NULL;
}
......@@ -1233,9 +1207,7 @@ static _kernel_oserror * html_build_internal_page(browser_data * b, flex_ptr sou
if (!ok)
{
#ifdef TRACE
if (tl & (1u<<6)) Printf("html_build_internal_page: Exiting with error\n");
#endif
dprintf(("Fetc", "html_build_internal_page: Exiting with error\n"));
return make_no_cont_memory_error(1);
}
......@@ -1325,9 +1297,9 @@ static _kernel_oserror * html_transfer_to_store(browser_data * b, flex_ptr sourc
if (!up->fetched && *source)
{
#ifdef TRACE
if (tl & (1u<<12)) Printf("html_transfer_to_store: (1) flex_free block %p which held page source\n",source);
dprintf(("LMem", "html_transfer_to_store: (1) flex_free block %p which held page source\n",source));
flexcount -= flex_size(source);
if (tl & (1u<<14)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CFle", "** flexcount: %d\n",flexcount));
#endif
flex_free(source);
......@@ -1343,11 +1315,8 @@ static _kernel_oserror * html_transfer_to_store(browser_data * b, flex_ptr sourc
/* a new buffer to hold the data. */
#ifdef TRACE
if (tl & (1u<<12))
{
if (*source) Printf("html_transfer_to_store: flex_extend by %d to %d for page source store\n",r,flex_size(source) + r);
else Printf("html_transfer_to_store: flex_alloc %d for page source store\n",r);
}
if (*source) dprintf(("LMem", "html_transfer_to_store: flex_extend by %d to %d for page source store\n",r,flex_size(source) + r));
else dprintf(("LMem", "html_transfer_to_store: flex_alloc %d for page source store\n",r));
#endif
if (*source)
......@@ -1363,7 +1332,7 @@ static _kernel_oserror * html_transfer_to_store(browser_data * b, flex_ptr sourc
#ifdef TRACE
flexcount += r;
if (tl & (1u<<14)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CFle", "** flexcount: %d\n",flexcount));
#endif
if (size) *size = oldsize + r;
......@@ -1372,9 +1341,7 @@ static _kernel_oserror * html_transfer_to_store(browser_data * b, flex_ptr sourc
if (!ok)
{
#ifdef TRACE
if (tl & (1u<<6)) Printf("html_transfer_to_store: Exiting with error\n");
#endif
dprintf(("Fetc", "html_transfer_to_store: Exiting with error\n"));
return make_no_cont_memory_error(1);
}
......@@ -1382,9 +1349,7 @@ static _kernel_oserror * html_transfer_to_store(browser_data * b, flex_ptr sourc
/* The data block has been created/extended successfully, so copy the */
/* data from the url_read_data call into it. */
#ifdef TRACE
if (tl & (1u<<18)) Printf("\0216html_transfer_to_store: memcpy from %p to %p for %d bytes\0217\n",((char *) (*source)) + oldsize, fetch_buffer, r);
#endif
dprintf(("Stre", "\0216html_transfer_to_store: memcpy from %p to %p for %d bytes\0217\n",((char *) (*source)) + oldsize, fetch_buffer, r));
memcpy(((char *) (*source)) + oldsize, fetch_buffer, r);
......@@ -1458,9 +1423,7 @@ _kernel_oserror * html_get_next_token(browser_data * b, unsigned int handle, int
/* Entry point - set up initial state information */
/**************************************************/
#ifdef TRACE
if (tl & (1u<<6)) Printf("html_get_next_token: Called\n");
#endif
dprintf(("Fetc", "html_get_next_token: Called\n"));
/* Start in the default state of having no HStream to pass back */
/* through *token. Signal that we're waiting for now, and */
......@@ -1499,9 +1462,7 @@ _kernel_oserror * html_get_next_token(browser_data * b, unsigned int handle, int
0,
"html_get_next_token"));
#ifdef TRACE
if (tl & (1u<<6)) Printf("html_get_next_token: Exiting with error\n");
#endif
dprintf(("Fetc", "html_get_next_token: Exiting with error\n"));
return &erb;
}
......@@ -1557,6 +1518,7 @@ _kernel_oserror * html_get_next_token(browser_data * b, unsigned int handle, int
&read, /* Number of bytes read */
remaining); /* Number of bytes left to get */
dprintf(("temp", "Read data within %p, %d read\n",up,read));
/* Deal with the size information */
if (*remaining > 0 && !b->data_size) b->data_size = *remaining + read;
......@@ -1745,9 +1707,7 @@ _kernel_oserror * html_get_next_token(browser_data * b, unsigned int handle, int
up->stream = new;
#ifdef TRACE
if (tl & (1u<<18)) Printf("\0211(New stream for %p, %p)\0217\n", b, up->stream);
#endif
dprintf(("Stre", "\0211(New stream for %p, %p)\0217\n", b, up->stream));
}
if (!new)
......@@ -1916,12 +1876,10 @@ _kernel_oserror * html_get_next_token(browser_data * b, unsigned int handle, int
if (o != flex_size(source))
{
#ifdef TRACE
if (tl & (1u<<18)) Printf("\0213html_get_next_token: memove from %p to %p for %d bytes\0217\n",
*source,
(char*) (((int) *source) + o),
flex_size(source) - o);
#endif
dprintf(("Stre", "\0213html_get_next_token: memove from %p to %p for %d bytes\0217\n",
*source,
(char*) (((int) *source) + o),
flex_size(source) - o));
memmove(*source,
(char*) (((int) *source) + o),
......@@ -1931,9 +1889,9 @@ _kernel_oserror * html_get_next_token(browser_data * b, unsigned int handle, int
/* and shrink the source store to this size. */
#ifdef TRACE
if (tl & (1u<<12)) Printf("html_get_next_token: flex_extend to shrink source code store by %d to %d\n",o,flex_size(source) - o);
dprintf(("LMem", "html_get_next_token: flex_extend to shrink source code store by %d to %d\n",o,flex_size(source) - o));
flexcount -= o;
if (tl & (1u<<14)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CFle", "** flexcount: %d\n",flexcount));
#endif
}
......@@ -2018,9 +1976,9 @@ _kernel_oserror * html_get_next_token(browser_data * b, unsigned int handle, int
url_stop(0, handle);
#ifdef TRACE
if (tl & (1u<<12)) Printf("html_get_next_token: (2) flex_free block %p which held page source\n",source);
dprintf(("LMem", "html_get_next_token: (2) flex_free block %p which held page source\n",source));
flexcount -= flex_size(source);
if (tl & (1u<<14)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CFle", "** flexcount: %d\n",flexcount));
#endif
flex_free(source);
......@@ -2074,7 +2032,7 @@ _kernel_oserror * html_get_next_token(browser_data * b, unsigned int handle, int
{
int rmv = flex_size((flex_ptr) &up->extradata) - len;
flexcount -= rmv;
if (tl & (1u<<13)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CMal", "** flexcount: %d\n",flexcount));
}
#endif
......@@ -2535,9 +2493,9 @@ parse_the_page:
url_stop(0, handle);
#ifdef TRACE
if (tl & (1u<<12)) Printf("html_get_next_token: (2) flex_free block %p which held page source\n",source);
dprintf(("LMem", "html_get_next_token: (2) flex_free block %p which held page source\n",source));
flexcount -= flex_size(source);
if (tl & (1u<<14)) Printf("** flexcount: %d\n",flexcount);
dprintf(("CFle", "** flexcount: %d\n",flexcount));
#endif
flex_free(source);
......@@ -2648,6 +2606,7 @@ parse_the_page:
if (s & URL_Status_Done)
{
dprintf(("temp", "Shutting down %p, status = %08x\n",up,s));
up->fetching = 0;
*waiting = 0;
}
......@@ -2659,15 +2618,14 @@ parse_the_page:
if (size) *size = (*source) ? flex_size(source) : 0;
html_get_next_token_waiting_jump_point:
#ifdef TRACE
if (tl & (1u<<6))
{
if (!e) Printf("html_get_next_token: Successful\n");
else Printf("html_get_next_token: Exitting with an error\n");
}
#endif
html_get_next_token_waiting_jump_point:
if (!e) dprintf(("Fetc", "html_get_next_token: Successful\n"));
else dprintf(("Fetc", "html_get_next_token: Exitting with an error\n"));
#endif
/* Exit, passing on any error if there is one */
......
......@@ -46,11 +46,6 @@
#include <tboxlibs/window.h>
#include <tboxlibs/gadgets.h>
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "FromROSLib.h"
#include "MiscDefs.h"
......@@ -107,9 +102,9 @@ int fetchpage_fetch(int eventcode, WimpPollBlock * b, IdBlock * idb, browser_dat
{
static oldstatus;
if ((tl & (1u<<6)) && (handle->fetch_status != oldstatus))
if (handle->fetch_status != oldstatus)
{
Printf("\nfetchpage_fetch: Called with new status %d\n",handle->fetch_status);
dprintf(("Fetc", "\nfetchpage_fetch: Called with new status %d\n",handle->fetch_status));
oldstatus = handle->fetch_status;
}
}
......@@ -155,7 +150,7 @@ int fetchpage_fetch(int eventcode, WimpPollBlock * b, IdBlock * idb, browser_dat
else priority = 0;
}
do
// do
{
/* If fetching, call the reformatter. */
......@@ -178,10 +173,10 @@ int fetchpage_fetch(int eventcode, WimpPollBlock * b, IdBlock * idb, browser_dat
_swix(OS_ReadMonotonicTime, _OUT(0), &tf_now);
}
while (
tf_now - tf_start < priority &&
(fetching || formatting)
);
// while (
// tf_now - tf_start < priority &&
// (fetching || formatting)
// );
/* Process images on a lower priority */
......@@ -219,86 +214,86 @@ int fetchpage_fetch(int eventcode, WimpPollBlock * b, IdBlock * idb, browser_dat
image_maybe_gc(handle);
}
if (!reformat_formatting(handle))
if (
!reformat_formatting (handle) &&
!image_count_specific_pending (handle)
)
{
if (!image_count_specific_pending(handle))
{
/* There are no pending images, so we seem to have finished - */
/* but is there a reformat pending? */
if (handle->refo_time)
{
/* Yes, so flush the queue */
reformat_format_from(handle, handle->refo_line, 1, -1);
}
else
{
/* No; get rid of null claimants (the call will *install* a new */
/* animation drift handler if the Controls require it). */
/* There are no pending images, so we seem to have finished - */
/* but is there a reformat pending? */
if (handle->fetch_handler) fetchpage_release_nulls(handle);
if (handle->refo_time)
{
/* Yes, so flush the queue */
/* If flagged to do so, call the image garbage collector */
/* again - after fetching everything free memory may be */
/* getting low. */
reformat_format_from(handle, handle->refo_line, 1, -1);
}
else
{
/* No; get rid of null claimants (the call will *install* a new */
/* animation drift handler if the Controls require it). */
if (handle->clear_images)
{
image_maybe_gc(handle);
handle->clear_images = 0;
}
if (handle->fetch_handler) fetchpage_release_nulls(handle);
/* We may have a pending messages to send */
/* If flagged to do so, call the image garbage collector */
/* again - after fetching everything free memory may be */
/* getting low. */
e = protocols_atats_send_any_pendings(handle);
if (handle->clear_images)
{
image_maybe_gc(handle);
handle->clear_images = 0;
}
/* If this is a small fetch window, close it */
/* We may have a pending messages to send */
if (handle->small_fetch)
{
int close = 1;
e = protocols_atats_send_any_pendings(handle);
/* If this is a fetch for a Plug-In, tell the Plug-In about it */
/* If this is a small fetch window, close it */
if (
handle->pstream &&
handle->pstream->active &&
!handle->pstream->abandoned
)
{
plugin_fetch_completed(handle);
if (handle->small_fetch)
{
int close = 1;
/* Only close the window if the stream won't close itself */
/* If this is a fetch for a Plug-In, tell the Plug-In about it */
if (handle->pstream->will_close_itself) close = 0;
}
if (
handle->pstream &&
handle->pstream->active &&
!handle->pstream->abandoned
)
{
plugin_fetch_completed(handle);
/* Close the window *afterwards* - or you've */
/* just freed up message structures etc. that */
/* need to be dealt with first. */
/* Only close the window if the stream won't close itself */
if (close) windows_close_browser(handle);
if (handle->pstream->will_close_itself) close = 0;
}
/* Otherwise, proceed as normal */
/* Close the window *afterwards* - or you've */
/* just freed up message structures etc. that */
/* need to be dealt with first. */
else
{
/* Check the page's vertical extent is correct */
if (close) windows_close_browser(handle);
}
ChkError(reformat_check_extent(handle));
/* Otherwise, proceed as normal */
/* Update the status bar */
else
{
/* Check the page's vertical extent is correct */
toolbars_cancel_all(handle);
toolbars_update_status(handle, Toolbars_Status_Viewing);
}
ChkError(reformat_check_extent(handle));
/* Report any errors from the pending message sends */
/* Update the status bar */
ChkError(e);
toolbars_cancel_all(handle);
toolbars_update_status(handle, Toolbars_Status_Viewing);
}
/* Report any errors from the pending message sends */
ChkError(e);
}
/* Sort out window tool presence */
......@@ -591,7 +586,7 @@ static _kernel_oserror * fetchpage_process_internal(browser_data * b)
{
#ifdef TRACE
malloccount -= strlen(url_buffer) + 128;
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_process_internal): \0212%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_process_internal): \0212%d\0217\n",malloccount));
#endif
free(url_buffer);
......@@ -603,7 +598,7 @@ static _kernel_oserror * fetchpage_process_internal(browser_data * b)
#ifdef TRACE
malloccount += (strlen(alt_url) + 128);
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_process_internal): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_process_internal): \0211%d\0217\n",malloccount));
#endif
/* Copy the new URL into the buffer */
......@@ -685,9 +680,7 @@ static _kernel_oserror * fetchpage_preprocessed(browser_data * b, int record, in
{
char * url_copy = malloc(strlen(url_buffer) + 1);
#ifdef TRACE
if (tl & (1u<<24)) Printf("fetchpage_preprocessed: JavaScript URL found:\n'\0216%s\0217'\n", url_buffer);
#endif
dprintf(("JScr", "fetchpage_preprocessed: JavaScript URL found:\n'\0216%s\0217'\n", url_buffer));
/* The script may well open a new window, which could run through these */
/* very fetch routines. They aren't multithreaded! So, we need to take */
......@@ -733,7 +726,7 @@ static _kernel_oserror * fetchpage_preprocessed(browser_data * b, int record, in
#ifdef TRACE
malloccount -= strlen(url_buffer) + 128;
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_preprocessed): \0212%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_preprocessed): \0212%d\0217\n",malloccount));
#endif
free(url_buffer);
......@@ -744,7 +737,7 @@ static _kernel_oserror * fetchpage_preprocessed(browser_data * b, int record, in
#ifdef TRACE
malloccount += (strlen(alt_url) + 128);
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_preprocessed): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_preprocessed): \0211%d\0217\n",malloccount));
#endif
/* Copy the new URL into the buffer */
......@@ -868,9 +861,7 @@ static _kernel_oserror * fetchpage_postprocessed(browser_data * b, int record)
{
_kernel_oserror * e;
#ifdef TRACE
if (tl & (1u<<12)) Printf("fetchpage_postprocessed: Chunk CK_FURL set to %d\n",strlen(url_buffer) + 128);
#endif
dprintf(("LMem", "fetchpage_postprocessed: Chunk CK_FURL set to %d\n",strlen(url_buffer) + 128));
e = memory_set_chunk_size(b, NULL, CK_FURL, strlen(url_buffer) + 128);
if (e) return e;
......@@ -940,7 +931,7 @@ _kernel_oserror * fetchpage_postprocess_uri(browser_data * b, char * uri, int re
{
#ifdef TRACE
malloccount -= strlen(url_buffer) + 128;
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_postprocess_uri): \0212%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_postprocess_uri): \0212%d\0217\n",malloccount));
#endif
free(url_buffer);
......@@ -952,7 +943,7 @@ _kernel_oserror * fetchpage_postprocess_uri(browser_data * b, char * uri, int re
#ifdef TRACE
malloccount += (strlen(uri) + 128);
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_postprocess_uri): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_postprocess_uri): \0211%d\0217\n",malloccount));
#endif
/* Copy the URI over and fetch it */
......@@ -1002,7 +993,7 @@ _kernel_oserror * fetchpage_new(browser_data * b, const char * url, int record,
{
#ifdef TRACE
malloccount -= strlen(url_buffer) + 128;
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_new): \0212%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_new): \0212%d\0217\n",malloccount));
#endif
free(url_buffer);
......@@ -1014,7 +1005,7 @@ _kernel_oserror * fetchpage_new(browser_data * b, const char * url, int record,
#ifdef TRACE
malloccount += (strlen(url) + 128);
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_new): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_new): \0211%d\0217\n",malloccount));
#endif
strcpy(url_buffer, url);
......@@ -1089,7 +1080,7 @@ _kernel_oserror * fetchpage_new_add(browser_data * b, const char * url, int reco
{
#ifdef TRACE
malloccount -= strlen(url_buffer) + 128;
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_new_add): \0212%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_new_add): \0212%d\0217\n",malloccount));
#endif
free(url_buffer);
......@@ -1101,7 +1092,7 @@ _kernel_oserror * fetchpage_new_add(browser_data * b, const char * url, int reco
#ifdef TRACE
malloccount += (strlen(url) + strlen(add) + 128);
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_new_add): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_new_add): \0211%d\0217\n",malloccount));
#endif
strcpy(url_buffer, url);
......@@ -1186,7 +1177,7 @@ _kernel_oserror * fetchpage_new_raw(browser_data * b, const char * url, int reco
{
#ifdef TRACE
malloccount -= strlen(url_buffer) + 128;
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_new_raw): \0212%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_new_raw): \0212%d\0217\n",malloccount));
#endif
free(url_buffer);
......@@ -1198,7 +1189,7 @@ _kernel_oserror * fetchpage_new_raw(browser_data * b, const char * url, int reco
#ifdef TRACE
malloccount += (strlen(url) + 128);
if (tl & (1u<<13)) Printf("** malloccount (fetchpage_new_raw): \0211%d\0217\n",malloccount);
dprintf(("CMal", "** malloccount (fetchpage_new_raw): \0211%d\0217\n",malloccount));
#endif
strcpy(url_buffer, url);
......
......@@ -39,11 +39,6 @@
#include <tboxlibs/toolbox.h>
#include <tboxlibs/window.h>
#ifdef TRACE
#define DEBUGLIB
#endif
#include <debuglib/debuglib.h>
#include "Global.h"
#include "Utils.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment