diff options
author | James Bursa <james@netsurf-browser.org> | 2004-01-23 20:46:29 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2004-01-23 20:46:29 +0000 |
commit | 8755ceb0c809cde60b44acf74d55044315fd22e3 (patch) | |
tree | a24d6da09a0a4e8470f9313cf24d1a997453926b /content/content.c | |
parent | 9cf82c7fc4820e4fecc24d4e4fdd0926eefaa98e (diff) | |
download | netsurf-8755ceb0c809cde60b44acf74d55044315fd22e3.tar.gz netsurf-8755ceb0c809cde60b44acf74d55044315fd22e3.tar.bz2 |
[project @ 2004-01-23 20:46:29 by bursa]
Add error pages for fetch failures.
svn path=/import/netsurf/; revision=498
Diffstat (limited to 'content/content.c')
-rw-r--r-- | content/content.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c index 91481ff48..61b8cd1c9 100644 --- a/content/content.c +++ b/content/content.c @@ -343,6 +343,27 @@ void content_destroy(struct content *c) /** + * Reset a content. + * + * Calls the destroy function for the content, but does not free + * the structure. + */ + +void content_reset(struct content *c) +{ + assert(c != 0); + LOG(("content %p %s", c, c->url)); + if (c->type < HANDLER_MAP_COUNT) + handler_map[c->type].destroy(c); + c->type = CONTENT_UNKNOWN; + c->status = CONTENT_STATUS_TYPE_UNKNOWN; + c->size = sizeof(struct content); + free(c->mime_type); + c->mime_type = 0; +} + + +/** * Display content on screen. * * Calls the redraw function for the content, if it exists. |