summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/Makefile7
-rw-r--r--content/fetch.c2
-rw-r--r--content/fetchers/Makefile9
-rw-r--r--content/fetchers/file/Makefile3
-rw-r--r--content/fetchers/file/dirlist.c (renamed from content/dirlist.c)2
-rw-r--r--content/fetchers/file/dirlist.h (renamed from content/dirlist.h)9
-rw-r--r--content/fetchers/file/file.c (renamed from content/fetchers/file.c)4
-rw-r--r--content/fetchers/file/file.h (renamed from content/fetchers/file.h)0
8 files changed, 23 insertions, 13 deletions
diff --git a/content/Makefile b/content/Makefile
index abc5a2463..188d0f46e 100644
--- a/content/Makefile
+++ b/content/Makefile
@@ -3,7 +3,6 @@
S_CONTENT := \
content.c \
content_factory.c \
- dirlist.c \
fetch.c \
hlcache.c \
llcache.c \
@@ -18,10 +17,12 @@ ifeq ($(NETSURF_FS_BACKING_STORE),YES)
endif
-# Content fetchers sources
+# Content fetcher sources
include content/fetchers/Makefile
-# Content handlers
+S_FETCHERS := $(addprefix content/,$(S_FETCHERS))
+
+# Content handler sources
include content/handlers/Makefile
S_CONTENT := $(addprefix content/,$(S_CONTENT))
diff --git a/content/fetch.c b/content/fetch.c
index 4cc7859fe..a26079965 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -56,7 +56,7 @@
#include "content/fetchers/about.h"
#include "content/fetchers/curl.h"
#include "content/fetchers/data.h"
-#include "content/fetchers/file.h"
+#include "content/fetchers/file/file.h"
#include "javascript/fetcher.h"
#include "content/urldb.h"
diff --git a/content/fetchers/Makefile b/content/fetchers/Makefile
index 9c8479320..e87a4e891 100644
--- a/content/fetchers/Makefile
+++ b/content/fetchers/Makefile
@@ -1,10 +1,15 @@
# Content fetchers sources
-S_FETCHERS_YES := data.c file.c about.c resource.c
+S_FETCHERS_YES := data.c about.c resource.c
S_FETCHERS_NO :=
S_FETCHERS_$(NETSURF_USE_CURL) += curl.c
-S_FETCHERS := $(addprefix content/fetchers/,$(S_FETCHERS_YES))
+S_FETCHERS := $(addprefix fetchers/,$(S_FETCHERS_YES))
+
+# File fetcher
+include content/fetchers/file/Makefile
+
+S_FETCHERS += $(addprefix fetchers/file/,$(S_FETCHER_FILE))
# The following files depend on the testament
content/fetchers/about.c: testament $(OBJROOT)/testament.h
diff --git a/content/fetchers/file/Makefile b/content/fetchers/file/Makefile
new file mode 100644
index 000000000..c22400a56
--- /dev/null
+++ b/content/fetchers/file/Makefile
@@ -0,0 +1,3 @@
+# File fetcher sources
+
+S_FETCHER_FILE := dirlist.c file.c
diff --git a/content/dirlist.c b/content/fetchers/file/dirlist.c
index 3f79e658d..d49dc7fe7 100644
--- a/content/dirlist.c
+++ b/content/fetchers/file/dirlist.c
@@ -32,7 +32,7 @@
#include "netsurf/types.h"
#include "netsurf/plot_style.h"
-#include "content/dirlist.h"
+#include "dirlist.h"
#include "desktop/system_colour.h"
static int dirlist_filesize_calculate(unsigned long *bytesize);
diff --git a/content/dirlist.h b/content/fetchers/file/dirlist.h
index 5cdaf7532..3a0d48c1c 100644
--- a/content/dirlist.h
+++ b/content/fetchers/file/dirlist.h
@@ -16,14 +16,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Generate HTML content for displaying directory listings (interface).
+/**
+ * \file
+ * interface to generate HTML content for displaying directory listings.
*
* These functions should in general be called via the content interface.
*/
-#ifndef _NETSURF_CONTENT_DIRLIST_H_
-#define _NETSURF_CONTENT_DIRLIST_H_
+#ifndef NETSURF_CONTENT_DIRLIST_H_
+#define NETSURF_CONTENT_DIRLIST_H_
#include <stdbool.h>
diff --git a/content/fetchers/file.c b/content/fetchers/file/file.c
index bf2cc3282..ff3a1b1f6 100644
--- a/content/fetchers/file.c
+++ b/content/fetchers/file/file.c
@@ -57,10 +57,10 @@
#include "netsurf/fetch.h"
#include "desktop/gui_internal.h"
-#include "content/dirlist.h"
#include "content/fetch.h"
#include "content/fetchers.h"
-#include "content/fetchers/file.h"
+#include "dirlist.h"
+#include "file.h"
/* Maximum size of read buffer */
#define FETCH_FILE_MAX_BUF_SIZE (1024 * 1024)
diff --git a/content/fetchers/file.h b/content/fetchers/file/file.h
index 5a5cfe89b..5a5cfe89b 100644
--- a/content/fetchers/file.h
+++ b/content/fetchers/file/file.h