From 270ef59a98d34fef418fb6cd27e46f3edc912948 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sun, 28 Mar 2010 12:56:39 +0000 Subject: Merge jmb/new-cache; r=dsilvers,rs=vince svn path=/trunk/netsurf/; revision=10180 --- render/directory.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'render/directory.c') diff --git a/render/directory.c b/render/directory.c index 82f24efa2..9f002d831 100644 --- a/render/directory.c +++ b/render/directory.c @@ -28,7 +28,7 @@ #include #include #include -#include "content/content.h" +#include "content/content_protected.h" #include "render/directory.h" #include "render/html.h" #include "utils/messages.h" @@ -40,9 +40,8 @@ static const char header[] = "\n\n\n"; static const char footer[] = "</pre>\n</body>\n</html>\n"; -bool directory_create(struct content *c, struct content *parent, - const char *params[]) { - if (!html_create(c, parent, params)) +bool directory_create(struct content *c, const struct http_parameter *params) { + if (!html_create(c, params)) /* html_create() must have broadcast MSG_ERROR already, so we * don't need to. */ return false; @@ -64,7 +63,7 @@ bool directory_convert(struct content *c, int width, int height) { bool compare; char *up; - path = url_to_path(c->url); + path = url_to_path(content__get_url(c)); if (!path) { msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); @@ -100,9 +99,9 @@ bool directory_convert(struct content *c, int width, int height) { binding_parse_chunk(c->data.html.parser_binding, (uint8_t *) buffer, strlen(buffer)); - res = url_parent(c->url, &up); + res = url_parent(content__get_url(c), &up); if (res == URL_FUNC_OK) { - res = url_compare(c->url, up, false, &compare); + res = url_compare(content__get_url(c), up, false, &compare); if ((res == URL_FUNC_OK) && !compare) { snprintf(buffer, sizeof(buffer), "<a href=\"..\">[..]</a>\n"); @@ -124,7 +123,8 @@ bool directory_convert(struct content *c, int width, int height) { continue; snprintf(buffer, sizeof(buffer), "<a href=\"%s/%s\">%s</a>\n", - c->url, entry->d_name, entry->d_name); + content__get_url(c), entry->d_name, + entry->d_name); binding_parse_chunk(c->data.html.parser_binding, (uint8_t *) buffer, strlen(buffer)); -- cgit v1.2.3