summaryrefslogtreecommitdiffstats
path: root/bfs.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-07-13 19:57:43 -0400
committerTavian Barnes <tavianator@tavianator.com>2016-07-13 19:57:43 -0400
commitd0119ee5efa56c32f956027f58673a6b3da7ac46 (patch)
tree6e326c76853255065a3ae28cfbe5942b4dfb8533 /bfs.h
parent5a4a805a4d460a6996facc5d1fd06986344c899b (diff)
downloadbfs-d0119ee5efa56c32f956027f58673a6b3da7ac46.tar.xz
Use a linked list to store the root paths.
Diffstat (limited to 'bfs.h')
-rw-r--r--bfs.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/bfs.h b/bfs.h
index fc2bcc8..81603e1 100644
--- a/bfs.h
+++ b/bfs.h
@@ -64,13 +64,21 @@ enum debug_flags {
};
/**
+ * A root path to explore.
+ */
+struct root {
+ /** The root path itself. */
+ const char *path;
+ /** The next path in the list. */
+ struct root *next;
+};
+
+/**
* The parsed command line.
*/
struct cmdline {
- /** The array of paths to start from. */
- const char **roots;
- /** The number of root paths. */
- size_t nroots;
+ /** The list of root paths. */
+ struct root *roots;
/** Color data. */
struct colors *colors;