aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-07-20 23:47:33 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-07-21 01:28:38 +0200
commit8c3ba33ced08b211db0cd5f81675bdf62f55acc7 (patch)
tree928ccf6a025db57c3a038a56a920735dccd286ff
parent4dd531b9ed1923837da32d69fa1933ec9083f8db (diff)
Move header files to subdirectory
Since slweb is meant as a library, it is advisable to keep public header files under their own directory in order to avoid name clashing i.e., #include "something.h" Now becomes: #include "slweb/something.h"
-rw-r--r--handler.c8
-rw-r--r--html.c2
-rw-r--r--http.c2
-rw-r--r--include/slweb/handler.h (renamed from handler.h)2
-rw-r--r--include/slweb/html.h (renamed from html.h)0
-rw-r--r--include/slweb/http.h (renamed from http.h)0
-rw-r--r--include/slweb/server.h (renamed from server.h)0
-rw-r--r--include/slweb/wildcard_cmp.h (renamed from wildcard_cmp.h)0
-rw-r--r--server.c2
-rw-r--r--wildcard_cmp.c2
10 files changed, 9 insertions, 9 deletions
diff --git a/handler.c b/handler.c
index 1d7e922..f29da15 100644
--- a/handler.c
+++ b/handler.c
@@ -1,9 +1,9 @@
#define _POSIX_C_SOURCE 200809L
-#include "handler.h"
-#include "http.h"
-#include "server.h"
-#include "wildcard_cmp.h"
+#include "slweb/handler.h"
+#include "slweb/http.h"
+#include "slweb/server.h"
+#include "slweb/wildcard_cmp.h"
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
diff --git a/html.c b/html.c
index 41ce387..f916ec0 100644
--- a/html.c
+++ b/html.c
@@ -1,6 +1,6 @@
#define _POSIX_C_SOURCE 200809L
-#include "html.h"
+#include "slweb/html.h"
#include <dynstr.h>
#include <errno.h>
#include <stddef.h>
diff --git a/http.c b/http.c
index cb28ee5..df54c98 100644
--- a/http.c
+++ b/http.c
@@ -1,6 +1,6 @@
#define _POSIX_C_SOURCE 200809L
-#include "http.h"
+#include "slweb/http.h"
#include <dynstr.h>
#include <sys/types.h>
#include <unistd.h>
diff --git a/handler.h b/include/slweb/handler.h
index 38de97b..4ac7f76 100644
--- a/handler.h
+++ b/include/slweb/handler.h
@@ -1,7 +1,7 @@
#ifndef HANDLER_H
#define HANDLER_H
-#include "http.h"
+#include "slweb/http.h"
#include <stddef.h>
typedef int (*handler_fn)(const struct http_payload *p,
diff --git a/html.h b/include/slweb/html.h
index e62575e..e62575e 100644
--- a/html.h
+++ b/include/slweb/html.h
diff --git a/http.h b/include/slweb/http.h
index ac1f51a..ac1f51a 100644
--- a/http.h
+++ b/include/slweb/http.h
diff --git a/server.h b/include/slweb/server.h
index 74f06ae..74f06ae 100644
--- a/server.h
+++ b/include/slweb/server.h
diff --git a/wildcard_cmp.h b/include/slweb/wildcard_cmp.h
index fa09913..fa09913 100644
--- a/wildcard_cmp.h
+++ b/include/slweb/wildcard_cmp.h
diff --git a/server.c b/server.c
index 22615b2..01e82b0 100644
--- a/server.c
+++ b/server.c
@@ -1,6 +1,6 @@
#define _POSIX_C_SOURCE 200809L
-#include "server.h"
+#include "slweb/server.h"
#include <fcntl.h>
#include <sys/socket.h>
#include <netinet/in.h>
diff --git a/wildcard_cmp.c b/wildcard_cmp.c
index fe0b3e1..1fcd451 100644
--- a/wildcard_cmp.c
+++ b/wildcard_cmp.c
@@ -1,4 +1,4 @@
-#include "wildcard_cmp.h"
+#include "slweb/wildcard_cmp.h"
#include <stdbool.h>
#include <stddef.h>
#include <string.h>