From d0ad76a77a78b12d2e62cba3b2646a5abb104cc4 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 29 Oct 2011 13:35:55 +0000 Subject: Simplify svn path=/trunk/netsurf/; revision=13097 --- amiga/gui.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/amiga/gui.c b/amiga/gui.c index ee0af84a6..dee27107c 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -209,7 +209,7 @@ STRPTR ami_locale_langs(void) return acceptlangs; } -bool ami_gui_locate_resource_map(char **remapped, const char *path, const char *file) +bool ami_gui_map_filename(char **remapped, const char *path, const char *file, const char *map) { BPTR fh = 0; char mapfile[1024]; @@ -218,7 +218,7 @@ bool ami_gui_locate_resource_map(char **remapped, const char *path, const char * bool found = false; strcpy(mapfile, path); - path_add_part(mapfile, 1024, "Resource.map"); + path_add_part(mapfile, 1024, map); if(fh = FOpen(mapfile, MODE_OLDFILE, 0)) { @@ -256,10 +256,8 @@ bool ami_gui_check_resource(char *fullpath, const char *file) char *remapped; BPTR lock = 0; - if(free_rmap = ami_gui_locate_resource_map(&remapped, fullpath, file)) - path_add_part(fullpath, 1024, remapped); - else - path_add_part(fullpath, 1024, file); + ami_gui_map_filename(&remapped, fullpath, file, "Resource.map")) + path_add_part(fullpath, 1024, remapped); if(lock = Lock(fullpath, ACCESS_READ)) { @@ -267,9 +265,8 @@ bool ami_gui_check_resource(char *fullpath, const char *file) found = true; } - if(free_rmap) free(remapped); - LOG(("Checking for %s : result %ld", fullpath, found)); + free(remapped); return found; } -- cgit v1.2.3