commit a94b15814cf5729a377dd23c7961f183c6884b59
Author: Laslo Hunhold <[email protected]>
AuthorDate: Fri Aug 28 23:29:54 2020 +0200
Commit: Laslo Hunhold <[email protected]>
CommitDate: Fri Aug 28 23:29:54 2020 +0200
Rename resp.{c,h} to data.{c,h}
The methods in data.h only deal with the actual response data, not
the request handling itself, which has been formalized a bit more
in http.h. To avoid confusion, we rename it to data.h.
Signed-off-by: Laslo Hunhold <[email protected]>
diff --git a/Makefile b/Makefile
index cf57f13..0c0ebed 100644
--- a/Makefile
+++ b/Makefile
@@ -4,15 +4,15 @@
include config.mk
-COMPONENTS = util sock http resp
+COMPONENTS = data http sock util
all: quark
-util.o: util.c util.h config.mk
-sock.o: sock.c sock.h util.h config.mk
-http.o: http.c http.h util.h http.h resp.h config.h config.mk
-resp.o: resp.c resp.h util.h http.h config.mk
+data.o: data.c data.h util.h http.h config.mk
+http.o: http.c http.h util.h http.h data.h config.h config.mk
main.o: main.c util.h sock.h http.h arg.h config.h config.mk
+sock.o: sock.c sock.h util.h config.mk
+util.o: util.c util.h config.mk
quark: $(COMPONENTS:=.o) $(COMPONENTS:=.h) main.o config.mk
$(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(COMPONENTS:=.o) main.o $(LDFLAGS)
diff --git a/resp.c b/data.c
similarity index 99%
rename from resp.c
rename to data.c
index b7441dc..3794416 100644
--- a/resp.c
+++ b/data.c
@@ -8,7 +8,7 @@
#include <unistd.h>
#include "http.h"
-#include "resp.h"
+#include "data.h"
#include "util.h"
static int
diff --git a/resp.h b/data.h
similarity index 100%
rename from resp.h
rename to data.h
diff --git a/http.c b/http.c
index ee075e4..6e32fba 100644
--- a/http.c
+++ b/http.c
@@ -18,7 +18,6 @@
#include "config.h"
#include "http.h"
-#include "resp.h"
#include "util.h"
const char *req_field_str[] = {
diff --git a/main.c b/main.c
index 91d70b7..81cabde 100644
--- a/main.c
+++ b/main.c
@@ -16,7 +16,7 @@
#include <time.h>
#include <unistd.h>
-#include "resp.h"
+#include "data.h"
#include "http.h"
#include "sock.h"
#include "util.h"