aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2022-04-09 09:46:17 +0200
committerThomas Schmucker <ts@its1.de>2022-04-09 09:46:17 +0200
commit38f5e364f73967c01f9ed442fe6646e70cb1dde0 (patch)
tree274817eb2793584b0e3d856de5504a614f2b4e89
parent2863f4f1d2a6a6a8704454824d6c291d2e0d4b5c (diff)
parent154874afda4a8df885e51c01f7681f04fb0b8e61 (diff)
downloaddata-structures-38f5e364f73967c01f9ed442fe6646e70cb1dde0.tar.gz
data-structures-38f5e364f73967c01f9ed442fe6646e70cb1dde0.tar.bz2
data-structures-38f5e364f73967c01f9ed442fe6646e70cb1dde0.zip
Merge branch 'rework-directory-structure'
-rw-r--r--.gitignore20
-rw-r--r--compile_flags.txt8
-rw-r--r--makefile59
-rw-r--r--src/allocator.c (renamed from allocator.c)0
-rw-r--r--src/allocator.h (renamed from allocator.h)0
-rw-r--r--src/arraylist.c (renamed from arraylist.c)0
-rw-r--r--src/avl.c (renamed from avl.c)1
-rw-r--r--src/deque.c (renamed from deque.c)0
-rw-r--r--src/dlist.c (renamed from dlist.c)0
-rw-r--r--src/hashtab.c (renamed from hashtab.c)0
-rw-r--r--src/heap.c (renamed from heap.c)0
-rw-r--r--src/insertsort.c (renamed from insertsort.c)0
-rw-r--r--src/list-tail-node.c (renamed from list-tail-node.c)0
-rw-r--r--src/list.c (renamed from list.c)0
-rw-r--r--src/queue.c (renamed from queue.c)0
-rw-r--r--src/quicksort.c (renamed from quicksort.c)0
-rw-r--r--src/random.h (renamed from random.h)0
-rw-r--r--src/rb.c (renamed from rb.c)0
-rw-r--r--src/rc4.c (renamed from rc4.c)0
-rw-r--r--src/ringbuff.c (renamed from ringbuff.c)0
-rw-r--r--src/shellsort.c (renamed from shellsort.c)0
-rw-r--r--src/stack.c (renamed from stack.c)0
-rw-r--r--src/stack2.c (renamed from stack2.c)0
-rw-r--r--src/tree.c (renamed from tree.c)0
-rw-r--r--src/treeutil.h (renamed from treeutil.h)0
-rw-r--r--src/util.h (renamed from util.h)0
26 files changed, 9 insertions, 79 deletions
diff --git a/.gitignore b/.gitignore
index 08b10b0..5c96b5d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,20 +1,2 @@
1.tags 1.tags
2allocator 2bin/*
3arraylist
4avl
5deque
6dlist
7hashtab
8heap
9list
10list-tail-node
11queue
12quicksort
13rb
14ringbuff
15stack
16stack2
17tags
18tree
19insertsort
20shellsort
diff --git a/compile_flags.txt b/compile_flags.txt
deleted file mode 100644
index d36fd95..0000000
--- a/compile_flags.txt
+++ /dev/null
@@ -1,8 +0,0 @@
1-Wall
2-Werror
3-Wextra
4-Wno-unused-function
5-Wsign-conversion
6-pedantic
7-std=c11
8-I/usr/local/include
diff --git a/makefile b/makefile
index 14f5db3..4b6f5b8 100644
--- a/makefile
+++ b/makefile
@@ -1,64 +1,19 @@
1.PHONY: all clean 1.PHONY: all clean
2 2
3BINS=bin/list bin/list-tail-node bin/dlist bin/stack bin/stack2 bin/queue bin/ringbuff bin/hashtab bin/tree bin/avl bin/heap bin/quicksort bin/allocator bin/rb bin/deque bin/arraylist bin/insertsort bin/shellsort
4
3CFLAGS=-Wall -Werror -Wextra -Wno-unused-function -Wsign-conversion -pedantic -std=c99 -g 5CFLAGS=-Wall -Werror -Wextra -Wno-unused-function -Wsign-conversion -pedantic -std=c99 -g
4BINS=list list-tail-node dlist stack stack2 queue ringbuff hashtab tree avl heap quicksort allocator rb deque arraylist insertsort shellsort
5 6
6all: $(BINS) 7all: $(BINS)
7 8
8list: list.c util.h 9bin:
9 cc $(CFLAGS) $< -o $@ 10 mkdir -p $@
10 11
11list-tail-node: list-tail-node.c util.h 12bin/allocator: src/allocator.h
12 cc $(CFLAGS) $< -o $@
13
14dlist: dlist.c util.h
15 cc $(CFLAGS) $< -o $@
16
17stack: stack.c util.h
18 cc $(CFLAGS) $< -o $@
19
20stack2: stack2.c util.h
21 cc $(CFLAGS) $< -o $@
22
23queue: queue.c util.h
24 cc $(CFLAGS) $< -o $@
25
26ringbuff: ringbuff.c util.h
27 cc $(CFLAGS) $< -o $@
28
29hashtab: hashtab.c util.h
30 cc $(CFLAGS) $< -o $@
31
32tree: tree.c util.h
33 cc $(CFLAGS) $< -o $@
34
35avl: avl.c util.h
36 cc $(CFLAGS) $< -o $@
37
38rb: rb.c util.h
39 cc $(CFLAGS) $< -o $@
40
41deque: deque.c util.h
42 cc $(CFLAGS) $< -o $@
43
44heap: heap.c util.h
45 cc $(CFLAGS) $< -o $@
46
47quicksort: quicksort.c util.h
48 cc $(CFLAGS) $< -o $@
49
50allocator: allocator.c allocator.h
51 cc $(CFLAGS) $< -o $@
52
53arraylist: arraylist.c util.h
54 cc $(CFLAGS) $< -o $@
55
56insertsort: insertsort.c util.h
57 cc $(CFLAGS) $< -o $@
58 13
59shellsort: shellsort.c util.h 14bin/%: src/%.c src/util.h | bin
60 cc $(CFLAGS) $< -o $@ 15 cc $(CFLAGS) $< -o $@
61 16
62clean: 17clean:
63 rm -f $(BINS) 18 rm -rf bin
64 19
diff --git a/allocator.c b/src/allocator.c
index 98fa69f..98fa69f 100644
--- a/allocator.c
+++ b/src/allocator.c
diff --git a/allocator.h b/src/allocator.h
index dd9bb16..dd9bb16 100644
--- a/allocator.h
+++ b/src/allocator.h
diff --git a/arraylist.c b/src/arraylist.c
index f010d07..f010d07 100644
--- a/arraylist.c
+++ b/src/arraylist.c
diff --git a/avl.c b/src/avl.c
index 5bb4415..874cc6c 100644
--- a/avl.c
+++ b/src/avl.c
@@ -1,4 +1,5 @@
1// AVL Tree 1// AVL Tree
2#include <assert.h>
2#include <stdbool.h> 3#include <stdbool.h>
3#include <stdio.h> 4#include <stdio.h>
4#include <stdlib.h> 5#include <stdlib.h>
diff --git a/deque.c b/src/deque.c
index 881d1d3..881d1d3 100644
--- a/deque.c
+++ b/src/deque.c
diff --git a/dlist.c b/src/dlist.c
index 55e42d7..55e42d7 100644
--- a/dlist.c
+++ b/src/dlist.c
diff --git a/hashtab.c b/src/hashtab.c
index 256fac9..256fac9 100644
--- a/hashtab.c
+++ b/src/hashtab.c
diff --git a/heap.c b/src/heap.c
index 091e761..091e761 100644
--- a/heap.c
+++ b/src/heap.c
diff --git a/insertsort.c b/src/insertsort.c
index 1a30a1a..1a30a1a 100644
--- a/insertsort.c
+++ b/src/insertsort.c
diff --git a/list-tail-node.c b/src/list-tail-node.c
index edfcf31..edfcf31 100644
--- a/list-tail-node.c
+++ b/src/list-tail-node.c
diff --git a/list.c b/src/list.c
index d18dae4..d18dae4 100644
--- a/list.c
+++ b/src/list.c
diff --git a/queue.c b/src/queue.c
index 6a472ee..6a472ee 100644
--- a/queue.c
+++ b/src/queue.c
diff --git a/quicksort.c b/src/quicksort.c
index 4657dcd..4657dcd 100644
--- a/quicksort.c
+++ b/src/quicksort.c
diff --git a/random.h b/src/random.h
index 9094d5b..9094d5b 100644
--- a/random.h
+++ b/src/random.h
diff --git a/rb.c b/src/rb.c
index 7c2d2c1..7c2d2c1 100644
--- a/rb.c
+++ b/src/rb.c
diff --git a/rc4.c b/src/rc4.c
index 8a67303..8a67303 100644
--- a/rc4.c
+++ b/src/rc4.c
diff --git a/ringbuff.c b/src/ringbuff.c
index 1294b3b..1294b3b 100644
--- a/ringbuff.c
+++ b/src/ringbuff.c
diff --git a/shellsort.c b/src/shellsort.c
index 29e6bf8..29e6bf8 100644
--- a/shellsort.c
+++ b/src/shellsort.c
diff --git a/stack.c b/src/stack.c
index 48b9eba..48b9eba 100644
--- a/stack.c
+++ b/src/stack.c
diff --git a/stack2.c b/src/stack2.c
index 5f4ba41..5f4ba41 100644
--- a/stack2.c
+++ b/src/stack2.c
diff --git a/tree.c b/src/tree.c
index 93690e2..93690e2 100644
--- a/tree.c
+++ b/src/tree.c
diff --git a/treeutil.h b/src/treeutil.h
index 76627c0..76627c0 100644
--- a/treeutil.h
+++ b/src/treeutil.h
diff --git a/util.h b/src/util.h
index 7ede6fd..7ede6fd 100644
--- a/util.h
+++ b/src/util.h