diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-05-10 19:32:21 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-05-10 19:32:21 +0000 |
commit | 38bcb14d7765a1231527f65f9a1c3d9e8045697e (patch) | |
tree | 683922a5bc44430a5b47ed30ce18fa96c9ae54d1 /amiga/plugin_hack.c | |
parent | 4f8995ae8d82d462af895468757e7de614c70127 (diff) | |
download | netsurf-38bcb14d7765a1231527f65f9a1c3d9e8045697e.tar.gz netsurf-38bcb14d7765a1231527f65f9a1c3d9e8045697e.tar.bz2 |
Migrate to new MIMEtyper
svn path=/trunk/netsurf/; revision=12375
Diffstat (limited to 'amiga/plugin_hack.c')
-rw-r--r-- | amiga/plugin_hack.c | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/amiga/plugin_hack.c b/amiga/plugin_hack.c index 8779ad11a..51a7c9373 100644 --- a/amiga/plugin_hack.c +++ b/amiga/plugin_hack.c @@ -39,12 +39,6 @@ typedef struct amiga_plugin_hack_content { struct content base; - - Object *dto; - int x; - int y; - int w; - int h; } amiga_plugin_hack_content; static nserror amiga_plugin_hack_create(const content_handler *handler, @@ -83,35 +77,26 @@ static const content_handler amiga_plugin_hack_content_handler = { nserror amiga_plugin_hack_init(void) { - char dt_mime[50]; - struct DataType *dt, *prevdt = NULL; + struct Node *node = NULL; lwc_string *type; - lwc_error lerror; nserror error; - BPTR fh = 0; - if(fh = FOpen("PROGDIR:Resources/MIME/pluginhack", MODE_OLDFILE, 0)) - { - while(FGets(fh, (UBYTE *)&dt_mime, 50) != 0) - { - dt_mime[strlen(dt_mime) - 1] = '\0'; - if((dt_mime[0] == '\0') || (dt_mime[0] == '#')) - continue; /* Skip blank lines and comments */ + do { + node = ami_mime_has_cmd(&type, node); - lerror = lwc_intern_string(dt_mime, strlen(dt_mime), &type); - if (lerror != lwc_error_ok) - return NSERROR_NOMEM; + if(node) + { + printf("plugin_hack registered %s\n",lwc_string_data(type)); error = content_factory_register_handler(type, - &amiga_plugin_hack_content_handler); - - lwc_string_unref(type); + &amiga_plugin_hack_content_handler); if (error != NSERROR_OK) return error; } - FClose(fh); - } + + }while (node != NULL); + return NSERROR_OK; } |