mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-23 23:09:39 +03:00
53c0e810e5
LOG(()) macro for easier debugging. svn path=/import/netsurf/; revision=41
52 lines
878 B
C
52 lines
878 B
C
/**
|
|
* $Id: netsurf.c,v 1.2 2002/10/08 09:38:29 bursa 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)
|
|
{
|
|
stdout = stderr;
|
|
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
|
|
}
|