[elinks-users] Re: Re: Elinks <local-file>

Petr Baudis pasky at ucw.cz
Wed Oct 15 13:14:34 PDT 2003


Dear diary, on Wed, Oct 15, 2003 at 09:48:36PM CEST, I got a letter,
where Jean-Yves Levesque <jyves at nortelnetworks.com> told me, that...
> 
> Sorry to follow up on my post but I found a work around:
> 
> in module src/mime/backend/mimetypes.c
> 
> replace in init_mimetypes_map:
> 
> 
>         unsigned char *path;
> 
>         if (!get_opt_bool_tree(mimetypes_tree, "enable"))
>                 return NULL;
> 
> by
> 
>         unsigned char *path;
> 
>         if ( mimetypes_tree == NULL )
>                 init_mimetypes() ;
> 
>         if (!get_opt_bool_tree(mimetypes_tree, "enable"))
>                 return NULL;
> 
> 
> and add :
> 
> static void init_mimetypes(void) ;
> 
> before:
> 
> static void
> done_mimetypes_entry(struct mimetypes_entry *entry)
> 
> works for me.

That's strange, we should never call init_mimetypes_map() before
init_mimetypes()... right? It looks like init_mimetypes() wasn't called
although it should have been.

It should be called through init_mime_backends() which should be called
init_mime(). Could you please check (try inserting debug("x") calls
there) if these functions are called or not? And, in turn, if
init_mimetypes_map() is called then?

-- 
 
				Petr "Pasky" Baudis
.
To get something done, a committee should consist of no more than three
persons, two of them absent.
.
Stuff: http://pasky.ji.cz/



More information about the elinks-users mailing list