summaryrefslogtreecommitdiff
path: root/content/dirlist.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-05-26 23:43:36 +0100
committerVincent Sanders <vince@kyllikki.org>2014-05-26 23:52:36 +0100
commit00b6cfc57e27f8146d9b41ba8e63038a4f9df70e (patch)
treebadf71a43a81975098d3f1294073d8c76bc994ea /content/dirlist.c
parent1f337f292d1c98c396d5f8d5d294f9ba13963586 (diff)
downloadnetsurf-00b6cfc57e27f8146d9b41ba8e63038a4f9df70e.tar.gz
netsurf-00b6cfc57e27f8146d9b41ba8e63038a4f9df70e.tar.bz2
rework path to url mapping functions to convert from and to nsurl
Diffstat (limited to 'content/dirlist.c')
-rw-r--r--content/dirlist.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/content/dirlist.c b/content/dirlist.c
index 0c0e2aee2..1d7a67e1f 100644
--- a/content/dirlist.c
+++ b/content/dirlist.c
@@ -24,9 +24,12 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#include "content/dirlist.h"
+
+#include "utils/nsurl.h"
#include "utils/messages.h"
+#include "content/dirlist.h"
+
static int dirlist_filesize_calculate(unsigned long *bytesize);
static int dirlist_filesize_value(unsigned long bytesize);
static char* dirlist_filesize_unit(unsigned long bytesize);
@@ -262,7 +265,7 @@ bool dirlist_generate_headings(char *buffer, int buffer_length)
* dirlist_generate_bottom()
*/
-bool dirlist_generate_row(bool even, bool directory, char *url, char *name,
+bool dirlist_generate_row(bool even, bool directory, nsurl *url, char *name,
const char *mimetype, long long size, char *date, char *time,
char *buffer, int buffer_length)
{
@@ -288,7 +291,7 @@ bool dirlist_generate_row(bool even, bool directory, char *url, char *name,
"\t<span class=\"date\">%s</span>\n"
"\t<span class=\"time\">%s</span>\n"
"</a>\n",
- url, even ? "even" : "odd",
+ nsurl_access(url), even ? "even" : "odd",
directory ? "dir" : "file",
name, mimetype, size_string, unit, date, time);
if (error < 0 || error >= buffer_length)