2003-06-30 16:44:03 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net>
|
2007-05-06 10:11:00 +04:00
|
|
|
* Copyright 2007 James Bursa <bursa@users.sourceforge.net>
|
2004-07-27 00:13:45 +04:00
|
|
|
* Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
|
2007-08-08 20:16:03 +04:00
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2002-09-11 18:24:02 +04:00
|
|
|
*/
|
|
|
|
|
2008-10-14 03:32:21 +04:00
|
|
|
#include <locale.h>
|
2007-10-31 18:39:55 +03:00
|
|
|
#include <signal.h>
|
2003-11-06 22:41:41 +03:00
|
|
|
#include <stdbool.h>
|
2004-09-27 09:21:00 +04:00
|
|
|
#include <stdio.h>
|
2003-11-06 22:41:41 +03:00
|
|
|
#include <stdlib.h>
|
2010-03-28 16:56:39 +04:00
|
|
|
#include <libwapcaplet/libwapcaplet.h>
|
2019-09-07 17:39:59 +03:00
|
|
|
#include <dom/dom.h>
|
2010-03-28 16:56:39 +04:00
|
|
|
|
2017-01-21 17:20:55 +03:00
|
|
|
#include "netsurf/inttypes.h"
|
2007-05-31 02:39:54 +04:00
|
|
|
#include "utils/config.h"
|
2020-04-07 23:19:43 +03:00
|
|
|
#include "utils/errors.h"
|
|
|
|
#include "utils/nscolour.h"
|
2014-10-13 18:08:16 +04:00
|
|
|
#include "utils/nsoption.h"
|
|
|
|
#include "utils/corestrings.h"
|
|
|
|
#include "utils/log.h"
|
2018-08-13 18:50:17 +03:00
|
|
|
#include "utils/string.h"
|
2014-10-13 18:08:16 +04:00
|
|
|
#include "utils/utf8.h"
|
|
|
|
#include "utils/messages.h"
|
2019-09-07 17:23:23 +03:00
|
|
|
#include "utils/useragent.h"
|
2011-05-17 01:16:44 +04:00
|
|
|
#include "content/content_factory.h"
|
2014-06-19 21:27:24 +04:00
|
|
|
#include "content/fetchers.h"
|
2010-04-12 00:21:13 +04:00
|
|
|
#include "content/hlcache.h"
|
2011-09-04 10:28:09 +04:00
|
|
|
#include "content/mimesniff.h"
|
2007-05-31 02:39:54 +04:00
|
|
|
#include "content/urldb.h"
|
2016-06-06 16:47:27 +03:00
|
|
|
#include "css/css.h"
|
|
|
|
#include "image/image.h"
|
|
|
|
#include "image/image_cache.h"
|
2014-10-13 18:08:16 +04:00
|
|
|
#include "javascript/js.h"
|
2018-05-10 13:34:26 +03:00
|
|
|
#include "html/html.h"
|
|
|
|
#include "text/textplain.h"
|
2014-10-13 18:08:16 +04:00
|
|
|
|
2016-05-30 19:32:57 +03:00
|
|
|
#include "netsurf/browser_window.h"
|
2014-01-10 18:32:29 +04:00
|
|
|
#include "desktop/system_colour.h"
|
2020-02-23 20:20:45 +03:00
|
|
|
#include "desktop/page-info.h"
|
2011-01-20 16:51:41 +03:00
|
|
|
#include "desktop/searchweb.h"
|
2016-05-30 13:23:32 +03:00
|
|
|
#include "netsurf/misc.h"
|
2014-10-16 12:48:09 +04:00
|
|
|
#include "desktop/gui_internal.h"
|
2016-05-30 13:51:10 +03:00
|
|
|
#include "netsurf/netsurf.h"
|
2002-09-11 18:24:02 +04:00
|
|
|
|
2019-08-04 12:47:00 +03:00
|
|
|
|
|
|
|
/** \todo QUERY - Remove this import later */
|
|
|
|
#include "desktop/browser_private.h"
|
|
|
|
|
2011-09-07 13:15:33 +04:00
|
|
|
/** speculative pre-conversion small image size
|
|
|
|
*
|
|
|
|
* Experimenting by visiting every page from default page in order and
|
|
|
|
* then netsurf homepage
|
|
|
|
*
|
|
|
|
* 0 : Cache hit/miss/speculative miss/fail 604/147/ 0/0 (80%/19%/ 0%/ 0%)
|
|
|
|
* 2048 : Cache hit/miss/speculative miss/fail 622/119/ 17/0 (82%/15%/ 2%/ 0%)
|
|
|
|
* 4096 : Cache hit/miss/speculative miss/fail 656/109/ 25/0 (83%/13%/ 3%/ 0%)
|
|
|
|
* 8192 : Cache hit/miss/speculative miss/fail 648/104/ 40/0 (81%/13%/ 5%/ 0%)
|
|
|
|
* ALL : Cache hit/miss/speculative miss/fail 775/ 0/161/0 (82%/ 0%/17%/ 0%)
|
|
|
|
*/
|
|
|
|
#define SPECULATE_SMALL 4096
|
|
|
|
|
2014-03-22 18:54:51 +04:00
|
|
|
/** the time between image cache clean runs in ms. */
|
2011-09-07 13:15:33 +04:00
|
|
|
#define IMAGE_CACHE_CLEAN_TIME (10 * 1000)
|
|
|
|
|
2014-03-22 18:54:51 +04:00
|
|
|
/** default time between content cache cleans. */
|
2011-09-10 04:55:39 +04:00
|
|
|
#define HL_CACHE_CLEAN_TIME (2 * IMAGE_CACHE_CLEAN_TIME)
|
2011-09-08 16:04:57 +04:00
|
|
|
|
2014-03-22 18:54:51 +04:00
|
|
|
/** ensure there is a minimal amount of memory for source objetcs and
|
|
|
|
* decoded bitmaps.
|
|
|
|
*/
|
|
|
|
#define MINIMUM_MEMORY_CACHE_SIZE (2 * 1024 * 1024)
|
|
|
|
|
2014-11-28 22:17:42 +03:00
|
|
|
/** default minimum object time before object is pushed to backing store. (s) */
|
|
|
|
#define LLCACHE_STORE_MIN_LIFETIME (60 * 30)
|
|
|
|
|
|
|
|
/** default minimum bandwidth for backing store writeout. (byte/s) */
|
|
|
|
#define LLCACHE_STORE_MIN_BANDWIDTH (128 * 1024)
|
|
|
|
|
|
|
|
/** default maximum bandwidth for backing store writeout. (byte/s) */
|
|
|
|
#define LLCACHE_STORE_MAX_BANDWIDTH (1024 * 1024)
|
|
|
|
|
|
|
|
/** default time quantum with which to calculate bandwidth (ms) */
|
|
|
|
#define LLCACHE_STORE_TIME_QUANTUM (100)
|
|
|
|
|
2010-04-28 02:14:52 +04:00
|
|
|
static void netsurf_lwc_iterator(lwc_string *str, void *pw)
|
|
|
|
{
|
2019-05-06 15:04:01 +03:00
|
|
|
NSLOG(netsurf, WARNING, "[%3u] %.*s", str->refcnt,
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
(int)lwc_string_length(str), lwc_string_data(str));
|
2010-04-28 02:14:52 +04:00
|
|
|
}
|
|
|
|
|
2016-05-30 13:51:10 +03:00
|
|
|
/* exported interface documented in netsurf/netsurf.h */
|
2015-06-19 18:29:42 +03:00
|
|
|
nserror netsurf_init(const char *store_path)
|
2002-09-11 18:24:02 +04:00
|
|
|
{
|
2014-03-22 18:54:51 +04:00
|
|
|
nserror ret;
|
2011-09-08 16:04:57 +04:00
|
|
|
struct hlcache_parameters hlcache_parameters = {
|
|
|
|
.bg_clean_time = HL_CACHE_CLEAN_TIME,
|
2014-03-22 18:54:51 +04:00
|
|
|
.llcache = {
|
2014-11-28 22:17:42 +03:00
|
|
|
.minimum_lifetime = LLCACHE_STORE_MIN_LIFETIME,
|
|
|
|
.minimum_bandwidth = LLCACHE_STORE_MIN_BANDWIDTH,
|
|
|
|
.maximum_bandwidth = LLCACHE_STORE_MAX_BANDWIDTH,
|
|
|
|
.time_quantum = LLCACHE_STORE_TIME_QUANTUM,
|
2014-03-22 18:54:51 +04:00
|
|
|
}
|
2011-09-08 16:04:57 +04:00
|
|
|
};
|
2011-09-07 13:15:33 +04:00
|
|
|
struct image_cache_parameters image_cache_parameters = {
|
|
|
|
.bg_clean_time = IMAGE_CACHE_CLEAN_TIME,
|
|
|
|
.speculative_small = SPECULATE_SMALL
|
|
|
|
};
|
2011-09-10 04:55:39 +04:00
|
|
|
|
2010-01-31 03:36:02 +03:00
|
|
|
#ifdef HAVE_SIGPIPE
|
2007-10-31 18:39:55 +03:00
|
|
|
/* Ignore SIGPIPE - this is necessary as OpenSSL can generate these
|
|
|
|
* and the default action is to terminate the app. There's no easy
|
|
|
|
* way of determining the cause of the SIGPIPE (other than using
|
|
|
|
* sigaction() and some mechanism for getting the file descriptor
|
|
|
|
* out of libcurl). However, we expect nothing else to generate a
|
2013-05-23 12:29:00 +04:00
|
|
|
* SIGPIPE, anyway, so may as well just ignore them all.
|
|
|
|
*/
|
2007-10-31 18:39:55 +03:00
|
|
|
signal(SIGPIPE, SIG_IGN);
|
2010-01-31 03:36:02 +03:00
|
|
|
#endif
|
2007-10-31 18:39:55 +03:00
|
|
|
|
2012-07-22 18:48:55 +04:00
|
|
|
/* corestrings init */
|
2014-03-22 18:54:51 +04:00
|
|
|
ret = corestrings_init();
|
|
|
|
if (ret != NSERROR_OK)
|
|
|
|
return ret;
|
2012-07-22 18:48:55 +04:00
|
|
|
|
2020-04-07 23:19:43 +03:00
|
|
|
ret = nscolour_update();
|
|
|
|
if (ret != NSERROR_OK)
|
|
|
|
return ret;
|
|
|
|
|
2011-09-10 04:55:39 +04:00
|
|
|
/* set up cache limits based on the memory cache size option */
|
2014-03-22 18:54:51 +04:00
|
|
|
hlcache_parameters.llcache.limit = nsoption_int(memory_cache_size);
|
2011-09-10 04:55:39 +04:00
|
|
|
|
2014-03-22 18:54:51 +04:00
|
|
|
if (hlcache_parameters.llcache.limit < MINIMUM_MEMORY_CACHE_SIZE) {
|
|
|
|
hlcache_parameters.llcache.limit = MINIMUM_MEMORY_CACHE_SIZE;
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO,
|
|
|
|
"Setting minimum memory cache size %"PRIsizet,
|
|
|
|
hlcache_parameters.llcache.limit);
|
2011-09-10 04:55:39 +04:00
|
|
|
}
|
|
|
|
|
2015-11-11 00:51:54 +03:00
|
|
|
/* Set up the max attempts made to fetch a timing out resource */
|
|
|
|
hlcache_parameters.llcache.fetch_attempts = nsoption_uint(max_retried_fetches);
|
|
|
|
|
2011-09-10 04:55:39 +04:00
|
|
|
/* image cache is 25% of total memory cache size */
|
2021-01-25 16:39:28 +03:00
|
|
|
image_cache_parameters.limit = hlcache_parameters.llcache.limit / 4;
|
2011-09-10 04:55:39 +04:00
|
|
|
|
2013-05-27 03:32:08 +04:00
|
|
|
/* image cache hysteresis is 20% of the image cache size */
|
2021-01-25 16:39:28 +03:00
|
|
|
image_cache_parameters.hysteresis = image_cache_parameters.limit / 5;
|
2011-09-10 04:55:39 +04:00
|
|
|
|
|
|
|
/* account for image cache use from total */
|
2014-03-22 18:54:51 +04:00
|
|
|
hlcache_parameters.llcache.limit -= image_cache_parameters.limit;
|
|
|
|
|
|
|
|
/* set backing store target limit */
|
2014-06-09 16:10:56 +04:00
|
|
|
hlcache_parameters.llcache.store.limit = nsoption_uint(disc_cache_size);
|
2014-03-22 18:54:51 +04:00
|
|
|
|
|
|
|
/* set backing store hysterissi to 20% */
|
2021-01-25 16:39:28 +03:00
|
|
|
hlcache_parameters.llcache.store.hysteresis = hlcache_parameters.llcache.store.limit / 5;
|
2014-03-22 18:54:51 +04:00
|
|
|
|
|
|
|
/* set the path to the backing store */
|
2020-02-24 18:33:19 +03:00
|
|
|
hlcache_parameters.llcache.store.path =
|
|
|
|
nsoption_charp(disc_cache_path) ?
|
|
|
|
nsoption_charp(disc_cache_path) :
|
|
|
|
store_path;
|
2011-09-10 04:55:39 +04:00
|
|
|
|
2011-09-07 13:15:33 +04:00
|
|
|
/* image handler bitmap cache */
|
2014-03-22 18:54:51 +04:00
|
|
|
ret = image_cache_init(&image_cache_parameters);
|
|
|
|
if (ret != NSERROR_OK)
|
|
|
|
return ret;
|
2011-09-07 13:15:33 +04:00
|
|
|
|
|
|
|
/* content handler initialisation */
|
2014-03-22 18:54:51 +04:00
|
|
|
ret = nscss_init();
|
|
|
|
if (ret != NSERROR_OK)
|
|
|
|
return ret;
|
2011-05-07 00:40:09 +04:00
|
|
|
|
2014-03-22 18:54:51 +04:00
|
|
|
ret = html_init();
|
|
|
|
if (ret != NSERROR_OK)
|
|
|
|
return ret;
|
2011-05-07 00:40:09 +04:00
|
|
|
|
2014-03-22 18:54:51 +04:00
|
|
|
ret = image_init();
|
|
|
|
if (ret != NSERROR_OK)
|
|
|
|
return ret;
|
2011-05-07 00:40:09 +04:00
|
|
|
|
2014-03-22 18:54:51 +04:00
|
|
|
ret = textplain_init();
|
|
|
|
if (ret != NSERROR_OK)
|
|
|
|
return ret;
|
2011-05-07 00:40:09 +04:00
|
|
|
|
2016-09-30 00:37:10 +03:00
|
|
|
setlocale(LC_ALL, "");
|
2010-03-30 00:03:44 +04:00
|
|
|
|
2014-01-19 22:17:32 +04:00
|
|
|
/* initialise the fetchers */
|
2014-06-19 21:27:24 +04:00
|
|
|
ret = fetcher_init();
|
2014-03-22 18:54:51 +04:00
|
|
|
if (ret != NSERROR_OK)
|
|
|
|
return ret;
|
2011-03-13 21:26:46 +03:00
|
|
|
|
|
|
|
/* Initialise the hlcache and allow it to init the llcache for us */
|
2014-03-22 18:54:51 +04:00
|
|
|
ret = hlcache_initialise(&hlcache_parameters);
|
|
|
|
if (ret != NSERROR_OK)
|
|
|
|
return ret;
|
2010-03-30 00:03:44 +04:00
|
|
|
|
2011-01-30 16:40:47 +03:00
|
|
|
/* Initialize system colours */
|
2014-03-22 18:54:51 +04:00
|
|
|
ret = ns_system_colour_init();
|
|
|
|
if (ret != NSERROR_OK)
|
|
|
|
return ret;
|
2011-01-30 16:40:47 +03:00
|
|
|
|
2012-01-02 01:42:38 +04:00
|
|
|
js_initialise();
|
|
|
|
|
2020-02-23 20:20:45 +03:00
|
|
|
ret = page_info_init();
|
|
|
|
if (ret != NSERROR_OK) {
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2014-03-22 18:54:51 +04:00
|
|
|
return NSERROR_OK;
|
2002-11-03 12:39:53 +03:00
|
|
|
}
|
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
|
2003-11-06 22:41:41 +03:00
|
|
|
/**
|
|
|
|
* Clean up components used by gui NetSurf.
|
|
|
|
*/
|
2002-10-15 14:41:12 +04:00
|
|
|
|
2003-11-06 22:41:41 +03:00
|
|
|
void netsurf_exit(void)
|
|
|
|
{
|
2011-03-13 23:20:31 +03:00
|
|
|
hlcache_stop();
|
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Closing GUI");
|
2016-04-16 00:50:28 +03:00
|
|
|
guit->misc->quit();
|
2020-02-23 20:20:45 +03:00
|
|
|
|
|
|
|
NSLOG(netsurf, INFO, "Finalising page-info module");
|
|
|
|
page_info_fini();
|
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Finalising JavaScript");
|
2012-06-30 00:37:32 +04:00
|
|
|
js_finalise();
|
2011-01-30 16:40:47 +03:00
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Finalising Web Search");
|
2014-05-25 03:57:48 +04:00
|
|
|
search_web_finalise();
|
2011-01-30 16:40:47 +03:00
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Finalising high-level cache");
|
2010-12-16 03:03:57 +03:00
|
|
|
hlcache_finalise();
|
2011-01-30 16:40:47 +03:00
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Closing fetches");
|
2014-06-19 21:27:24 +04:00
|
|
|
fetcher_quit();
|
2019-09-07 17:23:23 +03:00
|
|
|
/* Now the fetchers are done, our user-agent string can go */
|
|
|
|
free_user_agent_string();
|
2011-01-30 16:40:47 +03:00
|
|
|
|
2011-09-07 13:15:33 +04:00
|
|
|
/* dump any remaining cache entries */
|
|
|
|
image_cache_fini();
|
|
|
|
|
2011-09-16 02:47:50 +04:00
|
|
|
/* Clean up after content handlers */
|
2011-05-17 01:16:44 +04:00
|
|
|
content_factory_fini();
|
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Closing utf8");
|
2005-07-11 22:10:10 +04:00
|
|
|
utf8_finalise();
|
2011-01-30 16:40:47 +03:00
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Destroying URLdb");
|
2006-12-09 01:38:46 +03:00
|
|
|
urldb_destroy();
|
2011-01-30 16:40:47 +03:00
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Destroying System colours");
|
2014-01-10 18:32:29 +04:00
|
|
|
ns_system_colour_finalize();
|
2011-01-30 16:40:47 +03:00
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Destroying Messages");
|
2016-12-11 19:43:48 +03:00
|
|
|
messages_destroy();
|
|
|
|
|
2012-07-22 18:48:55 +04:00
|
|
|
corestrings_fini();
|
2019-09-07 17:39:59 +03:00
|
|
|
if (dom_namespace_finalise() != DOM_NO_ERR) {
|
|
|
|
NSLOG(netsurf, WARNING, "Unable to finalise DOM namespace strings");
|
|
|
|
}
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Remaining lwc strings:");
|
2010-04-28 02:14:52 +04:00
|
|
|
lwc_iterate_strings(netsurf_lwc_iterator, NULL);
|
2011-01-30 16:40:47 +03:00
|
|
|
|
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done
@@ expression E; @@
-LOG(E);
+NSLOG(netsurf, INFO, E);
@@ expression E, E1; @@
-LOG(E, E1);
+NSLOG(netsurf, INFO, E, E1);
@@ expression E, E1, E2; @@
-LOG(E, E1, E2);
+NSLOG(netsurf, INFO, E, E1, E2);
@@ expression E, E1, E2, E3; @@
-LOG(E, E1, E2, E3);
+NSLOG(netsurf, INFO, E, E1, E2, E3);
@@ expression E, E1, E2, E3, E4; @@
-LOG(E, E1, E2, E3, E4);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4);
@@ expression E, E1, E2, E3, E4, E5; @@
-LOG(E, E1, E2, E3, E4, E5);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5);
@@ expression E, E1, E2, E3, E4, E5, E6; @@
-LOG(E, E1, E2, E3, E4, E5, E6);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6);
@@ expression E, E1, E2, E3, E4, E5, E6, E7; @@
-LOG(E, E1, E2, E3, E4, E5, E6, E7);
+NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
2017-09-06 20:28:12 +03:00
|
|
|
NSLOG(netsurf, INFO, "Exited successfully");
|
2002-09-11 18:24:02 +04:00
|
|
|
}
|