]> git.seodisparate.com - c_simple_http/commitdiff
Add third_party SimpleArchiver (data structures)
authorStephen Seo <seo.disparate@gmail.com>
Fri, 30 Aug 2024 02:58:11 +0000 (11:58 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Fri, 30 Aug 2024 02:58:11 +0000 (11:58 +0900)
Reusing the data structures implemented in the SimpleArchiver project.

.gitmodules [new file with mode: 0644]
Makefile
third_party/SimpleArchiver [new submodule]

diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..0693d12
--- /dev/null
@@ -0,0 +1,3 @@
+[submodule "third_party/SimpleArchiver"]
+       path = third_party/SimpleArchiver
+       url = https://git.seodisparate.com/stephenseo/SimpleArchiver.git
index 7bdf199b3bcc37a6f50c7e0242f56baed441c0bb..ccec5ebcf9bbc40af05fda41c5373605f1e4336f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
-COMMON_FLAGS = -Wall -Wextra -Wpedantic
+COMMON_FLAGS = -Wall -Wextra -Wpedantic \
+       -Ithird_party/SimpleArchiver/src/data_structures \
+       -Ithird_party/SimpleArchiver/src/algorithms
 DEBUG_FLAGS = -Og -g
 RELEASE_FLAGS = -O3 -DNDEBUG
 
@@ -14,7 +16,11 @@ SOURCES = \
                src/big_endian.c \
                src/tcp_socket.c \
                src/signal_handling.c \
-               src/globals.c
+               src/globals.c \
+               third_party/SimpleArchiver/src/data_structures/linked_list.c \
+               third_party/SimpleArchiver/src/data_structures/hash_map.c \
+               third_party/SimpleArchiver/src/data_structures/priority_heap.c \
+               third_party/SimpleArchiver/src/algorithms/linear_congruential_gen.c
 
 OBJECT_DIR = objs
 OBJECTS = $(addprefix ${OBJECT_DIR}/,$(patsubst %.c,%.c.o,${SOURCES}))
diff --git a/third_party/SimpleArchiver b/third_party/SimpleArchiver
new file mode 160000 (submodule)
index 0000000..2e46790
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 2e46790ecee627738469ef7370f4c082e96b03fc