From d0119ee5efa56c32f956027f58673a6b3da7ac46 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 13 Jul 2016 19:57:43 -0400 Subject: Use a linked list to store the root paths. --- bfs.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'bfs.h') diff --git a/bfs.h b/bfs.h index fc2bcc8..81603e1 100644 --- a/bfs.h +++ b/bfs.h @@ -63,14 +63,22 @@ enum debug_flags { DEBUG_TREE = 1 << 3, }; +/** + * 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; -- cgit v1.2.3