aboutsummaryrefslogtreecommitdiffstats
path: root/rc.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-11-30 09:54:22 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-11-30 09:54:22 +0000
commitc5cd840adbf340d49711434a9c1a782aa8923fbc (patch)
treee0adca641c0e9219d71f33b9e0cb5215474bc6d2 /rc.c
parent[w3m-dev 02590] (diff)
downloadw3m-c5cd840adbf340d49711434a9c1a782aa8923fbc.tar.gz
w3m-c5cd840adbf340d49711434a9c1a782aa8923fbc.zip
[w3m-dev 02592] Accept: and AcceptEncoding:
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to 'rc.c')
-rw-r--r--rc.c69
1 files changed, 1 insertions, 68 deletions
diff --git a/rc.c b/rc.c
index 923d14b..5bfcd1f 100644
--- a/rc.c
+++ b/rc.c
@@ -1,4 +1,4 @@
-/* $Id: rc.c,v 1.17 2001/11/30 04:52:57 ukai Exp $ */
+/* $Id: rc.c,v 1.18 2001/11/30 09:54:22 ukai Exp $ */
/*
* Initialization file etc.
*/
@@ -1072,73 +1072,6 @@ do_mkdir(const char *dir, long mode)
#define do_mkdir(dir,mode) mkdir(dir,mode)
#endif /* not __EMX__ */
-struct table2 *
-loadMimeTypes(char *filename)
-{
- FILE *f;
- char *d, *type;
- int i, n;
- Str tmp;
- struct table2 *mtypes;
-
- f = fopen(expandName(filename), "r");
- if (f == NULL)
- return NULL;
- n = 0;
- while (tmp = Strfgets(f), tmp->length > 0) {
- d = tmp->ptr;
- if (d[0] != '#') {
- d = strtok(d, " \t\n\r");
- if (d != NULL) {
- d = strtok(NULL, " \t\n\r");
- for (i = 0; d != NULL; i++)
- d = strtok(NULL, " \t\n\r");
- n += i;
- }
- }
- }
- fseek(f, 0, 0);
- mtypes = New_N(struct table2, n + 1);
- i = 0;
- while (tmp = Strfgets(f), tmp->length > 0) {
- d = tmp->ptr;
- if (d[0] == '#')
- continue;
- type = strtok(d, " \t\n\r");
- if (type == NULL)
- continue;
- while (1) {
- d = strtok(NULL, " \t\n\r");
- if (d == NULL)
- break;
- mtypes[i].item1 = Strnew_charp(d)->ptr;
- mtypes[i].item2 = Strnew_charp(type)->ptr;
- i++;
- }
- }
- mtypes[i].item1 = NULL;
- mtypes[i].item2 = NULL;
- fclose(f);
- return mtypes;
-}
-
-void
-initMimeTypes()
-{
- int i;
- TextListItem *tl;
-
- if (non_null(mimetypes_files))
- mimetypes_list = make_domain_list(mimetypes_files);
- else
- mimetypes_list = NULL;
- if (mimetypes_list == NULL)
- return;
- UserMimeTypes = New_N(struct table2 *, mimetypes_list->nitem);
- for (i = 0, tl = mimetypes_list->first; tl; i++, tl = tl->next)
- UserMimeTypes[i] = loadMimeTypes(tl->ptr);
-}
-
void
sync_with_option(void)
{