diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-04-12 13:43:57 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-04-12 13:43:57 +0000 |
commit | cdee9e985ee4d29d624539e47aa515b5201a18e3 (patch) | |
tree | fd9dab256510c36d76f5af1ca5ff97a1013e99e8 /image/image_cache.c | |
parent | e2e69d29bb41b62c7aa06749b73b1854c3dfbc23 (diff) | |
download | netsurf-cdee9e985ee4d29d624539e47aa515b5201a18e3.tar.gz netsurf-cdee9e985ee4d29d624539e47aa515b5201a18e3.tar.bz2 |
More work on about:imagecache entry listing table.
svn path=/trunk/netsurf/; revision=13855
Diffstat (limited to 'image/image_cache.c')
-rw-r--r-- | image/image_cache.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/image/image_cache.c b/image/image_cache.c index 8124763e5..5e62fe0aa 100644 --- a/image/image_cache.c +++ b/image/image_cache.c @@ -637,6 +637,7 @@ int image_cache_snentryf(char *string, size_t size, unsigned int entryn, struct image_cache_entry_s *centry; size_t slen = 0; /* current output string length */ int fmtc = 0; /* current index into format string */ + lwc_string *origin; /* current entry's origin */ centry = image_cache__findn(entryn); if (centry == NULL) @@ -681,6 +682,29 @@ int image_cache_snentryf(char *string, size_t size, unsigned int entryn, slen += snprintf(string + slen, size - slen, "%s", nsurl_access(llcache_handle_get_url(centry->content->llcache))); break; + + case 'o': + if (nsurl_has_component(llcache_handle_get_url( + centry->content->llcache), + NSURL_HOST)) { + origin = nsurl_get_component( + llcache_handle_get_url( + centry->content-> + llcache), + NSURL_HOST); + + slen += snprintf(string + slen, + size - slen, "%s", + lwc_string_data( + origin)); + + lwc_string_unref(origin); + } else { + slen += snprintf(string + slen, + size - slen, "%s", + "localhost"); + } + break; case 's': if (centry->bitmap != NULL) { |