Refactor main into the frontends

remove unused embedded global

svn path=/trunk/netsurf/; revision=9851
This commit is contained in:
Vincent Sanders 2010-01-20 20:32:30 +00:00
parent 192d05c20c
commit e01d93f344
7 changed files with 35 additions and 14 deletions

View File

@ -240,6 +240,13 @@ STRPTR ami_locale_langs(void)
return acceptlangs;
}
/** Normal entry point from OS */
int main(int argc, char** argv)
{
setbuf(stderr, NULL);
return netsurf_main(argc, argv);
}
void gui_init(int argc, char** argv)
{
struct Locale *locale;

View File

@ -420,6 +420,13 @@ static int32 bapp_thread(void *arg)
return 0;
}
/** Normal entry point from OS */
int main(int argc, char** argv)
{
setbuf(stderr, NULL);
return netsurf_main(argc, argv);
}
void gui_init(int argc, char** argv)
{
char buf[PATH_MAX];

View File

@ -40,25 +40,12 @@
#include "utils/utils.h"
bool netsurf_quit = false;
bool netsurf_embedded = true;
bool verbose_log = false;
static void netsurf_poll(void);
static void lib_init(void);
/**
* The regular main(), when not embedded
*/
int main(int argc, char** argv)
{
setbuf(stderr, NULL);
netsurf_embedded = false;
return netsurf_main(argc, argv);
}
/**
* Gui NetSurf main().
*/

View File

@ -22,7 +22,6 @@
#include <stdbool.h>
extern bool netsurf_quit;
extern bool netsurf_embedded;
extern bool verbose_log;
extern const char * const netsurf_version;
extern const int netsurf_version_major;

View File

@ -409,6 +409,13 @@ static bool process_cmdline(int argc, char** argv)
return true;
}
/** Normal entry point from OS */
int main(int argc, char** argv)
{
setbuf(stderr, NULL);
return netsurf_main(argc, argv);
}
void gui_init(int argc, char** argv)
{
char buf[PATH_MAX];

View File

@ -195,6 +195,13 @@ static void *myrealloc(void *ptr, size_t len, void *pw)
return realloc(ptr, len);
}
/** Normal entry point from OS */
int main(int argc, char** argv)
{
setbuf(stderr, NULL);
return netsurf_main(argc, argv);
}
void gui_init(int argc, char** argv)
{
char buf[PATH_MAX];

View File

@ -275,6 +275,13 @@ static void *myrealloc(void *ptr, size_t len, void *pw)
return realloc(ptr, len);
}
/** Normal entry point from OS */
int main(int argc, char** argv)
{
setbuf(stderr, NULL);
return netsurf_main(argc, argv);
}
/**
* Initialise the gui (RISC OS specific part).
*/