From 1cc323eb88242bc7be7177ba4cb037a58c754763 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 31 Mar 2019 17:36:30 -0400 Subject: bftw: Visit multiple roots breadth-first This makes `bfs a b` treat `a` and `b` as siblings. --- cmdline.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'cmdline.h') diff --git a/cmdline.h b/cmdline.h index bb36a8d..e1811fd 100644 --- a/cmdline.h +++ b/cmdline.h @@ -46,16 +46,6 @@ enum debug_flags { DEBUG_ALL = (1 << 7) - 1, }; -/** - * 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. */ @@ -63,8 +53,10 @@ 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; -- cgit v1.2.3