summaryrefslogtreecommitdiff
path: root/desktop/netsurf.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-02-09 12:58:15 +0000
committerJames Bursa <james@netsurf-browser.org>2003-02-09 12:58:15 +0000
commita4c5929a2fac1cb0c039b2d009d8093ac81a90d7 (patch)
tree710bf4247d92ec63df7c92815c5360ec907a4b66 /desktop/netsurf.c
parent948dfeb1c2404e6bdad8c20c83a26f3eecb3764a (diff)
downloadnetsurf-a4c5929a2fac1cb0c039b2d009d8093ac81a90d7.tar.gz
netsurf-a4c5929a2fac1cb0c039b2d009d8093ac81a90d7.tar.bz2
[project @ 2003-02-09 12:58:14 by bursa]
Reorganization and rewrite of fetch, cache, and content handling. svn path=/import/netsurf/; revision=96
Diffstat (limited to 'desktop/netsurf.c')
-rw-r--r--desktop/netsurf.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/desktop/netsurf.c b/desktop/netsurf.c
index 144d9fa7d..f8161c975 100644
--- a/desktop/netsurf.c
+++ b/desktop/netsurf.c
@@ -1,23 +1,23 @@
/**
- * $Id: netsurf.c,v 1.5 2002/12/29 22:27:35 monkeyson Exp $
+ * $Id: netsurf.c,v 1.6 2003/02/09 12:58:15 bursa Exp $
*/
#include "netsurf/desktop/netsurf.h"
-#include "netsurf/desktop/fetch.h"
#include "netsurf/desktop/browser.h"
#include "netsurf/desktop/gui.h"
-#include "netsurf/desktop/cache.h"
+#include "netsurf/content/cache.h"
+#include "netsurf/content/fetch.h"
+#include "netsurf/utils/log.h"
#include <stdlib.h>
int netsurf_quit = 0;
gui_window* netsurf_gui_windows = NULL;
-struct fetch* netsurf_fetches = NULL;
void netsurf_poll(void)
{
gui_poll();
- netsurf_fetches = fetch_poll(netsurf_fetches);
+ fetch_poll();
}
@@ -25,6 +25,7 @@ void netsurf_init(int argc, char** argv)
{
stdout = stderr;
gui_init(argc, argv);
+ fetch_init();
cache_init();
}
@@ -32,6 +33,7 @@ void netsurf_init(int argc, char** argv)
void netsurf_exit(void)
{
cache_quit();
+ fetch_quit();
}
@@ -42,21 +44,10 @@ int main(int argc, char** argv)
while (netsurf_quit == 0)
netsurf_poll();
- fprintf(stderr, "Netsurf quit!\n");
+ LOG(("Netsurf quit!"));
netsurf_exit();
return 0;
}
-void Log(char* func, char* msg)
-{
-#ifdef NETSURF_DUMP_MONKEYS
- FILE* logfile = NULL;
- logfile = fopen("logfile","a");
- if (logfile == NULL)
- die("can't open logfile");
- fprintf(logfile, "%s: %s\n", func, msg);
- fclose(logfile);
-#endif
-}