summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-02-28 20:38:23 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-02-28 20:38:23 +0000
commit8373123b719ac6b36d2f763d51f95b165d22c1be (patch)
treea2e86b2f4a9fb43c755f5f576661f8cdc21af95c
parent8d13c93c894d536f4061e981a3d470d272516654 (diff)
downloadnetsurf-8373123b719ac6b36d2f763d51f95b165d22c1be.tar.gz
netsurf-8373123b719ac6b36d2f763d51f95b165d22c1be.tar.bz2
Purge CONTENT_STATUS_TYPE_UNKNOWN
svn path=/trunk/netsurf/; revision=11861
-rw-r--r--content/content.c9
-rw-r--r--content/content.h1
-rw-r--r--content/content_protected.h4
3 files changed, 4 insertions, 10 deletions
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