summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
Diffstat (limited to 'riscos')
-rw-r--r--riscos/filetype.c16
-rw-r--r--riscos/gui.c6
2 files changed, 18 insertions, 4 deletions
diff --git a/riscos/filetype.c b/riscos/filetype.c
index 0273558cb..4a4a9c92d 100644
--- a/riscos/filetype.c
+++ b/riscos/filetype.c
@@ -76,6 +76,22 @@ const char *fetch_filetype(const char *unix_path)
}
+char *fetch_mimetype(const char *ro_path) {
+
+ os_error *e;
+ bits filetype;
+ char *mime = xcalloc(256, sizeof(char));
+
+ e = xosfile_read_stamped_no_path(ro_path, 0, 0, 0, 0, 0, &filetype);
+ if (e) return 0;
+
+ e = xmimemaptranslate_filetype_to_mime_type(filetype, mime);
+ if (e) return 0;
+
+ return mime;
+}
+
+
int cmp_type(const void *x, const void *y)
{
const bits *p = x;
diff --git a/riscos/gui.c b/riscos/gui.c
index 7f9631f68..b95ec47a8 100644
--- a/riscos/gui.c
+++ b/riscos/gui.c
@@ -13,6 +13,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include <unixlib/features.h>
#include <unixlib/local.h>
#include "oslib/hourglass.h"
#include "oslib/inetsuite.h"
@@ -49,6 +50,7 @@
const char *__dynamic_da_name = "NetSurf"; /**< For UnixLib. */
+int __feature_imagefs_is_file = 1; /**< For UnixLib. */
char *NETSURF_DIR;
wimp_menu *combo_menu;
@@ -863,8 +865,6 @@ void ro_msg_dataload(wimp_message *message)
if (!temp) break;
if (temp[0] == '#') continue; /* ignore commented lines */
- LOG(("%d: %s", lineno, temp));
-
lineno++;
}
@@ -875,8 +875,6 @@ void ro_msg_dataload(wimp_message *message)
url = xstrdup(temp);
- LOG(("%s", url));
-
xfree(buf);
}