diff options
Diffstat (limited to 'riscos/gui.c')
-rw-r--r-- | riscos/gui.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/riscos/gui.c b/riscos/gui.c index eaba7bf58..0c04d69a5 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -2478,3 +2478,22 @@ char *filename_from_path(char *path) return leafname; } + +/** + * 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(path[strlen(path)] != '.') + strncat(path, ".", length); + + strncat(path, newpart, length); + + return true; +} |