diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-01-22 23:19:57 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-01-23 00:00:18 +0000 |
commit | 047569339406f2be1637ae4cee5dd0c9a9c2328f (patch) | |
tree | 3d3909b4bc3d27cd7a9e146d32539ce752b33310 /monkey/filetype.c | |
parent | 4684e9665d2ddff50f4a8e9a16d73224d2617180 (diff) | |
download | netsurf-047569339406f2be1637ae4cee5dd0c9a9c2328f.tar.gz netsurf-047569339406f2be1637ae4cee5dd0c9a9c2328f.tar.bz2 |
create table for fetcher operations and move all operations into it
Diffstat (limited to 'monkey/filetype.c')
-rw-r--r-- | monkey/filetype.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/monkey/filetype.c b/monkey/filetype.c index f89f2358c..db9c49ab4 100644 --- a/monkey/filetype.c +++ b/monkey/filetype.c @@ -26,14 +26,15 @@ #include <sys/stat.h> #include <unistd.h> -#include "gtk/filetype.h" #include "content/fetch.h" #include "utils/log.h" #include "utils/hashtable.h" +#include "monkey/filetype.h" + static struct hash_table *mime_hash = NULL; -void gtk_fetch_filetype_init(const char *mimefile) +void monkey_fetch_filetype_init(const char *mimefile) { struct stat statbuf; FILE *fh = NULL; @@ -143,12 +144,12 @@ void gtk_fetch_filetype_init(const char *mimefile) fclose(fh); } -void gtk_fetch_filetype_fin(void) +void monkey_fetch_filetype_fin(void) { hash_destroy(mime_hash); } -const char *fetch_filetype(const char *unix_path) +const char *monkey_fetch_filetype(const char *unix_path) { struct stat statbuf; char *ext; @@ -195,11 +196,6 @@ const char *fetch_filetype(const char *unix_path) return type != NULL ? type : "text/plain"; } -char *fetch_mimetype(const char *unix_path) -{ - return strdup(fetch_filetype(unix_path)); -} - #ifdef TEST_RIG int main(int argc, char *argv[]) |