From 83f9e707eba500d39c12b8078948b932706cdab2 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 9 May 2011 15:32:34 +0000 Subject: refactor content handler initilisation to use named initialisors svn path=/trunk/netsurf/; revision=12341 --- riscos/content-handlers/artworks.c | 22 +++++++--------------- riscos/content-handlers/draw.c | 22 +++++++--------------- riscos/content-handlers/sprite.c | 22 +++++++--------------- 3 files changed, 21 insertions(+), 45 deletions(-) (limited to 'riscos/content-handlers') diff --git a/riscos/content-handlers/artworks.c b/riscos/content-handlers/artworks.c index a46a03010..be1ba7dd2 100644 --- a/riscos/content-handlers/artworks.c +++ b/riscos/content-handlers/artworks.c @@ -118,21 +118,13 @@ static nserror artworks_clone(const struct content *old, struct content **newc); static content_type artworks_content_type(lwc_string *mime_type); static const content_handler artworks_content_handler = { - artworks_create, - NULL, - artworks_convert, - NULL, - artworks_destroy, - NULL, - NULL, - NULL, - artworks_redraw, - NULL, - NULL, - artworks_clone, - NULL, - artworks_content_type, - false + .create = artworks_create, + .data_complete = artworks_convert, + .destroy = artworks_destroy, + .redraw = artworks_redraw, + .clone = artworks_clone, + .type = artworks_content_type, + .no_share = false, }; static const char *artworks_types[] = { diff --git a/riscos/content-handlers/draw.c b/riscos/content-handlers/draw.c index ccb9353cd..97346580e 100644 --- a/riscos/content-handlers/draw.c +++ b/riscos/content-handlers/draw.c @@ -58,21 +58,13 @@ static nserror draw_clone(const struct content *old, struct content **newc); static content_type draw_content_type(lwc_string *mime_type); static const content_handler draw_content_handler = { - draw_create, - NULL, - draw_convert, - NULL, - draw_destroy, - NULL, - NULL, - NULL, - draw_redraw, - NULL, - NULL, - draw_clone, - NULL, - draw_content_type, - false + .create = draw_create, + .data_complete = draw_convert, + .destroy = draw_destroy, + .redraw = draw_redraw, + .clone = draw_clone, + .type = draw_content_type, + .no_share = false, }; static const char *draw_types[] = { diff --git a/riscos/content-handlers/sprite.c b/riscos/content-handlers/sprite.c index de65faca6..b4f370e1a 100644 --- a/riscos/content-handlers/sprite.c +++ b/riscos/content-handlers/sprite.c @@ -60,21 +60,13 @@ static nserror sprite_clone(const struct content *old, struct content **newc); static content_type sprite_content_type(lwc_string *mime_type); static const content_handler sprite_content_handler = { - sprite_create, - NULL, - sprite_convert, - NULL, - sprite_destroy, - NULL, - NULL, - NULL, - sprite_redraw, - NULL, - NULL, - sprite_clone, - NULL, - sprite_content_type, - false + .create = sprite_create, + .data_complete = sprite_convert, + .destroy = sprite_destroy, + .redraw = sprite_redraw, + .clone = sprite_clone, + .type = sprite_content_type, + .no_share = false, }; static const char *sprite_types[] = { -- cgit v1.2.3