summaryrefslogtreecommitdiff
path: root/amiga/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'amiga/misc.c')
-rwxr-xr-xamiga/misc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/amiga/misc.c b/amiga/misc.c
index cee6aa688..f492fcf8a 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008, 2009 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2010 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -24,6 +24,7 @@
#include "utils/messages.h"
#include <stdlib.h>
#include <curl/curl.h>
+#include "utils/utils.h"
void warn_user(const char *warning, const char *detail)
{
@@ -84,6 +85,18 @@ char *path_to_url(const char *path)
}
/**
+ * 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)
+{
+ return strdup(FilePart(path));
+}
+
+/**
* returns a string without escape chars or |M chars.
* (based on remove_underscores from utils.c)
* \param translate true to insert a linebreak where there was |M,