summaryrefslogtreecommitdiff
path: root/desktop/netsurf.c
diff options
context:
space:
mode:
authorPhil Mellor <phil@monkeyson.info>2002-09-11 14:24:02 +0000
committerPhil Mellor <phil@monkeyson.info>2002-09-11 14:24:02 +0000
commit811106028fd050cdee11fbc8732ba39f2de5e12a (patch)
tree0194609193dc142881958ff81bef57f07da71b54 /desktop/netsurf.c
parenta46eef0002d061c3363756182a592be7646ae79b (diff)
downloadnetsurf-811106028fd050cdee11fbc8732ba39f2de5e12a.tar.gz
netsurf-811106028fd050cdee11fbc8732ba39f2de5e12a.tar.bz2
[project @ 2002-09-11 14:24:02 by monkeyson]
RISC OS Wimp GUI. svn path=/import/netsurf/; revision=33
Diffstat (limited to 'desktop/netsurf.c')
-rw-r--r--desktop/netsurf.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/desktop/netsurf.c b/desktop/netsurf.c
new file mode 100644
index 000000000..cc53acc05
--- /dev/null
+++ b/desktop/netsurf.c
@@ -0,0 +1,50 @@
+/**
+ * $Id: netsurf.c,v 1.1 2002/09/11 14:24:02 monkeyson Exp $
+ */
+
+#include "netsurf/desktop/netsurf.h"
+#include "netsurf/desktop/fetch.h"
+#include "netsurf/desktop/browser.h"
+#include "netsurf/desktop/gui.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);
+}
+
+
+void netsurf_init(int argc, char** argv)
+{
+ gui_init(argc, argv);
+}
+
+
+int main(int argc, char** argv)
+{
+ netsurf_init(argc, argv);
+
+ while (netsurf_quit == 0)
+ netsurf_poll();
+
+ return 0;
+}
+
+
+void Log(char* func, char* msg)
+{
+#ifdef NETSURF_DUMP
+ 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
+}