From 047569339406f2be1637ae4cee5dd0c9a9c2328f Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 22 Jan 2014 23:19:57 +0000 Subject: create table for fetcher operations and move all operations into it --- monkey/filetype.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'monkey/filetype.c') 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 #include -#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[]) -- cgit v1.2.3