From d6eb28d5deef18c9b3fdb953553705b182ea8403 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Fri, 9 Jul 2010 19:45:44 +0000 Subject: Replace unnecessarily complicated path concatenation with something simpler and easily adaptable to different platform path structures. svn path=/trunk/netsurf/; revision=10621 --- amiga/misc.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'amiga/misc.c') diff --git a/amiga/misc.c b/amiga/misc.c index 17ea4c22b..8b148d852 100755 --- a/amiga/misc.c +++ b/amiga/misc.c @@ -106,6 +106,21 @@ char *filename_from_path(char *path) return strdup(FilePart(path)); } +/** + * Add a path component/filename to an existing path + * + * \param path buffer containing path + free space + * \param length length of buffer "path" + * \param newpart string containing path component to add to path + * \return true on success + */ + +bool path_add_part(char *path, int length, char *newpart) +{ + if(AddPart(path, newpart, length)) return true; + else return false; +} + /** * returns a string without escape chars or |M chars. * (based on remove_underscores from utils.c) -- cgit v1.2.3