diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-03-21 21:32:15 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-03-21 21:32:15 +0000 |
commit | 7e922c290f8ab3a4f72608da661428f573459e39 (patch) | |
tree | 634ba4c2cca135353c35bd29ac94691717551f1e /riscos | |
parent | 3aeafecd7b547e3f535fb5a700fc20e590dab967 (diff) | |
download | netsurf-7e922c290f8ab3a4f72608da661428f573459e39.tar.gz netsurf-7e922c290f8ab3a4f72608da661428f573459e39.tar.bz2 |
[project @ 2004-03-21 21:32:15 by jmb]
Fix for SparkFS causing problems with uploading zip files.
Map filetypes to mimetype properly.
svn path=/import/netsurf/; revision=646
Diffstat (limited to 'riscos')
-rw-r--r-- | riscos/filetype.c | 16 | ||||
-rw-r--r-- | riscos/gui.c | 6 |
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); } |