From 9e8849c04c5fd6685c8ffe8c7a0f9d91946b8753 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 11 Apr 2010 22:40:41 +0000 Subject: Take the easy way out wrt loading messages files: leave it to the RISC OS frontend to do this. svn path=/trunk/netsurf/; revision=10374 --- desktop/netsurf.c | 6 ++++-- riscos/gui.c | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/desktop/netsurf.c b/desktop/netsurf.c index fcd44f642..f19632026 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -111,8 +111,10 @@ nserror netsurf_init(int *pargc, LOG(("Using '%s' for Options file", options)); options_read(options); - LOG(("Using '%s' as Messages file", messages)); - messages_load(messages); + if (messages != NULL) { + LOG(("Using '%s' as Messages file", messages)); + messages_load(messages); + } lwc_initialise(netsurf_lwc_alloc, NULL, 0); diff --git a/riscos/gui.c b/riscos/gui.c index 774980966..be0ef6844 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -747,9 +747,13 @@ static void gui_init2(int argc, char** argv) /** Normal entry point from OS */ int main(int argc, char** argv) { + char path[40]; + int length; + setbuf(stderr, NULL); -#if RISCOS_MESSAGES_CHOICE + netsurf_init(&argc, &argv, "NetSurf:Choices", NULL); + /* Choose the interface language to use */ ro_gui_choose_language(); @@ -760,9 +764,6 @@ int main(int argc, char** argv) die("Failed to locate Messages resource."); messages_load(path); messages_load("NetSurf:Resources.LangNames"); -#endif - - netsurf_init(&argc, &argv, "NetSurf:Choices", messages); gui_init(argc, argv); -- cgit v1.2.3