Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/b3042f6c1fcb708d8663f4ab51865fe6a1f8bec3
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/b3042f6c1fcb708d8663f4ab51865fe6a1f8bec3
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/b3042f6c1fcb708d8663f4ab51865fe6a1f8bec3

The branch, master has been updated
       via  b3042f6c1fcb708d8663f4ab51865fe6a1f8bec3 (commit)
       via  9ff13d64c4ea9b3539f9b162bc8c70f2a30f288e (commit)
       via  8828bdc7021714621ebef63e847c2998658b4863 (commit)
       via  8acb224e90a03175133f8b295229b6f0e096177d (commit)
       via  4bd4f3e82bc77c18ae38a8db94c0ad74747930b0 (commit)
       via  e8a9e3744523671228fef385ce7e1e11f93283b0 (commit)
      from  3ab8032f1679c2a3526ccd458eb130c0d0f917bc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=b3042f6c1fcb708d8663f4ab51865fe6a1f8bec3
commit b3042f6c1fcb708d8663f4ab51865fe6a1f8bec3
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    fix spelling in low level cache code

diff --git a/content/llcache.c b/content/llcache.c
index e338c1f..4bd6eb3 100644
--- a/content/llcache.c
+++ b/content/llcache.c
@@ -22,7 +22,7 @@
  * Low-level resource cache implementation
  *
  * This is the implementation of the low level cache. This cache
- * stores source objects in memory and may use a persistant backing
+ * stores source objects in memory and may use a persistent backing
  * store to extend their lifetime.
  *
  * \todo fix writeout conditions and ordering.
@@ -201,8 +201,8 @@ struct llcache_object {
        llcache_header *headers;     /**< Fetch headers */
        size_t num_headers;          /**< Number of fetch headers */
 
-       /* Instrumentation. These elemnts are strictly for information
-        * to improve the cache performance and to provide performace
+       /* Instrumentation. These elements are strictly for information
+        * to improve the cache performance and to provide performance
         * metrics. The values are non-authorative and must not be used to
         * determine object lifetime etc.
         */
@@ -268,7 +268,7 @@ struct llcache_s {
        uint64_t total_written;
 
        /**
-        * Total nuber of miliseconds taken to write to backing store.
+        * Total number of milliseconds taken to write to backing store.
         */
        uint64_t total_elapsed;
 
@@ -804,7 +804,7 @@ static nserror llcache_fetch_process_header(llcache_object 
*object,
  *
  * sets up headers and attempts to start an actual fetch from the
  * fetchers system updating the llcache object with the new fetch on
- * sucessful start.
+ * successful start.
  *
  * \pre The fetch parameters in object->fetch must be populated
  *
@@ -876,7 +876,7 @@ static nserror llcache_object_refetch(llcache_object 
*object)
        /* Reset fetch state */
        object->fetch.state = LLCACHE_FETCH_INIT;
 
-       LLCACHE_LOG("Refetching %p", object);
+       LLCACHE_LOG("Re-fetching %p", object);
 
        /* Kick off fetch */
        res = fetch_start(object->url,
@@ -1173,27 +1173,27 @@ llcache_object_remove_from_list(llcache_object *object, 
llcache_object **list)
 }
 
 /**
- * Retrieve source data for an object from persistant store if necessary.
+ * Retrieve source data for an object from persistent store if necessary.
  *
- * If an objects source data has been placed in the persistant store
- * and the in memory copy released this will attempt to retrive the
+ * If an objects source data has been placed in the persistent store
+ * and the in memory copy released this will attempt to retrieve the
  * source data.
  *
  * \param object the object to operate on.
- * \return apropriate error code.
+ * \return appropriate error code.
  */
 static nserror llcache_persist_retrieve(llcache_object *object)
 {
        /* ensure the source data is present if necessary */
        if ((object->source_data != NULL) ||
            (object->store_state != LLCACHE_STATE_DISC)) {
-               /* source data does not require retriving from
-                * persistant store.
+               /* source data does not require retrieving from
+                * persistent store.
                 */
                return NSERROR_OK;
        }
 
-       /* Source data for the object may be in the persiatant store */
+       /* Source data for the object may be in the persistent store */
        return guit->llcache->fetch(object->url,
                                    BACKING_STORE_NONE,
                                    &object->source_data,
@@ -1205,7 +1205,7 @@ static nserror llcache_persist_retrieve(llcache_object 
*object)
  *
  * The metadata includes object headers.
  *
- * \param object The cache object to serialise teh metadata of.
+ * \param object The cache object to serialise the metadata of.
  * \param data_out Where the serialised buffer will be placed.
  * \param datasize_out The size of the serialised data.
  * \return NSERROR_OK on success with \a data_out and \a datasize_out
@@ -1347,15 +1347,15 @@ operror:
 /**
  * Deserialisation of an objects metadata.
  *
- * Attempt to retrive and deserialise the metadata for an object from
+ * Attempt to retrieve and deserialise the metadata for an object from
  * the backing store.
  *
- * This must only update object if it is sucessful otherwise difficult
+ * This must only update object if it is successful otherwise difficult
  * to debug crashes happen later by using bad leftover object state.
  *
  * \param object The object to retrieve the metadata for.
- * \return NSERROR_OK if the metatdata was retrived and deserialised
- *         or error code if url is not in persistant storage or in
+ * \return NSERROR_OK if the metatdata was retrieved and deserialised
+ *         or error code if URL is not in persistent storage or in
  *         event of deserialisation error.
  */
 static nserror
@@ -1376,7 +1376,7 @@ llcache_process_metadata(llcache_object *object)
        size_t num_headers;
        size_t hloop;
 
-       LOG("Retriving metadata");
+       LOG("Retrieving metadata");
 
        /* attempt to retrieve object metadata from the backing store */
        res = guit->llcache->fetch(object->url,
@@ -1387,7 +1387,7 @@ llcache_process_metadata(llcache_object *object)
                return res;
        }
 
-       LOG("Processing retrived data");
+       LOG("Processing retrieved data");
 
        /* metadata line 1 is the url the metadata referrs to */
        line = 1;
@@ -1405,7 +1405,7 @@ llcache_process_metadata(llcache_object *object)
 
        if (nsurl_compare(object->url, metadataurl, NSURL_COMPLETE) != true) {
                /* backing store returned the wrong object for the
-                * request. This may occour if the backing store had
+                * request. This may occur if the backing store had
                 * a collision in its storage method. We cope with this
                 * by simply skipping caching of this object.
                 */
@@ -1511,14 +1511,14 @@ format_error:
 }
 
 /**
- * Attempt to retrieve an object from persistant storage.
+ * Attempt to retrieve an object from persistent storage.
  *
- * \param object The object to populate from persistant store.
+ * \param object The object to populate from persistent store.
  * \param flags Fetch flags.
  * \param referer The referring url.
  * \param post Post data for fetch.
  * \param redirect_count how many times this fetch has been redirected.
- * \return NSERROR_OK if the object was sucessfully retrived from the
+ * \return NSERROR_OK if the object was successfully retrieved from the
  *         cache else appropriate error code.
  */
 static nserror
@@ -1572,7 +1572,7 @@ llcache_object_fetch_persistant(llcache_object *object,
  * \param referer        Referring URL, or NULL if none
  * \param post           POST data, or NULL for a GET request
  * \param redirect_count  Number of redirects followed so far
- * \param result         Pointer to location to recieve retrieved object
+ * \param result         Pointer to location to receive retrieved object
  * \return NSERROR_OK on success, appropriate error otherwise
  */
 static nserror
@@ -1602,7 +1602,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
        }
 
        /* No viable object found in cache create one and attempt to
-        * pull from persistant store.
+        * pull from persistent store.
         */
        if (newest == NULL) {
                LLCACHE_LOG("No viable object found in llcache");
@@ -1611,12 +1611,12 @@ llcache_object_retrieve_from_cache(nsurl *url,
                if (error != NSERROR_OK)
                        return error;
 
-               /* attempt to retrieve object from persistant store */
+               /* attempt to retrieve object from persistent store */
                error = llcache_object_fetch_persistant(obj, flags, referer, 
post, redirect_count);
                if (error == NSERROR_OK) {
-                       LLCACHE_LOG("retrived object from persistant store");
+                       LLCACHE_LOG("retrieved object from persistent store");
 
-                       /* set newest object from persistant store which
+                       /* set newest object from persistent store which
                         * will cause the normal object handling to be used.
                         */
                        newest = obj;
@@ -1625,7 +1625,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
                        llcache_object_add_to_list(obj, 
&llcache->cached_objects);
 
                }
-               /* else no object found and unretrivable from cache,
+               /* else no object found and irretrievable from cache,
                 * fall through with newest unset to start fetch
                 */
        }
@@ -1641,19 +1641,19 @@ llcache_object_retrieve_from_cache(nsurl *url,
                /* ensure the source data is present */
                error = llcache_persist_retrieve(newest);
                if (error == NSERROR_OK) {
-                       /* source data was sucessfully retrived from
-                        * persistant store
+                       /* source data was successfully retrieved from
+                        * persistent store
                         */
                        *result = newest;
 
                        return NSERROR_OK;
                }
 
-               /* retrival of source data from persistant store
+               /* retrieval of source data from persistent store
                 * failed, destroy cache object and fall though to
                 * cache miss to re-fetch
                 */
-               LLCACHE_LOG("Persistant retrival failed for %p", newest);
+               LLCACHE_LOG("Persistent retrieval failed for %p", newest);
 
                llcache_object_remove_from_list(newest, 
&llcache->cached_objects);
                llcache_object_destroy(newest);
@@ -1704,9 +1704,9 @@ llcache_object_retrieve_from_cache(nsurl *url,
                        return NSERROR_OK;
                }
 
-               LLCACHE_LOG("Persistant retrival failed for %p", newest);
+               LLCACHE_LOG("Persistent retrieval failed for %p", newest);
 
-               /* retrival of source data from persistant store
+               /* retrieval of source data from persistent store
                 * failed, destroy cache object and fall though to
                 * cache miss to re-retch
                 */
@@ -1743,7 +1743,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
  * \param referer        Referring URL, or NULL if none
  * \param post           POST data, or NULL for a GET request
  * \param redirect_count  Number of redirects followed so far
- * \param result         Pointer to location to recieve retrieved object
+ * \param result         Pointer to location to receive retrieved object
  * \return NSERROR_OK on success, appropriate error otherwise
  */
 static nserror
@@ -2372,7 +2372,7 @@ build_candidate_list(struct llcache_object ***lst_out, 
int *lst_len_out)
 
                /* cacehable objects with no pending fetches, not
                 * already on disc and with sufficient lifetime to
-                * make disc cache worthwile
+                * make disc cache worthwhile
                 */
                if ((object->candidate_count == 0) &&
                    (object->fetch.fetch == NULL) &&
@@ -2526,20 +2526,20 @@ static void llcache_persist(void *p)
 
        ret = build_candidate_list(&lst, &lst_count);
        if (ret != NSERROR_OK) {
-               LLCACHE_LOG("Unable to construct candidate list for persisatnt 
writeout");
+               LLCACHE_LOG("Unable to construct candidate list for persistent 
writeout");
                return;
        }
 
        write_limit = (llcache->maximum_bandwidth * llcache->time_quantum) / 
1000;
 
-       /* obtained a candidate list, make each object persistant in turn */
+       /* obtained a candidate list, make each object persistent in turn */
        for (idx = 0; idx < lst_count; idx++) {
                ret = write_backing_store(lst[idx], &written, &elapsed);
                if (ret != NSERROR_OK) {
                        continue;
                }
 
-               /* sucessfully wrote object to backing store */
+               /* successfully wrote object to backing store */
                total_written += written;
                total_elapsed += elapsed;
                total_bandwidth = (total_written * 1000) / total_elapsed;
@@ -3138,7 +3138,7 @@ llcache_object_snapshot(llcache_object *object,   
llcache_object **snapshot)
 /**
  * total ram usage of object
  *
- * \param object The object to caclulate the total RAM usage of.
+ * \param object The object to calculate the total RAM usage of.
  * \return The total RAM usage in bytes.
  */
 static inline uint32_t
@@ -3253,7 +3253,7 @@ void llcache_clean(bool purge)
        }
 
        /* if the cache limit is exceeded try to make some objects
-        * persistant so their RAM can be reclaimed in the next
+        * persistent so their RAM can be reclaimed in the next
         * step
         */
        if (limit < llcache_size) {
@@ -3261,7 +3261,7 @@ void llcache_clean(bool purge)
        }
 
        /* Source data of fresh cacheable objects with no users, no
-        * pending fetches and pushed to persistant store while the
+        * pending fetches and pushed to persistent store while the
         * cache exceeds the configured size.
         */
        for (object = llcache->cached_objects;
@@ -3286,8 +3286,8 @@ void llcache_clean(bool purge)
        }
 
        /* Fresh cacheable objects with no users, no pending fetches
-        * and pushed to persistant store while the cache exceeds
-        * the configured size. Efectively just the llcache object metadata.
+        * and pushed to persistent store while the cache exceeds
+        * the configured size. Effectively just the llcache object metadata.
         */
        for (object = llcache->cached_objects;
             ((limit < llcache_size) && (object != NULL));
@@ -3317,7 +3317,7 @@ void llcache_clean(bool purge)
 
        /* Fresh cacheable objects with no users or pending fetches
         * while the cache exceeds the configured size. These are the
-        * most valuble objects as replacing them is a full network
+        * most valuable objects as replacing them is a full network
         * fetch
         */
        for (object = llcache->cached_objects;


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=9ff13d64c4ea9b3539f9b162bc8c70f2a30f288e
commit 9ff13d64c4ea9b3539f9b162bc8c70f2a30f288e
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    fix spelling mistakes in hlcache code

diff --git a/content/hlcache.c b/content/hlcache.c
index 042e189..95edd21 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -16,8 +16,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/** \file
- * High-level resource cache (implementation)
+/**
+ * \file
+ * High-level resource cache implementation.
  */
 
 #include <assert.h>
@@ -86,7 +87,7 @@ struct hlcache_s {
        /** Ring of retrieval contexts */
        hlcache_retrieval_ctx *retrieval_ctx_ring;
 
-       /* statsistics */
+       /* statistics */
        unsigned int hit_count;
        unsigned int miss_count;
 };
@@ -665,12 +666,12 @@ nserror hlcache_handle_retrieve(nsurl *url, uint32_t 
flags,
                        hlcache_llcache_callback, ctx,
                        &ctx->llcache);
        if (error != NSERROR_OK) {
-               /* error retriving handle so free context and return error */
+               /* error retrieving handle so free context and return error */
                free((char *) ctx->child.charset);
                free(ctx->handle);
                free(ctx);
        } else {
-               /* successfuly started fetch so add new context to list */
+               /* successfully started fetch so add new context to list */
                RING_INSERT(hlcache->retrieval_ctx_ring, ctx);
 
                *result = ctx->handle;


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=8828bdc7021714621ebef63e847c2998658b4863
commit 8828bdc7021714621ebef63e847c2998658b4863
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    fix comedy spelling in fs backing store code

diff --git a/content/fs_backing_store.c b/content/fs_backing_store.c
index 7d8ac4b..635f917 100644
--- a/content/fs_backing_store.c
+++ b/content/fs_backing_store.c
@@ -27,9 +27,9 @@
  *
  * \todo Implement mmap retrieval where supported.
  *
- * \todo Implement static retrival for metadata objects as their heap
+ * \todo Implement static retrieval for metadata objects as their heap
  *         lifetime is typically very short, though this may be obsoleted
- *         by a small object storage stratagy.
+ *         by a small object storage strategy.
  *
  */
 
@@ -63,7 +63,7 @@
 /** Backing store file format version */
 #define CONTROL_VERSION 130
 
-/** Number of milliseconds after a update before control data maintinance is 
performed  */
+/** Number of milliseconds after a update before control data maintenance is 
performed  */
 #define CONTROL_MAINT_TIME 10000
 
 /** Get address from ident */
@@ -100,7 +100,7 @@
 #define BLOCK_USE_MAP_SIZE (1 << (BLOCK_ENTRY_COUNT - 3))
 
 /**
- * The type used to store index values refering to store entries. Care
+ * The type used to store index values referring to store entries. Care
  * must be taken with this type as it is used to build address to
  * entry mapping so changing the size will have large impacts on
  * memory usage.
@@ -109,7 +109,7 @@ typedef uint16_t entry_index_t;
 
 /**
  * The type used as a binary identifier for each entry derived from
- * the url. A larger identifier will have fewer collisions but
+ * the URL. A larger identifier will have fewer collisions but
  * requires proportionately more storage.
  */
 typedef uint32_t entry_ident_t;
@@ -184,7 +184,7 @@ struct store_entry_element {
  * @note Order is important to avoid excessive structure packing overhead.
  */
 struct store_entry {
-       int64_t last_used; /**< unix time the entry was last used */
+       int64_t last_used; /**< UNIX time the entry was last used */
        entry_ident_t ident; /**< entry identifier */
        uint16_t use_count; /**< number of times this entry has been accessed */
        uint8_t flags; /**< entry flags */
@@ -227,7 +227,7 @@ struct store_state {
        unsigned int entry_bits; /**< log2 number of bits in entry index. */
        unsigned int last_entry; /**< index of last usable entry. */
 
-       /** flag indicating if the entries have been made persistant
+       /** flag indicating if the entries have been made persistent
         * since they were last changed.
         */
        bool entries_dirty;
@@ -235,9 +235,9 @@ struct store_state {
        /**
         * URL identifier to entry index mapping.
         *
-        * This is an open coded index on the entries url field and
-        * provides a computationaly inexpensive way to go from the
-        * url to an entry.
+        * This is an open coded index on the entries URL field and
+        * provides a computationally inexpensive way to go from the
+        * URL to an entry.
         */
        entry_index_t *addrmap;
 
@@ -246,12 +246,12 @@ struct store_state {
        struct block_file blocks[ENTRY_ELEM_COUNT][BLOCK_FILE_COUNT];
 
        /** flag indicating if the block file use maps have been made
-        * persistant since they were last changed.
+        * persistent since they were last changed.
         */
        bool blocks_dirty;
 
        /** flag indicating if a block file has been opened for update
-        * since maintinance was previously done.
+        * since maintenance was previously done.
         */
        bool blocks_opened;
 
@@ -283,8 +283,8 @@ struct store_state *storestate;
  *
  * @param[in] state The store state to use.
  * @param[in, out] bse Pointer to the entry to be removed.
- * @return NSERROR_OK and \a bse updated on succes or NSERROR_NOT_FOUND
- *         if no entry coresponds to the url.
+ * @return NSERROR_OK and \a bse updated on success or NSERROR_NOT_FOUND
+ *         if no entry corresponds to the URL.
  */
 static nserror
 remove_store_entry(struct store_state *state, struct store_entry **bse)
@@ -460,7 +460,7 @@ store_fname(struct store_state *state,
  * @param state The store state to use.
  * @param bse The entry to invalidate.
  * @param elem_idx The element index to invalidate.
- * @return NSERROR_OK on sucess or error code on failure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 invalidate_element(struct store_state *state,
@@ -500,7 +500,7 @@ invalidate_element(struct store_state *state,
  *
  * @param state The store state to use.
  * @param bse The entry to invalidate.
- * @return NSERROR_OK on sucess or error code on failure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 invalidate_entry(struct store_state *state, struct store_entry *bse)
@@ -554,7 +554,7 @@ static int compar(const void *va, const void *vb)
        const struct store_entry *b = &BS_ENTRY(*(entry_ident_t *)vb, 
storestate);
 
        /* consider the allocation flags - if an entry has an
-        * allocation it is considered more valuble as it cannot be
+        * allocation it is considered more valuable as it cannot be
         * freed.
         */
        if ((a->elem[ENTRY_ELEM_DATA].flags == ENTRY_ELEM_FLAG_NONE) &&
@@ -670,7 +670,7 @@ static nserror store_evict(struct store_state *state)
  * Serialise entry index out to storage.
  *
  * @param state The backing store state to serialise.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror write_entries(struct store_state *state)
 {
@@ -735,7 +735,7 @@ static nserror write_entries(struct store_state *state)
  * Serialise block file use map out to storage.
  *
  * \param state The backing store state to serialise.
- * \return NSERROR_OK on sucess or error code on faliure.
+ * \return NSERROR_OK on success or error code on failure.
  */
 static nserror write_blocks(struct store_state *state)
 {
@@ -812,11 +812,11 @@ wr_err:
  * Ensures block files are of the correct extent
  *
  * block files have their extent set to their maximum size to ensure
- * subsequent reads and writes do not need to extend teh file and are
+ * subsequent reads and writes do not need to extend the file and are
  * therefore faster.
  *
  * \param state The backing store state to set block extent for.
- * \return NSERROR_OK on sucess or error code on faliure.
+ * \return NSERROR_OK on success or error code on failure.
  */
 static nserror set_block_extents(struct store_state *state)
 {
@@ -849,7 +849,7 @@ static nserror set_block_extents(struct store_state *state)
 }
 
 /**
- * maintinance of control structures.
+ * maintenance of control structures.
  *
  * callback scheduled when control data has been update. Currently
  * this is for when the entries table is dirty and requires
@@ -959,7 +959,7 @@ static block_index_t alloc_block(struct store_state *state, 
int elem_idx)
  * @param datalen The length of data in \a data
  * @param bse Pointer used to return value.
  * @return NSERROR_OK and \a bse updated on success or NSERROR_NOT_FOUND
- *         if no entry coresponds to the url.
+ *         if no entry corresponds to the url.
  */
 static nserror
 set_store_entry(struct store_state *state,
@@ -1045,12 +1045,12 @@ set_store_entry(struct store_state *state,
        elem->size = datalen;
        state->total_alloc += elem->size;
 
-       /* if the elemnt will fit in a small block attempt to allocate one */
+       /* if the element will fit in a small block attempt to allocate one */
        if (elem->size <= (1U << log2_block_size[elem_idx])) {
                elem->block = alloc_block(state, elem_idx);
        }
 
-       /* ensure control maintinance scheduled. */
+       /* ensure control maintenance scheduled. */
        state->entries_dirty = true;
        guit->misc->schedule(CONTROL_MAINT_TIME, control_maintinance, state);
 
@@ -1118,7 +1118,7 @@ store_open(struct store_state *state,
  * we also compute the total storage in use.
  *
  * @param state The backing store global state.
- * @return NSERROR_OK on sucess or NSERROR_NOMEM if the map storage
+ * @return NSERROR_OK on success or NSERROR_NOMEM if the map storage
  *         could not be allocated.
  */
 static nserror
@@ -1163,7 +1163,7 @@ build_entrymap(struct store_state *state)
  * Unlink entries file
  *
  * @param state The backing store state.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 unlink_entries(struct store_state *state)
@@ -1186,7 +1186,7 @@ unlink_entries(struct store_state *state)
  * Read description entries into memory.
  *
  * @param state The backing store state to put the loaded entries in.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on faliure.
  */
 static nserror
 read_entries(struct store_state *state)
@@ -1236,7 +1236,7 @@ read_entries(struct store_state *state)
  * Read block file usage bitmaps.
  *
  * @param state The backing store state to put the loaded entries in.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 read_blocks(struct store_state *state)
@@ -1275,7 +1275,7 @@ read_blocks(struct store_state *state)
 
        } else {
                LOG("Initialising block use map to defaults");
-               /* ensure block 0 (invalid sentinal) is skipped */
+               /* ensure block 0 (invalid sentinel) is skipped */
                state->blocks[ENTRY_ELEM_DATA][0].use_map[0] = 1;
                state->blocks[ENTRY_ELEM_META][0].use_map[0] = 1;
        }
@@ -1293,7 +1293,7 @@ read_blocks(struct store_state *state)
  * Write the cache tag file.
  *
  * @param state The cache state.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 write_cache_tag(struct store_state *state)
@@ -1330,7 +1330,7 @@ write_cache_tag(struct store_state *state)
  * Write the control file for the current state.
  *
  * @param state The state to write to the control file.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 write_control(struct store_state *state)
@@ -1375,7 +1375,7 @@ write_control(struct store_state *state)
  * Read and parse the control file.
  *
  * @param state The state to read from the control file.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 read_control(struct store_state *state)
@@ -1461,7 +1461,7 @@ control_error: /* problem with the control file */
  * Initialise the backing store.
  *
  * @param parameters to configure backing store.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 initialise(const struct llcache_store_parameters *parameters)
@@ -1732,7 +1732,7 @@ static nserror store_write_file(struct store_state *state,
  * @param bsflags The flags to control how the object is stored.
  * @param data The objects source data.
  * @param datalen The length of the \a data.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 store(nsurl *url,
@@ -1893,13 +1893,13 @@ static nserror store_read_file(struct store_state 
*state,
 }
 
 /**
- * Retrive an object from the backing store.
+ * Retrieve an object from the backing store.
  *
  * @param[in] url The url is used as the unique primary key for the data.
  * @param[in] bsflags The flags to control how the object is retrieved.
  * @param[out] data_out The objects data.
  * @param[out] datalen_out The length of the \a data retrieved.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 fetch(nsurl *url,
@@ -1926,7 +1926,7 @@ fetch(nsurl *url,
        }
        storestate->hit_count++;
 
-       LOG("retriving cache data for url:%s", nsurl_access(url));
+       LOG("retrieving cache data for url:%s", nsurl_access(url));
 
        /* calculate the entry element index */
        if ((bsflags & BACKING_STORE_META) != 0) {
@@ -1984,7 +1984,7 @@ fetch(nsurl *url,
  *
  * @param[in] url The url is used as the unique primary key to invalidate.
  * @param[in] bsflags The flags to control how the object data is released.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror release(nsurl *url, enum backing_store_flags bsflags)
 {
@@ -2032,7 +2032,7 @@ static nserror release(nsurl *url, enum 
backing_store_flags bsflags)
  * be returned as a result to the fetch or meta operations.
  *
  * @param url The url is used as the unique primary key to invalidate.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 invalidate(nsurl *url)


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=8acb224e90a03175133f8b295229b6f0e096177d
commit 8acb224e90a03175133f8b295229b6f0e096177d
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    fix spelling in backing store documentation

diff --git a/Docs/source-object-backing-store b/Docs/source-object-backing-store
index 5d4d304..0fb3614 100644
--- a/Docs/source-object-backing-store
+++ b/Docs/source-object-backing-store
@@ -5,30 +5,30 @@ Introduction
 ------------
 
 The source object cache provides a system to extend the life of source
-objects (html files, images etc.) after they are no longer immediately
+objects (HTML files, images etc.) after they are no longer immediately
 being used.
 
 Only fetch types where we have well defined rules on caching are
 considered, in practice this limits us to HTTP(S). The section in
 RFC2616 [1] on caching specifies these rules.
 
-To futher extend the objects lifetime they can be pushed into a
+To further extend the objects lifetime they can be pushed into a
 backing store where the objects are available for reuse less quickly
-than from RAM but faster than retriving from the network again.
+than from RAM but faster than retrieving from the network again.
 
 The backing store implementation provides a key:value infrastructure
-with a simple store, retrive and invalidate interface.
+with a simple store, retrieve and invalidate interface.
 
 Generic filesystem backing store
 --------------------------------
 
 Although the backing store interface is fully pluggable a generic
 implementation based on storing objects on the filesystem in a
-heirachy of directories.
+hierarchy of directories.
 
-The option to alter the backing store format exists and is controled
+The option to alter the backing store format exists and is controlled
 by a version field. It is implementation defined what happens if a
-version mis-match occours.
+version mis-match occurs.
 
 As the backing store only holds cache data one should not expect a
 great deal of effort to be expended converting formats (i.e. the cache
@@ -37,23 +37,23 @@ may simply be discarded).
 Layout version 1.1
 ------------------
 
-An object has an identifier value generated from the url (NetSurf
-backing stores uses the url as the unique key). The value used is
+An object has an identifier value generated from the URL (NetSurf
+backing stores uses the URL as the unique key). The value used is
 obtained using nsurl_hash() which is currently a 32 bit FNV so is
 directly usable.
 
 This identifier is adequate to ensure the collision rate for the
-hashed url values (a collision for every 2^16 urls added) is
+hashed URL values (a collision for every 2^16 URLs added) is
 sufficiently low the overhead of returning the wrong object (which
-backing stores are permitted to do) is not significat.
+backing stores are permitted to do) is not significant.
 
 An entry list is maintained which contains all the metadata about a
 given identifier. This list is limited in length to constrain the
-resources necessary to maintain it. It is made persistant to avoid the
+resources necessary to maintain it. It is made persistent to avoid the
 overhead of reconstructing it at initialisation and to keep the data
 used to improve the eviction decisions.
 
-Each object is stored and retrived directly into the filesystem using
+Each object is stored and retrieved directly into the filesystem using
 a filename generated from a RFC4648 base32 encoding of an address
 value. The objects address is derived from the identifier by cropping
 it to a shorter length.
@@ -63,7 +63,7 @@ uses storage directly proportional to the size of the address 
length.
 
 The cropping length is stored in the control file with the default
 values set at compile time. This allows existing backing stores to
-continue operating with existing data independantly of new default
+continue operating with existing data independently of new default
 setting. This setting gives some ability to tune the default cache
 index size to values suitable for a specific host operating system.
 
@@ -88,7 +88,7 @@ Version 1.0
 
 The version 1 layout was identical to the 1.1 except base64url
 encoding was used, this proved problematic as some systems filesystems
-were case insensitive so upper and lower case letetrs collided.
+were case insensitive so upper and lower case letters collided.
 
 There is no upgrade provision from the previous version simply delete
 the cache directory.
@@ -112,7 +112,7 @@ Each control file table entry is 28 bytes and consists of
  - signed 64 bit value for last use time
 
  - 32bit full url hash allowing for index reconstruction and
-   addiitonal collision detection. Also the possibility of increasing
+   additional collision detection. Also the possibility of increasing
    the ADDRESS_LENGTH although this would require renaming all the
    existing files in the cache and is not currently implemented.
 
@@ -134,8 +134,8 @@ Address to entry index
 An entry index is held in RAM that allows looking up the address to
 map to an entry in the control file.
 
-The index is the only data structure whose size is directly depndant
-on the length of the hash specificaly:
+The index is the only data structure whose size is directly dependant
+on the length of the hash specifically:
 
 (2 ^ (ADDRESS_BITS - 3)) * ENTRY_BITS) in bytes
 
@@ -152,9 +152,9 @@ list is limited to 448kilobytes.
 The typical values for RISC OS would set ADDRESS_BITS to 18. This
 spreads the entries over 262144 hash values which uses 512 kilobytes
 for the index. Limiting the hash space like this reduces the
-efectiveness of the cache.
+effectiveness of the cache.
 
-A small ADDRESS_LENGTH causes a collision (two urls with the same
+A small ADDRESS_LENGTH causes a collision (two URLs with the same
 address) to happen roughly for every 2 ^ (ADDRESS_BITS / 2) = 2 ^ 9 =
 512 objects stored. This roughly translates to a cache miss due to
 collision every ten pages navigated to.
@@ -164,7 +164,7 @@ Larger systems
 
 In general ENTRY_BITS set to 16 as this limits the store to 65536
 objects which given the average size of an object at 8 kilobytes
-yeilds half a gigabyte of disc used which is judged to be sufficient.
+yields half a gigabyte of disc used which is judged to be sufficient.
 
 For larger systems e.g. those using GTK frontend we would most likely
 select ADDRESS_BITS as 22 resulting in a collision every 2048 objects
@@ -176,11 +176,11 @@ Typical values
 Example 1
 ~~~~~~~~~
 
-For a store with 1034 objects genrated from a random navigation of
+For a store with 1034 objects generated from a random navigation of
 pages linked from the about:welcome page.
 
 Metadata total size is 593608 bytes an average of 574 bytes. The
-majority of the storage is used to hold the urls and headers.
+majority of the storage is used to hold the URLs and headers.
 
 Data total size is 9180475 bytes a mean of 8879 bytes 1648726 in the
 largest 10 entries which if excluded gives 7355 bytes average size


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=4bd4f3e82bc77c18ae38a8db94c0ad74747930b0
commit 4bd4f3e82bc77c18ae38a8db94c0ad74747930b0
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    local pages should not have a favicon

diff --git a/!NetSurf/Resources/nl/welcome.html,faf 
b/!NetSurf/Resources/nl/welcome.html,faf
index f35260b..aec47e7 100644
--- a/!NetSurf/Resources/nl/welcome.html,faf
+++ b/!NetSurf/Resources/nl/welcome.html,faf
@@ -3,7 +3,6 @@
 <head>
 <title>Welkom bij NetSurf</title>
 <style 
type="text/css">html,body{margin:0;padding:0;}body{color:#000;background:#fff;font-family:sans-serif;margin:0
 
auto;}a:link{text-decoration:underline;color:#00f;}a:visited{text-decoration:underline;color:#60a;}a:hover{text-decoration:none;}a:active{text-decoration:underline;color:#f00;}.banner{margin:0;padding:0;background:#94adff;text-align:left;}.banner
 
img{border:none;color:#000;height:86px;width:308px;display:block;}.onlycontent{margin:0
 
1em;}.nslinks{display:table;width:100%;margin:0;border-spacing:0;padding:0;background:#ccd8ff;font-size:88%;}.nslinks
 li{display:table-cell;text-align:center;padding:0.2em 0.3em 
0.3em;vertical-align:middle;}.nslinks li+li{border-left:2px solid 
#b1c3ff;}.version{padding:0;margin:1.2em auto 
0;width:90%;color:#444;font-size:160%;}.intro{width: 90%;margin:1em 
auto;color:#666;}.websearch{margin:1.5em auto;padding:1.2em 
0.3em;background:#d8e2ff;border:2px solid 
#c5d3ff;width:80%;text-align:center;}input[type=text]{border:2px solid 
#b6c7ff;backgr
 ound:#f9faff;color:#000;margin:2px;}input[type=submit]{border:2px outset 
#cedaff;color:#000;background:#cedaff;margin:2px;}.links{display:table;width:80%;margin:0
 auto 3em;font-size:94%;}.links p{display:table-cell;}.links 
ul{padding-left:0.8em;margin-top:-1em;}.links 
ul+ul{padding-left:1em;}.footer{font-style:italic;color:#666;text-align:right;}.footer
 p{margin-top:1.5em;padding-top:0.4em;border-top:2px solid #94adff;}</style>
-<link rel="icon" type="image/png" 
href="http://www.netsurf-browser.org/webimages/favicon.png";>
 </head>
 
 <body>


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=e8a9e3744523671228fef385ce7e1e11f93283b0
commit e8a9e3744523671228fef385ce7e1e11f93283b0
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    fix openSSL 1.1.0 X509 certificate handling

diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index 66970ef..7ddf512 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -128,6 +128,26 @@ static char fetch_error_buffer[CURL_ERROR_SIZE];
 static char fetch_proxy_userpwd[100];
 
 
+/* OpenSSL 1.0.x to 1.1.0 certificate reference counting changed */
+#if (OPENSSL_VERSION_NUMBER < 0x1010000fL)
+static int ns_X509_up_ref(X509 *cert)
+{
+       cert->references++;
+       return 1;
+}
+
+static void ns_X509_free(X509 *cert)
+{
+       cert->references--;
+       if (cert->references == 0) {
+               X509_free(cert);
+       }
+}
+#else
+#define ns_X509_up_ref X509_up_ref
+#define ns_X509_free X509_free
+#endif
+
 /**
  * Initialise a cURL fetcher.
  */
@@ -438,7 +458,7 @@ fetch_curl_verify_callback(int verify_ok, X509_STORE_CTX 
*x509_ctx)
         */
        if (!fetch->cert_data[depth].cert) {
                fetch->cert_data[depth].cert = 
X509_STORE_CTX_get_current_cert(x509_ctx);
-               fetch->cert_data[depth].cert->references++;
+               ns_X509_up_ref(fetch->cert_data[depth].cert);
                fetch->cert_data[depth].err = 
X509_STORE_CTX_get_error(x509_ctx);
        }
 
@@ -815,10 +835,7 @@ static void fetch_curl_free(void *vf)
        }
 
        for (i = 0; i < MAX_CERTS && f->cert_data[i].cert; i++) {
-               f->cert_data[i].cert->references--;
-               if (f->cert_data[i].cert->references == 0) {
-                       X509_free(f->cert_data[i].cert);
-               }
+               ns_X509_free(f->cert_data[i].cert);
        }
 
        free(f);
@@ -986,10 +1003,7 @@ curl_start_cert_validate(struct curl_fetch_info *f,
                                              
X509_get_pubkey(certs[depth].cert));
 
                /* and clean up */
-               certs[depth].cert->references--;
-               if (certs[depth].cert->references == 0) {
-                       X509_free(certs[depth].cert);
-               }
+               ns_X509_free(certs[depth].cert);
        }
 
        msg.type = FETCH_CERT_ERR;


-----------------------------------------------------------------------

Summary of changes:
 !NetSurf/Resources/nl/welcome.html,faf |    1 -
 Docs/source-object-backing-store       |   46 ++++++++--------
 content/fetchers/curl.c                |   32 ++++++++---
 content/fs_backing_store.c             |   80 +++++++++++++--------------
 content/hlcache.c                      |   11 ++--
 content/llcache.c                      |   94 ++++++++++++++++----------------
 6 files changed, 139 insertions(+), 125 deletions(-)

diff --git a/!NetSurf/Resources/nl/welcome.html,faf 
b/!NetSurf/Resources/nl/welcome.html,faf
index f35260b..aec47e7 100644
--- a/!NetSurf/Resources/nl/welcome.html,faf
+++ b/!NetSurf/Resources/nl/welcome.html,faf
@@ -3,7 +3,6 @@
 <head>
 <title>Welkom bij NetSurf</title>
 <style 
type="text/css">html,body{margin:0;padding:0;}body{color:#000;background:#fff;font-family:sans-serif;margin:0
 
auto;}a:link{text-decoration:underline;color:#00f;}a:visited{text-decoration:underline;color:#60a;}a:hover{text-decoration:none;}a:active{text-decoration:underline;color:#f00;}.banner{margin:0;padding:0;background:#94adff;text-align:left;}.banner
 
img{border:none;color:#000;height:86px;width:308px;display:block;}.onlycontent{margin:0
 
1em;}.nslinks{display:table;width:100%;margin:0;border-spacing:0;padding:0;background:#ccd8ff;font-size:88%;}.nslinks
 li{display:table-cell;text-align:center;padding:0.2em 0.3em 
0.3em;vertical-align:middle;}.nslinks li+li{border-left:2px solid 
#b1c3ff;}.version{padding:0;margin:1.2em auto 
0;width:90%;color:#444;font-size:160%;}.intro{width: 90%;margin:1em 
auto;color:#666;}.websearch{margin:1.5em auto;padding:1.2em 
0.3em;background:#d8e2ff;border:2px solid 
#c5d3ff;width:80%;text-align:center;}input[type=text]{border:2px solid 
#b6c7ff;backgr
 ound:#f9faff;color:#000;margin:2px;}input[type=submit]{border:2px outset 
#cedaff;color:#000;background:#cedaff;margin:2px;}.links{display:table;width:80%;margin:0
 auto 3em;font-size:94%;}.links p{display:table-cell;}.links 
ul{padding-left:0.8em;margin-top:-1em;}.links 
ul+ul{padding-left:1em;}.footer{font-style:italic;color:#666;text-align:right;}.footer
 p{margin-top:1.5em;padding-top:0.4em;border-top:2px solid #94adff;}</style>
-<link rel="icon" type="image/png" 
href="http://www.netsurf-browser.org/webimages/favicon.png";>
 </head>
 
 <body>
diff --git a/Docs/source-object-backing-store b/Docs/source-object-backing-store
index 5d4d304..0fb3614 100644
--- a/Docs/source-object-backing-store
+++ b/Docs/source-object-backing-store
@@ -5,30 +5,30 @@ Introduction
 ------------
 
 The source object cache provides a system to extend the life of source
-objects (html files, images etc.) after they are no longer immediately
+objects (HTML files, images etc.) after they are no longer immediately
 being used.
 
 Only fetch types where we have well defined rules on caching are
 considered, in practice this limits us to HTTP(S). The section in
 RFC2616 [1] on caching specifies these rules.
 
-To futher extend the objects lifetime they can be pushed into a
+To further extend the objects lifetime they can be pushed into a
 backing store where the objects are available for reuse less quickly
-than from RAM but faster than retriving from the network again.
+than from RAM but faster than retrieving from the network again.
 
 The backing store implementation provides a key:value infrastructure
-with a simple store, retrive and invalidate interface.
+with a simple store, retrieve and invalidate interface.
 
 Generic filesystem backing store
 --------------------------------
 
 Although the backing store interface is fully pluggable a generic
 implementation based on storing objects on the filesystem in a
-heirachy of directories.
+hierarchy of directories.
 
-The option to alter the backing store format exists and is controled
+The option to alter the backing store format exists and is controlled
 by a version field. It is implementation defined what happens if a
-version mis-match occours.
+version mis-match occurs.
 
 As the backing store only holds cache data one should not expect a
 great deal of effort to be expended converting formats (i.e. the cache
@@ -37,23 +37,23 @@ may simply be discarded).
 Layout version 1.1
 ------------------
 
-An object has an identifier value generated from the url (NetSurf
-backing stores uses the url as the unique key). The value used is
+An object has an identifier value generated from the URL (NetSurf
+backing stores uses the URL as the unique key). The value used is
 obtained using nsurl_hash() which is currently a 32 bit FNV so is
 directly usable.
 
 This identifier is adequate to ensure the collision rate for the
-hashed url values (a collision for every 2^16 urls added) is
+hashed URL values (a collision for every 2^16 URLs added) is
 sufficiently low the overhead of returning the wrong object (which
-backing stores are permitted to do) is not significat.
+backing stores are permitted to do) is not significant.
 
 An entry list is maintained which contains all the metadata about a
 given identifier. This list is limited in length to constrain the
-resources necessary to maintain it. It is made persistant to avoid the
+resources necessary to maintain it. It is made persistent to avoid the
 overhead of reconstructing it at initialisation and to keep the data
 used to improve the eviction decisions.
 
-Each object is stored and retrived directly into the filesystem using
+Each object is stored and retrieved directly into the filesystem using
 a filename generated from a RFC4648 base32 encoding of an address
 value. The objects address is derived from the identifier by cropping
 it to a shorter length.
@@ -63,7 +63,7 @@ uses storage directly proportional to the size of the address 
length.
 
 The cropping length is stored in the control file with the default
 values set at compile time. This allows existing backing stores to
-continue operating with existing data independantly of new default
+continue operating with existing data independently of new default
 setting. This setting gives some ability to tune the default cache
 index size to values suitable for a specific host operating system.
 
@@ -88,7 +88,7 @@ Version 1.0
 
 The version 1 layout was identical to the 1.1 except base64url
 encoding was used, this proved problematic as some systems filesystems
-were case insensitive so upper and lower case letetrs collided.
+were case insensitive so upper and lower case letters collided.
 
 There is no upgrade provision from the previous version simply delete
 the cache directory.
@@ -112,7 +112,7 @@ Each control file table entry is 28 bytes and consists of
  - signed 64 bit value for last use time
 
  - 32bit full url hash allowing for index reconstruction and
-   addiitonal collision detection. Also the possibility of increasing
+   additional collision detection. Also the possibility of increasing
    the ADDRESS_LENGTH although this would require renaming all the
    existing files in the cache and is not currently implemented.
 
@@ -134,8 +134,8 @@ Address to entry index
 An entry index is held in RAM that allows looking up the address to
 map to an entry in the control file.
 
-The index is the only data structure whose size is directly depndant
-on the length of the hash specificaly:
+The index is the only data structure whose size is directly dependant
+on the length of the hash specifically:
 
 (2 ^ (ADDRESS_BITS - 3)) * ENTRY_BITS) in bytes
 
@@ -152,9 +152,9 @@ list is limited to 448kilobytes.
 The typical values for RISC OS would set ADDRESS_BITS to 18. This
 spreads the entries over 262144 hash values which uses 512 kilobytes
 for the index. Limiting the hash space like this reduces the
-efectiveness of the cache.
+effectiveness of the cache.
 
-A small ADDRESS_LENGTH causes a collision (two urls with the same
+A small ADDRESS_LENGTH causes a collision (two URLs with the same
 address) to happen roughly for every 2 ^ (ADDRESS_BITS / 2) = 2 ^ 9 =
 512 objects stored. This roughly translates to a cache miss due to
 collision every ten pages navigated to.
@@ -164,7 +164,7 @@ Larger systems
 
 In general ENTRY_BITS set to 16 as this limits the store to 65536
 objects which given the average size of an object at 8 kilobytes
-yeilds half a gigabyte of disc used which is judged to be sufficient.
+yields half a gigabyte of disc used which is judged to be sufficient.
 
 For larger systems e.g. those using GTK frontend we would most likely
 select ADDRESS_BITS as 22 resulting in a collision every 2048 objects
@@ -176,11 +176,11 @@ Typical values
 Example 1
 ~~~~~~~~~
 
-For a store with 1034 objects genrated from a random navigation of
+For a store with 1034 objects generated from a random navigation of
 pages linked from the about:welcome page.
 
 Metadata total size is 593608 bytes an average of 574 bytes. The
-majority of the storage is used to hold the urls and headers.
+majority of the storage is used to hold the URLs and headers.
 
 Data total size is 9180475 bytes a mean of 8879 bytes 1648726 in the
 largest 10 entries which if excluded gives 7355 bytes average size
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index 66970ef..7ddf512 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -128,6 +128,26 @@ static char fetch_error_buffer[CURL_ERROR_SIZE];
 static char fetch_proxy_userpwd[100];
 
 
+/* OpenSSL 1.0.x to 1.1.0 certificate reference counting changed */
+#if (OPENSSL_VERSION_NUMBER < 0x1010000fL)
+static int ns_X509_up_ref(X509 *cert)
+{
+       cert->references++;
+       return 1;
+}
+
+static void ns_X509_free(X509 *cert)
+{
+       cert->references--;
+       if (cert->references == 0) {
+               X509_free(cert);
+       }
+}
+#else
+#define ns_X509_up_ref X509_up_ref
+#define ns_X509_free X509_free
+#endif
+
 /**
  * Initialise a cURL fetcher.
  */
@@ -438,7 +458,7 @@ fetch_curl_verify_callback(int verify_ok, X509_STORE_CTX 
*x509_ctx)
         */
        if (!fetch->cert_data[depth].cert) {
                fetch->cert_data[depth].cert = 
X509_STORE_CTX_get_current_cert(x509_ctx);
-               fetch->cert_data[depth].cert->references++;
+               ns_X509_up_ref(fetch->cert_data[depth].cert);
                fetch->cert_data[depth].err = 
X509_STORE_CTX_get_error(x509_ctx);
        }
 
@@ -815,10 +835,7 @@ static void fetch_curl_free(void *vf)
        }
 
        for (i = 0; i < MAX_CERTS && f->cert_data[i].cert; i++) {
-               f->cert_data[i].cert->references--;
-               if (f->cert_data[i].cert->references == 0) {
-                       X509_free(f->cert_data[i].cert);
-               }
+               ns_X509_free(f->cert_data[i].cert);
        }
 
        free(f);
@@ -986,10 +1003,7 @@ curl_start_cert_validate(struct curl_fetch_info *f,
                                              
X509_get_pubkey(certs[depth].cert));
 
                /* and clean up */
-               certs[depth].cert->references--;
-               if (certs[depth].cert->references == 0) {
-                       X509_free(certs[depth].cert);
-               }
+               ns_X509_free(certs[depth].cert);
        }
 
        msg.type = FETCH_CERT_ERR;
diff --git a/content/fs_backing_store.c b/content/fs_backing_store.c
index 7d8ac4b..635f917 100644
--- a/content/fs_backing_store.c
+++ b/content/fs_backing_store.c
@@ -27,9 +27,9 @@
  *
  * \todo Implement mmap retrieval where supported.
  *
- * \todo Implement static retrival for metadata objects as their heap
+ * \todo Implement static retrieval for metadata objects as their heap
  *         lifetime is typically very short, though this may be obsoleted
- *         by a small object storage stratagy.
+ *         by a small object storage strategy.
  *
  */
 
@@ -63,7 +63,7 @@
 /** Backing store file format version */
 #define CONTROL_VERSION 130
 
-/** Number of milliseconds after a update before control data maintinance is 
performed  */
+/** Number of milliseconds after a update before control data maintenance is 
performed  */
 #define CONTROL_MAINT_TIME 10000
 
 /** Get address from ident */
@@ -100,7 +100,7 @@
 #define BLOCK_USE_MAP_SIZE (1 << (BLOCK_ENTRY_COUNT - 3))
 
 /**
- * The type used to store index values refering to store entries. Care
+ * The type used to store index values referring to store entries. Care
  * must be taken with this type as it is used to build address to
  * entry mapping so changing the size will have large impacts on
  * memory usage.
@@ -109,7 +109,7 @@ typedef uint16_t entry_index_t;
 
 /**
  * The type used as a binary identifier for each entry derived from
- * the url. A larger identifier will have fewer collisions but
+ * the URL. A larger identifier will have fewer collisions but
  * requires proportionately more storage.
  */
 typedef uint32_t entry_ident_t;
@@ -184,7 +184,7 @@ struct store_entry_element {
  * @note Order is important to avoid excessive structure packing overhead.
  */
 struct store_entry {
-       int64_t last_used; /**< unix time the entry was last used */
+       int64_t last_used; /**< UNIX time the entry was last used */
        entry_ident_t ident; /**< entry identifier */
        uint16_t use_count; /**< number of times this entry has been accessed */
        uint8_t flags; /**< entry flags */
@@ -227,7 +227,7 @@ struct store_state {
        unsigned int entry_bits; /**< log2 number of bits in entry index. */
        unsigned int last_entry; /**< index of last usable entry. */
 
-       /** flag indicating if the entries have been made persistant
+       /** flag indicating if the entries have been made persistent
         * since they were last changed.
         */
        bool entries_dirty;
@@ -235,9 +235,9 @@ struct store_state {
        /**
         * URL identifier to entry index mapping.
         *
-        * This is an open coded index on the entries url field and
-        * provides a computationaly inexpensive way to go from the
-        * url to an entry.
+        * This is an open coded index on the entries URL field and
+        * provides a computationally inexpensive way to go from the
+        * URL to an entry.
         */
        entry_index_t *addrmap;
 
@@ -246,12 +246,12 @@ struct store_state {
        struct block_file blocks[ENTRY_ELEM_COUNT][BLOCK_FILE_COUNT];
 
        /** flag indicating if the block file use maps have been made
-        * persistant since they were last changed.
+        * persistent since they were last changed.
         */
        bool blocks_dirty;
 
        /** flag indicating if a block file has been opened for update
-        * since maintinance was previously done.
+        * since maintenance was previously done.
         */
        bool blocks_opened;
 
@@ -283,8 +283,8 @@ struct store_state *storestate;
  *
  * @param[in] state The store state to use.
  * @param[in, out] bse Pointer to the entry to be removed.
- * @return NSERROR_OK and \a bse updated on succes or NSERROR_NOT_FOUND
- *         if no entry coresponds to the url.
+ * @return NSERROR_OK and \a bse updated on success or NSERROR_NOT_FOUND
+ *         if no entry corresponds to the URL.
  */
 static nserror
 remove_store_entry(struct store_state *state, struct store_entry **bse)
@@ -460,7 +460,7 @@ store_fname(struct store_state *state,
  * @param state The store state to use.
  * @param bse The entry to invalidate.
  * @param elem_idx The element index to invalidate.
- * @return NSERROR_OK on sucess or error code on failure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 invalidate_element(struct store_state *state,
@@ -500,7 +500,7 @@ invalidate_element(struct store_state *state,
  *
  * @param state The store state to use.
  * @param bse The entry to invalidate.
- * @return NSERROR_OK on sucess or error code on failure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 invalidate_entry(struct store_state *state, struct store_entry *bse)
@@ -554,7 +554,7 @@ static int compar(const void *va, const void *vb)
        const struct store_entry *b = &BS_ENTRY(*(entry_ident_t *)vb, 
storestate);
 
        /* consider the allocation flags - if an entry has an
-        * allocation it is considered more valuble as it cannot be
+        * allocation it is considered more valuable as it cannot be
         * freed.
         */
        if ((a->elem[ENTRY_ELEM_DATA].flags == ENTRY_ELEM_FLAG_NONE) &&
@@ -670,7 +670,7 @@ static nserror store_evict(struct store_state *state)
  * Serialise entry index out to storage.
  *
  * @param state The backing store state to serialise.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror write_entries(struct store_state *state)
 {
@@ -735,7 +735,7 @@ static nserror write_entries(struct store_state *state)
  * Serialise block file use map out to storage.
  *
  * \param state The backing store state to serialise.
- * \return NSERROR_OK on sucess or error code on faliure.
+ * \return NSERROR_OK on success or error code on failure.
  */
 static nserror write_blocks(struct store_state *state)
 {
@@ -812,11 +812,11 @@ wr_err:
  * Ensures block files are of the correct extent
  *
  * block files have their extent set to their maximum size to ensure
- * subsequent reads and writes do not need to extend teh file and are
+ * subsequent reads and writes do not need to extend the file and are
  * therefore faster.
  *
  * \param state The backing store state to set block extent for.
- * \return NSERROR_OK on sucess or error code on faliure.
+ * \return NSERROR_OK on success or error code on failure.
  */
 static nserror set_block_extents(struct store_state *state)
 {
@@ -849,7 +849,7 @@ static nserror set_block_extents(struct store_state *state)
 }
 
 /**
- * maintinance of control structures.
+ * maintenance of control structures.
  *
  * callback scheduled when control data has been update. Currently
  * this is for when the entries table is dirty and requires
@@ -959,7 +959,7 @@ static block_index_t alloc_block(struct store_state *state, 
int elem_idx)
  * @param datalen The length of data in \a data
  * @param bse Pointer used to return value.
  * @return NSERROR_OK and \a bse updated on success or NSERROR_NOT_FOUND
- *         if no entry coresponds to the url.
+ *         if no entry corresponds to the url.
  */
 static nserror
 set_store_entry(struct store_state *state,
@@ -1045,12 +1045,12 @@ set_store_entry(struct store_state *state,
        elem->size = datalen;
        state->total_alloc += elem->size;
 
-       /* if the elemnt will fit in a small block attempt to allocate one */
+       /* if the element will fit in a small block attempt to allocate one */
        if (elem->size <= (1U << log2_block_size[elem_idx])) {
                elem->block = alloc_block(state, elem_idx);
        }
 
-       /* ensure control maintinance scheduled. */
+       /* ensure control maintenance scheduled. */
        state->entries_dirty = true;
        guit->misc->schedule(CONTROL_MAINT_TIME, control_maintinance, state);
 
@@ -1118,7 +1118,7 @@ store_open(struct store_state *state,
  * we also compute the total storage in use.
  *
  * @param state The backing store global state.
- * @return NSERROR_OK on sucess or NSERROR_NOMEM if the map storage
+ * @return NSERROR_OK on success or NSERROR_NOMEM if the map storage
  *         could not be allocated.
  */
 static nserror
@@ -1163,7 +1163,7 @@ build_entrymap(struct store_state *state)
  * Unlink entries file
  *
  * @param state The backing store state.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 unlink_entries(struct store_state *state)
@@ -1186,7 +1186,7 @@ unlink_entries(struct store_state *state)
  * Read description entries into memory.
  *
  * @param state The backing store state to put the loaded entries in.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on faliure.
  */
 static nserror
 read_entries(struct store_state *state)
@@ -1236,7 +1236,7 @@ read_entries(struct store_state *state)
  * Read block file usage bitmaps.
  *
  * @param state The backing store state to put the loaded entries in.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 read_blocks(struct store_state *state)
@@ -1275,7 +1275,7 @@ read_blocks(struct store_state *state)
 
        } else {
                LOG("Initialising block use map to defaults");
-               /* ensure block 0 (invalid sentinal) is skipped */
+               /* ensure block 0 (invalid sentinel) is skipped */
                state->blocks[ENTRY_ELEM_DATA][0].use_map[0] = 1;
                state->blocks[ENTRY_ELEM_META][0].use_map[0] = 1;
        }
@@ -1293,7 +1293,7 @@ read_blocks(struct store_state *state)
  * Write the cache tag file.
  *
  * @param state The cache state.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 write_cache_tag(struct store_state *state)
@@ -1330,7 +1330,7 @@ write_cache_tag(struct store_state *state)
  * Write the control file for the current state.
  *
  * @param state The state to write to the control file.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 write_control(struct store_state *state)
@@ -1375,7 +1375,7 @@ write_control(struct store_state *state)
  * Read and parse the control file.
  *
  * @param state The state to read from the control file.
- * @return NSERROR_OK on sucess or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 read_control(struct store_state *state)
@@ -1461,7 +1461,7 @@ control_error: /* problem with the control file */
  * Initialise the backing store.
  *
  * @param parameters to configure backing store.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 initialise(const struct llcache_store_parameters *parameters)
@@ -1732,7 +1732,7 @@ static nserror store_write_file(struct store_state *state,
  * @param bsflags The flags to control how the object is stored.
  * @param data The objects source data.
  * @param datalen The length of the \a data.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 store(nsurl *url,
@@ -1893,13 +1893,13 @@ static nserror store_read_file(struct store_state 
*state,
 }
 
 /**
- * Retrive an object from the backing store.
+ * Retrieve an object from the backing store.
  *
  * @param[in] url The url is used as the unique primary key for the data.
  * @param[in] bsflags The flags to control how the object is retrieved.
  * @param[out] data_out The objects data.
  * @param[out] datalen_out The length of the \a data retrieved.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 fetch(nsurl *url,
@@ -1926,7 +1926,7 @@ fetch(nsurl *url,
        }
        storestate->hit_count++;
 
-       LOG("retriving cache data for url:%s", nsurl_access(url));
+       LOG("retrieving cache data for url:%s", nsurl_access(url));
 
        /* calculate the entry element index */
        if ((bsflags & BACKING_STORE_META) != 0) {
@@ -1984,7 +1984,7 @@ fetch(nsurl *url,
  *
  * @param[in] url The url is used as the unique primary key to invalidate.
  * @param[in] bsflags The flags to control how the object data is released.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror release(nsurl *url, enum backing_store_flags bsflags)
 {
@@ -2032,7 +2032,7 @@ static nserror release(nsurl *url, enum 
backing_store_flags bsflags)
  * be returned as a result to the fetch or meta operations.
  *
  * @param url The url is used as the unique primary key to invalidate.
- * @return NSERROR_OK on success or error code on faliure.
+ * @return NSERROR_OK on success or error code on failure.
  */
 static nserror
 invalidate(nsurl *url)
diff --git a/content/hlcache.c b/content/hlcache.c
index 042e189..95edd21 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -16,8 +16,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/** \file
- * High-level resource cache (implementation)
+/**
+ * \file
+ * High-level resource cache implementation.
  */
 
 #include <assert.h>
@@ -86,7 +87,7 @@ struct hlcache_s {
        /** Ring of retrieval contexts */
        hlcache_retrieval_ctx *retrieval_ctx_ring;
 
-       /* statsistics */
+       /* statistics */
        unsigned int hit_count;
        unsigned int miss_count;
 };
@@ -665,12 +666,12 @@ nserror hlcache_handle_retrieve(nsurl *url, uint32_t 
flags,
                        hlcache_llcache_callback, ctx,
                        &ctx->llcache);
        if (error != NSERROR_OK) {
-               /* error retriving handle so free context and return error */
+               /* error retrieving handle so free context and return error */
                free((char *) ctx->child.charset);
                free(ctx->handle);
                free(ctx);
        } else {
-               /* successfuly started fetch so add new context to list */
+               /* successfully started fetch so add new context to list */
                RING_INSERT(hlcache->retrieval_ctx_ring, ctx);
 
                *result = ctx->handle;
diff --git a/content/llcache.c b/content/llcache.c
index e338c1f..4bd6eb3 100644
--- a/content/llcache.c
+++ b/content/llcache.c
@@ -22,7 +22,7 @@
  * Low-level resource cache implementation
  *
  * This is the implementation of the low level cache. This cache
- * stores source objects in memory and may use a persistant backing
+ * stores source objects in memory and may use a persistent backing
  * store to extend their lifetime.
  *
  * \todo fix writeout conditions and ordering.
@@ -201,8 +201,8 @@ struct llcache_object {
        llcache_header *headers;     /**< Fetch headers */
        size_t num_headers;          /**< Number of fetch headers */
 
-       /* Instrumentation. These elemnts are strictly for information
-        * to improve the cache performance and to provide performace
+       /* Instrumentation. These elements are strictly for information
+        * to improve the cache performance and to provide performance
         * metrics. The values are non-authorative and must not be used to
         * determine object lifetime etc.
         */
@@ -268,7 +268,7 @@ struct llcache_s {
        uint64_t total_written;
 
        /**
-        * Total nuber of miliseconds taken to write to backing store.
+        * Total number of milliseconds taken to write to backing store.
         */
        uint64_t total_elapsed;
 
@@ -804,7 +804,7 @@ static nserror llcache_fetch_process_header(llcache_object 
*object,
  *
  * sets up headers and attempts to start an actual fetch from the
  * fetchers system updating the llcache object with the new fetch on
- * sucessful start.
+ * successful start.
  *
  * \pre The fetch parameters in object->fetch must be populated
  *
@@ -876,7 +876,7 @@ static nserror llcache_object_refetch(llcache_object 
*object)
        /* Reset fetch state */
        object->fetch.state = LLCACHE_FETCH_INIT;
 
-       LLCACHE_LOG("Refetching %p", object);
+       LLCACHE_LOG("Re-fetching %p", object);
 
        /* Kick off fetch */
        res = fetch_start(object->url,
@@ -1173,27 +1173,27 @@ llcache_object_remove_from_list(llcache_object *object, 
llcache_object **list)
 }
 
 /**
- * Retrieve source data for an object from persistant store if necessary.
+ * Retrieve source data for an object from persistent store if necessary.
  *
- * If an objects source data has been placed in the persistant store
- * and the in memory copy released this will attempt to retrive the
+ * If an objects source data has been placed in the persistent store
+ * and the in memory copy released this will attempt to retrieve the
  * source data.
  *
  * \param object the object to operate on.
- * \return apropriate error code.
+ * \return appropriate error code.
  */
 static nserror llcache_persist_retrieve(llcache_object *object)
 {
        /* ensure the source data is present if necessary */
        if ((object->source_data != NULL) ||
            (object->store_state != LLCACHE_STATE_DISC)) {
-               /* source data does not require retriving from
-                * persistant store.
+               /* source data does not require retrieving from
+                * persistent store.
                 */
                return NSERROR_OK;
        }
 
-       /* Source data for the object may be in the persiatant store */
+       /* Source data for the object may be in the persistent store */
        return guit->llcache->fetch(object->url,
                                    BACKING_STORE_NONE,
                                    &object->source_data,
@@ -1205,7 +1205,7 @@ static nserror llcache_persist_retrieve(llcache_object 
*object)
  *
  * The metadata includes object headers.
  *
- * \param object The cache object to serialise teh metadata of.
+ * \param object The cache object to serialise the metadata of.
  * \param data_out Where the serialised buffer will be placed.
  * \param datasize_out The size of the serialised data.
  * \return NSERROR_OK on success with \a data_out and \a datasize_out
@@ -1347,15 +1347,15 @@ operror:
 /**
  * Deserialisation of an objects metadata.
  *
- * Attempt to retrive and deserialise the metadata for an object from
+ * Attempt to retrieve and deserialise the metadata for an object from
  * the backing store.
  *
- * This must only update object if it is sucessful otherwise difficult
+ * This must only update object if it is successful otherwise difficult
  * to debug crashes happen later by using bad leftover object state.
  *
  * \param object The object to retrieve the metadata for.
- * \return NSERROR_OK if the metatdata was retrived and deserialised
- *         or error code if url is not in persistant storage or in
+ * \return NSERROR_OK if the metatdata was retrieved and deserialised
+ *         or error code if URL is not in persistent storage or in
  *         event of deserialisation error.
  */
 static nserror
@@ -1376,7 +1376,7 @@ llcache_process_metadata(llcache_object *object)
        size_t num_headers;
        size_t hloop;
 
-       LOG("Retriving metadata");
+       LOG("Retrieving metadata");
 
        /* attempt to retrieve object metadata from the backing store */
        res = guit->llcache->fetch(object->url,
@@ -1387,7 +1387,7 @@ llcache_process_metadata(llcache_object *object)
                return res;
        }
 
-       LOG("Processing retrived data");
+       LOG("Processing retrieved data");
 
        /* metadata line 1 is the url the metadata referrs to */
        line = 1;
@@ -1405,7 +1405,7 @@ llcache_process_metadata(llcache_object *object)
 
        if (nsurl_compare(object->url, metadataurl, NSURL_COMPLETE) != true) {
                /* backing store returned the wrong object for the
-                * request. This may occour if the backing store had
+                * request. This may occur if the backing store had
                 * a collision in its storage method. We cope with this
                 * by simply skipping caching of this object.
                 */
@@ -1511,14 +1511,14 @@ format_error:
 }
 
 /**
- * Attempt to retrieve an object from persistant storage.
+ * Attempt to retrieve an object from persistent storage.
  *
- * \param object The object to populate from persistant store.
+ * \param object The object to populate from persistent store.
  * \param flags Fetch flags.
  * \param referer The referring url.
  * \param post Post data for fetch.
  * \param redirect_count how many times this fetch has been redirected.
- * \return NSERROR_OK if the object was sucessfully retrived from the
+ * \return NSERROR_OK if the object was successfully retrieved from the
  *         cache else appropriate error code.
  */
 static nserror
@@ -1572,7 +1572,7 @@ llcache_object_fetch_persistant(llcache_object *object,
  * \param referer        Referring URL, or NULL if none
  * \param post           POST data, or NULL for a GET request
  * \param redirect_count  Number of redirects followed so far
- * \param result         Pointer to location to recieve retrieved object
+ * \param result         Pointer to location to receive retrieved object
  * \return NSERROR_OK on success, appropriate error otherwise
  */
 static nserror
@@ -1602,7 +1602,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
        }
 
        /* No viable object found in cache create one and attempt to
-        * pull from persistant store.
+        * pull from persistent store.
         */
        if (newest == NULL) {
                LLCACHE_LOG("No viable object found in llcache");
@@ -1611,12 +1611,12 @@ llcache_object_retrieve_from_cache(nsurl *url,
                if (error != NSERROR_OK)
                        return error;
 
-               /* attempt to retrieve object from persistant store */
+               /* attempt to retrieve object from persistent store */
                error = llcache_object_fetch_persistant(obj, flags, referer, 
post, redirect_count);
                if (error == NSERROR_OK) {
-                       LLCACHE_LOG("retrived object from persistant store");
+                       LLCACHE_LOG("retrieved object from persistent store");
 
-                       /* set newest object from persistant store which
+                       /* set newest object from persistent store which
                         * will cause the normal object handling to be used.
                         */
                        newest = obj;
@@ -1625,7 +1625,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
                        llcache_object_add_to_list(obj, 
&llcache->cached_objects);
 
                }
-               /* else no object found and unretrivable from cache,
+               /* else no object found and irretrievable from cache,
                 * fall through with newest unset to start fetch
                 */
        }
@@ -1641,19 +1641,19 @@ llcache_object_retrieve_from_cache(nsurl *url,
                /* ensure the source data is present */
                error = llcache_persist_retrieve(newest);
                if (error == NSERROR_OK) {
-                       /* source data was sucessfully retrived from
-                        * persistant store
+                       /* source data was successfully retrieved from
+                        * persistent store
                         */
                        *result = newest;
 
                        return NSERROR_OK;
                }
 
-               /* retrival of source data from persistant store
+               /* retrieval of source data from persistent store
                 * failed, destroy cache object and fall though to
                 * cache miss to re-fetch
                 */
-               LLCACHE_LOG("Persistant retrival failed for %p", newest);
+               LLCACHE_LOG("Persistent retrieval failed for %p", newest);
 
                llcache_object_remove_from_list(newest, 
&llcache->cached_objects);
                llcache_object_destroy(newest);
@@ -1704,9 +1704,9 @@ llcache_object_retrieve_from_cache(nsurl *url,
                        return NSERROR_OK;
                }
 
-               LLCACHE_LOG("Persistant retrival failed for %p", newest);
+               LLCACHE_LOG("Persistent retrieval failed for %p", newest);
 
-               /* retrival of source data from persistant store
+               /* retrieval of source data from persistent store
                 * failed, destroy cache object and fall though to
                 * cache miss to re-retch
                 */
@@ -1743,7 +1743,7 @@ llcache_object_retrieve_from_cache(nsurl *url,
  * \param referer        Referring URL, or NULL if none
  * \param post           POST data, or NULL for a GET request
  * \param redirect_count  Number of redirects followed so far
- * \param result         Pointer to location to recieve retrieved object
+ * \param result         Pointer to location to receive retrieved object
  * \return NSERROR_OK on success, appropriate error otherwise
  */
 static nserror
@@ -2372,7 +2372,7 @@ build_candidate_list(struct llcache_object ***lst_out, 
int *lst_len_out)
 
                /* cacehable objects with no pending fetches, not
                 * already on disc and with sufficient lifetime to
-                * make disc cache worthwile
+                * make disc cache worthwhile
                 */
                if ((object->candidate_count == 0) &&
                    (object->fetch.fetch == NULL) &&
@@ -2526,20 +2526,20 @@ static void llcache_persist(void *p)
 
        ret = build_candidate_list(&lst, &lst_count);
        if (ret != NSERROR_OK) {
-               LLCACHE_LOG("Unable to construct candidate list for persisatnt 
writeout");
+               LLCACHE_LOG("Unable to construct candidate list for persistent 
writeout");
                return;
        }
 
        write_limit = (llcache->maximum_bandwidth * llcache->time_quantum) / 
1000;
 
-       /* obtained a candidate list, make each object persistant in turn */
+       /* obtained a candidate list, make each object persistent in turn */
        for (idx = 0; idx < lst_count; idx++) {
                ret = write_backing_store(lst[idx], &written, &elapsed);
                if (ret != NSERROR_OK) {
                        continue;
                }
 
-               /* sucessfully wrote object to backing store */
+               /* successfully wrote object to backing store */
                total_written += written;
                total_elapsed += elapsed;
                total_bandwidth = (total_written * 1000) / total_elapsed;
@@ -3138,7 +3138,7 @@ llcache_object_snapshot(llcache_object *object,   
llcache_object **snapshot)
 /**
  * total ram usage of object
  *
- * \param object The object to caclulate the total RAM usage of.
+ * \param object The object to calculate the total RAM usage of.
  * \return The total RAM usage in bytes.
  */
 static inline uint32_t
@@ -3253,7 +3253,7 @@ void llcache_clean(bool purge)
        }
 
        /* if the cache limit is exceeded try to make some objects
-        * persistant so their RAM can be reclaimed in the next
+        * persistent so their RAM can be reclaimed in the next
         * step
         */
        if (limit < llcache_size) {
@@ -3261,7 +3261,7 @@ void llcache_clean(bool purge)
        }
 
        /* Source data of fresh cacheable objects with no users, no
-        * pending fetches and pushed to persistant store while the
+        * pending fetches and pushed to persistent store while the
         * cache exceeds the configured size.
         */
        for (object = llcache->cached_objects;
@@ -3286,8 +3286,8 @@ void llcache_clean(bool purge)
        }
 
        /* Fresh cacheable objects with no users, no pending fetches
-        * and pushed to persistant store while the cache exceeds
-        * the configured size. Efectively just the llcache object metadata.
+        * and pushed to persistent store while the cache exceeds
+        * the configured size. Effectively just the llcache object metadata.
         */
        for (object = llcache->cached_objects;
             ((limit < llcache_size) && (object != NULL));
@@ -3317,7 +3317,7 @@ void llcache_clean(bool purge)
 
        /* Fresh cacheable objects with no users or pending fetches
         * while the cache exceeds the configured size. These are the
-        * most valuble objects as replacing them is a full network
+        * most valuable objects as replacing them is a full network
         * fetch
         */
        for (object = llcache->cached_objects;


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to