summaryrefslogtreecommitdiff
path: root/atari
diff options
context:
space:
mode:
Diffstat (limited to 'atari')
-rw-r--r--atari/gui.c23
-rwxr-xr-xatari/misc.c22
-rwxr-xr-xatari/misc.h2
3 files changed, 25 insertions, 22 deletions
diff --git a/atari/gui.c b/atari/gui.c
index 49e3046e2..55a23a84a 100644
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -115,6 +115,27 @@ short aes_msg_out[8];
bool gui_window_get_scroll(struct gui_window *w, int *sx, int *sy);
+/**
+ * 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 = strrchr(path, '/');
+ if (!leafname)
+ leafname = path;
+ else
+ leafname += 1;
+
+ return strdup(leafname);
+}
+
static void gui_poll(bool active)
{
@@ -1055,6 +1076,8 @@ static struct gui_browser_table atari_browser_table = {
.quit = gui_quit,
.get_resource_url = gui_get_resource_url,
.cert_verify = gui_cert_verify,
+ .filename_from_path = filename_from_path,
+ .path_add_part = path_add_part,
};
/* #define WITH_DBG_LOGFILE 1 */
diff --git a/atari/misc.c b/atari/misc.c
index d330859b9..ca9e993d9 100755
--- a/atari/misc.c
+++ b/atari/misc.c
@@ -71,28 +71,6 @@ void die(const char *error)
}
/**
- * Return the filename part of a full path
- *
- * \param path full path and filename
- * \return filename (will be freed with free())
- */
-
-char *filename_from_path(char *path)
-{
- char *leafname;
-
- leafname = strrchr(path, '\\');
- if( !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
diff --git a/atari/misc.h b/atari/misc.h
index 8d1719ce8..1bb5e8131 100755
--- a/atari/misc.h
+++ b/atari/misc.h
@@ -66,4 +66,6 @@ const char * file_select(const char * title, const char * name);
*/
long nkc_to_input_key(short nkc, long * ucs4_out);
+bool path_add_part(char *path, int length, const char *newpart);
+
#endif