From 895c2e2896e48802067cc95e0093f95b6dbc6556 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Sun, 15 Jul 2007 17:20:25 +0000 Subject: Remove dead code at the end of ro_gui_default_language(). svn path=/trunk/netsurf/; revision=3417 --- riscos/gui.c | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/riscos/gui.c b/riscos/gui.c index 23ad41924..e0ccfb048 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -3,7 +3,7 @@ * Licensed under the GNU General Public License, * http://www.opensource.org/licenses/gpl-license * Copyright 2003 Phil Mellor - * Copyright 2004 James Bursa + * Copyright 2004-2007 James Bursa * Copyright 2003 John M Bell * Copyright 2005 Richard Wilson * Copyright 2004 Andrew Timmins @@ -21,24 +21,24 @@ #include #include #include -#include "curl/curl.h" -#include "oslib/font.h" -#include "oslib/help.h" -#include "oslib/hourglass.h" -#include "oslib/inetsuite.h" -#include "oslib/os.h" -#include "oslib/osbyte.h" -#include "oslib/osfile.h" -#include "oslib/osfscontrol.h" -#include "oslib/osgbpb.h" -#include "oslib/osmodule.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include "oslib/pdriver.h" -#include "oslib/plugin.h" -#include "oslib/wimp.h" -#include "oslib/wimpspriteop.h" -#include "oslib/uri.h" -#include "rufl.h" +#include +#include +#include +#include +#include +#include #include "utils/config.h" #include "content/content.h" #include "content/urldb.h" @@ -579,9 +579,11 @@ void ro_gui_choose_language(void) } option_language = strdup(ro_gui_default_language()); - assert(option_language); + if (!option_language) + die("Out of memory"); option_accept_language = strdup(option_language); - assert(option_accept_language); + if (!option_accept_language) + die("Out of memory"); } @@ -591,7 +593,9 @@ void ro_gui_choose_language(void) * RISC OS has no standard way of determining which language the user prefers. * We have to guess from the 'Country' setting. */ -const char *ro_gui_default_language(void) { + +const char *ro_gui_default_language(void) +{ char path[40]; const char *lang; int country; @@ -625,10 +629,6 @@ const char *ro_gui_default_language(void) { if (is_dir(path)) return lang; return "en"; - option_language = strdup("en"); - assert(option_language); - if (!option_accept_language) - option_accept_language = strdup(option_language); } -- cgit v1.2.3