summaryrefslogtreecommitdiffstats
path: root/cmdline.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-03-31 17:36:30 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-05-28 20:49:54 -0400
commit1cc323eb88242bc7be7177ba4cb037a58c754763 (patch)
treee5d88f0a88ebb0305482f98fbdcfdad518157b76 /cmdline.h
parent97ad2f4786b39cb4bf2189350efba4bce42ab6ea (diff)
downloadbfs-1cc323eb88242bc7be7177ba4cb037a58c754763.tar.xz
bftw: Visit multiple roots breadth-first
This makes `bfs a b` treat `a` and `b` as siblings.
Diffstat (limited to 'cmdline.h')
-rw-r--r--cmdline.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/cmdline.h b/cmdline.h
index bb36a8d..e1811fd 100644
--- a/cmdline.h
+++ b/cmdline.h
@@ -47,24 +47,16 @@ 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 unparsed command line arguments. */
char **argv;
- /** The list of root paths. */
- struct root *roots;
+ /** The root paths. */
+ const char **paths;
+ /** The number of root paths. */
+ size_t npaths;
/** Color data. */
struct colors *colors;