summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/codecov.yml2
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--Makefile5
-rw-r--r--src/bar.c (renamed from bar.c)0
-rw-r--r--src/bar.h (renamed from bar.h)0
-rw-r--r--src/bfs.h (renamed from bfs.h)0
-rw-r--r--src/bftw.c (renamed from bftw.c)0
-rw-r--r--src/bftw.h (renamed from bftw.h)0
-rw-r--r--src/color.c (renamed from color.c)0
-rw-r--r--src/color.h (renamed from color.h)0
-rw-r--r--src/ctx.c (renamed from ctx.c)0
-rw-r--r--src/ctx.h (renamed from ctx.h)0
-rw-r--r--src/darray.c (renamed from darray.c)0
-rw-r--r--src/darray.h (renamed from darray.h)0
-rw-r--r--src/diag.c (renamed from diag.c)0
-rw-r--r--src/diag.h (renamed from diag.h)0
-rw-r--r--src/dir.c (renamed from dir.c)0
-rw-r--r--src/dir.h (renamed from dir.h)0
-rw-r--r--src/dstring.c (renamed from dstring.c)0
-rw-r--r--src/dstring.h (renamed from dstring.h)0
-rw-r--r--src/eval.c (renamed from eval.c)0
-rw-r--r--src/eval.h (renamed from eval.h)0
-rw-r--r--src/exec.c (renamed from exec.c)0
-rw-r--r--src/exec.h (renamed from exec.h)0
-rw-r--r--src/expr.h (renamed from expr.h)0
-rw-r--r--src/fsade.c (renamed from fsade.c)0
-rw-r--r--src/fsade.h (renamed from fsade.h)0
-rw-r--r--src/main.c (renamed from main.c)0
-rw-r--r--src/mtab.c (renamed from mtab.c)0
-rw-r--r--src/mtab.h (renamed from mtab.h)0
-rw-r--r--src/opt.c (renamed from opt.c)0
-rw-r--r--src/opt.h (renamed from opt.h)0
-rw-r--r--src/parse.c (renamed from parse.c)0
-rw-r--r--src/parse.h (renamed from parse.h)0
-rw-r--r--src/printf.c (renamed from printf.c)0
-rw-r--r--src/printf.h (renamed from printf.h)0
-rw-r--r--src/pwcache.c (renamed from pwcache.c)0
-rw-r--r--src/pwcache.h (renamed from pwcache.h)0
-rw-r--r--src/stat.c (renamed from stat.c)0
-rw-r--r--src/stat.h (renamed from stat.h)0
-rw-r--r--src/trie.c (renamed from trie.c)0
-rw-r--r--src/trie.h (renamed from trie.h)0
-rw-r--r--src/typo.c (renamed from typo.c)0
-rw-r--r--src/typo.h (renamed from typo.h)0
-rw-r--r--src/util.c (renamed from util.c)0
-rw-r--r--src/util.h (renamed from util.h)0
-rw-r--r--src/xregex.c (renamed from xregex.c)0
-rw-r--r--src/xregex.h (renamed from xregex.h)0
-rw-r--r--src/xspawn.c (renamed from xspawn.c)0
-rw-r--r--src/xspawn.h (renamed from xspawn.h)0
-rw-r--r--src/xtime.c (renamed from xtime.c)0
-rw-r--r--src/xtime.h (renamed from xtime.h)0
-rw-r--r--tests/trie.c2
-rw-r--r--tests/xtimegm.c2
54 files changed, 8 insertions, 5 deletions
diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml
index 70cbcd1..742a3c1 100644
--- a/.github/workflows/codecov.yml
+++ b/.github/workflows/codecov.yml
@@ -25,7 +25,7 @@ jobs:
- name: Generate coverage
run: |
make -j$(nproc) gcov check
- gcov -abcfu *.c tests/*.c
+ gcov -abcfu src/*.c tests/*.c
- uses: codecov/codecov-action@v2
with:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d4244ae..28bfac2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -138,7 +138,7 @@ Hacking
`bfs` is written in [C](https://en.wikipedia.org/wiki/C_(programming_language)), specifically [C11](https://en.wikipedia.org/wiki/C11_(C_standard_revision)).
You can get a feel for the coding style by skimming the source code.
-[`main.c`](/main.c) contains an overview of the rest of source files.
+[`main.c`](src/main.c) contains an overview of the rest of source files.
A quick summary:
- Tabs for indentation, spaces for alignment.
diff --git a/Makefile b/Makefile
index 466dcd1..4ead32c 100644
--- a/Makefile
+++ b/Makefile
@@ -232,7 +232,10 @@ tests/xtimegm: xtime.o tests/xtimegm.o
$(BIN_GOALS):
+$(CC) $(ALL_LDFLAGS) $^ $(ALL_LDLIBS) -o $@
-%.o: %.c .flags
+%.o: src/%.c .flags
+ $(CC) $(ALL_CFLAGS) -c $< -o $@
+
+tests/%.o: tests/%.c .flags
$(CC) $(ALL_CFLAGS) -c $< -o $@
# Need a rule for .flags to convince make to apply the above pattern rule if
diff --git a/bar.c b/src/bar.c
index b0e595e..b0e595e 100644
--- a/bar.c
+++ b/src/bar.c
diff --git a/bar.h b/src/bar.h
index 3e509d6..3e509d6 100644
--- a/bar.h
+++ b/src/bar.h
diff --git a/bfs.h b/src/bfs.h
index 93d8d79..93d8d79 100644
--- a/bfs.h
+++ b/src/bfs.h
diff --git a/bftw.c b/src/bftw.c
index 6f97bf6..6f97bf6 100644
--- a/bftw.c
+++ b/src/bftw.c
diff --git a/bftw.h b/src/bftw.h
index c458e1b..c458e1b 100644
--- a/bftw.h
+++ b/src/bftw.h
diff --git a/color.c b/src/color.c
index 9e267da..9e267da 100644
--- a/color.c
+++ b/src/color.c
diff --git a/color.h b/src/color.h
index edf1ef7..edf1ef7 100644
--- a/color.h
+++ b/src/color.h
diff --git a/ctx.c b/src/ctx.c
index 8ba2f38..8ba2f38 100644
--- a/ctx.c
+++ b/src/ctx.c
diff --git a/ctx.h b/src/ctx.h
index 3ad7f85..3ad7f85 100644
--- a/ctx.h
+++ b/src/ctx.h
diff --git a/darray.c b/src/darray.c
index 6585d30..6585d30 100644
--- a/darray.c
+++ b/src/darray.c
diff --git a/darray.h b/src/darray.h
index 4464381..4464381 100644
--- a/darray.h
+++ b/src/darray.h
diff --git a/diag.c b/src/diag.c
index 27848f1..27848f1 100644
--- a/diag.c
+++ b/src/diag.c
diff --git a/diag.h b/src/diag.h
index 39129cc..39129cc 100644
--- a/diag.h
+++ b/src/diag.h
diff --git a/dir.c b/src/dir.c
index 024e767..024e767 100644
--- a/dir.c
+++ b/src/dir.c
diff --git a/dir.h b/src/dir.h
index 69344c6..69344c6 100644
--- a/dir.h
+++ b/src/dir.h
diff --git a/dstring.c b/src/dstring.c
index f344d09..f344d09 100644
--- a/dstring.c
+++ b/src/dstring.c
diff --git a/dstring.h b/src/dstring.h
index 54106f3..54106f3 100644
--- a/dstring.h
+++ b/src/dstring.h
diff --git a/eval.c b/src/eval.c
index 1d0a6f2..1d0a6f2 100644
--- a/eval.c
+++ b/src/eval.c
diff --git a/eval.h b/src/eval.h
index a1bbd2f..a1bbd2f 100644
--- a/eval.h
+++ b/src/eval.h
diff --git a/exec.c b/src/exec.c
index 0130317..0130317 100644
--- a/exec.c
+++ b/src/exec.c
diff --git a/exec.h b/src/exec.h
index a3e3c71..a3e3c71 100644
--- a/exec.h
+++ b/src/exec.h
diff --git a/expr.h b/src/expr.h
index 1f1ece6..1f1ece6 100644
--- a/expr.h
+++ b/src/expr.h
diff --git a/fsade.c b/src/fsade.c
index 1444cf4..1444cf4 100644
--- a/fsade.c
+++ b/src/fsade.c
diff --git a/fsade.h b/src/fsade.h
index e964112..e964112 100644
--- a/fsade.h
+++ b/src/fsade.h
diff --git a/main.c b/src/main.c
index 9dc96e4..9dc96e4 100644
--- a/main.c
+++ b/src/main.c
diff --git a/mtab.c b/src/mtab.c
index adc3f58..adc3f58 100644
--- a/mtab.c
+++ b/src/mtab.c
diff --git a/mtab.h b/src/mtab.h
index 807539d..807539d 100644
--- a/mtab.h
+++ b/src/mtab.h
diff --git a/opt.c b/src/opt.c
index f8c0ba3..f8c0ba3 100644
--- a/opt.c
+++ b/src/opt.c
diff --git a/opt.h b/src/opt.h
index 5f8180d..5f8180d 100644
--- a/opt.h
+++ b/src/opt.h
diff --git a/parse.c b/src/parse.c
index 65087a0..65087a0 100644
--- a/parse.c
+++ b/src/parse.c
diff --git a/parse.h b/src/parse.h
index 7e29a03..7e29a03 100644
--- a/parse.h
+++ b/src/parse.h
diff --git a/printf.c b/src/printf.c
index 8fdde41..8fdde41 100644
--- a/printf.c
+++ b/src/printf.c
diff --git a/printf.h b/src/printf.h
index a8c5f2a..a8c5f2a 100644
--- a/printf.h
+++ b/src/printf.h
diff --git a/pwcache.c b/src/pwcache.c
index 91435bd..91435bd 100644
--- a/pwcache.c
+++ b/src/pwcache.c
diff --git a/pwcache.h b/src/pwcache.h
index f1a1db3..f1a1db3 100644
--- a/pwcache.h
+++ b/src/pwcache.h
diff --git a/stat.c b/src/stat.c
index 47e60b6..47e60b6 100644
--- a/stat.c
+++ b/src/stat.c
diff --git a/stat.h b/src/stat.h
index 55c75e9..55c75e9 100644
--- a/stat.h
+++ b/src/stat.h
diff --git a/trie.c b/src/trie.c
index bae9acb..bae9acb 100644
--- a/trie.c
+++ b/src/trie.c
diff --git a/trie.h b/src/trie.h
index 2d29ac7..2d29ac7 100644
--- a/trie.h
+++ b/src/trie.h
diff --git a/typo.c b/src/typo.c
index 4012730..4012730 100644
--- a/typo.c
+++ b/src/typo.c
diff --git a/typo.h b/src/typo.h
index 0347aae..0347aae 100644
--- a/typo.h
+++ b/src/typo.h
diff --git a/util.c b/src/util.c
index a62e66c..a62e66c 100644
--- a/util.c
+++ b/src/util.c
diff --git a/util.h b/src/util.h
index b5c7d80..b5c7d80 100644
--- a/util.h
+++ b/src/util.h
diff --git a/xregex.c b/src/xregex.c
index 3c3cf35..3c3cf35 100644
--- a/xregex.c
+++ b/src/xregex.c
diff --git a/xregex.h b/src/xregex.h
index b2f56a5..b2f56a5 100644
--- a/xregex.h
+++ b/src/xregex.h
diff --git a/xspawn.c b/src/xspawn.c
index 93c270a..93c270a 100644
--- a/xspawn.c
+++ b/src/xspawn.c
diff --git a/xspawn.h b/src/xspawn.h
index cd6a42e..cd6a42e 100644
--- a/xspawn.h
+++ b/src/xspawn.h
diff --git a/xtime.c b/src/xtime.c
index 8ca963b..8ca963b 100644
--- a/xtime.c
+++ b/src/xtime.c
diff --git a/xtime.h b/src/xtime.h
index ceff48f..ceff48f 100644
--- a/xtime.h
+++ b/src/xtime.h
diff --git a/tests/trie.c b/tests/trie.c
index 4326196..0158fd8 100644
--- a/tests/trie.c
+++ b/tests/trie.c
@@ -16,7 +16,7 @@
#undef NDEBUG
-#include "../trie.h"
+#include "../src/trie.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
diff --git a/tests/xtimegm.c b/tests/xtimegm.c
index f4e28ee..d774b9e 100644
--- a/tests/xtimegm.c
+++ b/tests/xtimegm.c
@@ -14,7 +14,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *
****************************************************************************/
-#include "../xtime.h"
+#include "../src/xtime.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>