diff options
Diffstat (limited to 'gtk/fetch.c')
-rw-r--r-- | gtk/fetch.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/gtk/fetch.c b/gtk/fetch.c index 8db102ce8..a76ad9f4d 100644 --- a/gtk/fetch.c +++ b/gtk/fetch.c @@ -226,45 +226,6 @@ const char *fetch_filetype(const char *unix_path) return type; } -/** - * Return the filename part of a full path - * - * \param path full path and filename - * \return filename (will be freed with free()) - */ -static char *filename_from_path(char *path) -{ - char *leafname; - - leafname = strrchr(path, '/'); - if (!leafname) { - leafname = path; - } else { - leafname += 1; - } - - return strdup(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 - */ -static bool path_add_part(char *path, int length, const char *newpart) -{ - if (path[strlen(path) - 1] != '/') { - strncat(path, "/", length); - } - - strncat(path, newpart, length); - - return true; -} - char *path_to_url(const char *path) { int urllen; @@ -337,14 +298,11 @@ static nsurl *gui_get_resource_url(const char *path) } static struct gui_fetch_table fetch_table = { - .filename_from_path = filename_from_path, - .path_add_part = path_add_part, .filetype = fetch_filetype, .path_to_url = path_to_url, .url_to_path = url_to_path, .get_resource_url = gui_get_resource_url, - }; struct gui_fetch_table *nsgtk_fetch_table = &fetch_table; |