From 8373123b719ac6b36d2f763d51f95b165d22c1be Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 28 Feb 2011 20:38:23 +0000 Subject: Purge CONTENT_STATUS_TYPE_UNKNOWN svn path=/trunk/netsurf/; revision=11861 --- content/content.c | 9 ++------- content/content.h | 1 - content/content_protected.h | 4 ++-- 3 files changed, 4 insertions(+), 10 deletions(-) (limited to 'content') diff --git a/content/content.c b/content/content.c index 7b9207d44..cac5c97e7 100644 --- a/content/content.c +++ b/content/content.c @@ -254,7 +254,6 @@ const char * const content_type_name[] = { }; const char * const content_status_name[] = { - "TYPE_UNKNOWN", "LOADING", "READY", "DONE", @@ -423,9 +422,6 @@ content_type content_lookup(const char *mime_type) * * \param url URL of content, copied * \return the new content structure, or 0 on memory exhaustion - * - * The type is initialised to CONTENT_UNKNOWN, and the status to - * CONTENT_STATUS_TYPE_UNKNOWN. */ struct content * content_create(llcache_handle *llcache, @@ -643,8 +639,7 @@ void content_update_status(struct content *c) if (status == token) status = token + 4; - if (c->status == CONTENT_STATUS_TYPE_UNKNOWN || - c->status == CONTENT_STATUS_LOADING || + if (c->status == CONTENT_STATUS_LOADING || c->status == CONTENT_STATUS_READY) time = wallclock() - c->time; else @@ -1262,7 +1257,7 @@ content_status content_get_status(hlcache_handle *h) content_status content__get_status(struct content *c) { if (c == NULL) - return CONTENT_STATUS_TYPE_UNKNOWN; + return CONTENT_STATUS_ERROR; return c->status; } diff --git a/content/content.h b/content/content.h index c92fdd4a2..6b3d83013 100644 --- a/content/content.h +++ b/content/content.h @@ -44,7 +44,6 @@ struct rect; /** Status of a content */ typedef enum { - CONTENT_STATUS_TYPE_UNKNOWN, /**< Type not yet known. */ CONTENT_STATUS_LOADING, /**< Content is being fetched or converted and is not safe to display. */ CONTENT_STATUS_READY, /**< Some parts of content still being diff --git a/content/content_protected.h b/content/content_protected.h index 9541eb428..6a78d8ad1 100644 --- a/content/content_protected.h +++ b/content/content_protected.h @@ -167,8 +167,8 @@ struct content { /** Bitmap, for various image contents. */ struct bitmap *bitmap; - unsigned int time; /**< Creation time, if TYPE_UNKNOWN, - LOADING or READY, + unsigned int time; /**< Creation time, + if LOADING or READY, otherwise total time. */ unsigned int reformat_time; /**< Earliest time to attempt a -- cgit v1.2.3