diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-03-31 17:36:30 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-05-28 20:49:54 -0400 |
commit | 1cc323eb88242bc7be7177ba4cb037a58c754763 (patch) | |
tree | e5d88f0a88ebb0305482f98fbdcfdad518157b76 /bftw.h | |
parent | 97ad2f4786b39cb4bf2189350efba4bce42ab6ea (diff) | |
download | bfs-1cc323eb88242bc7be7177ba4cb037a58c754763.tar.xz |
bftw: Visit multiple roots breadth-first
This makes `bfs a b` treat `a` and `b` as siblings.
Diffstat (limited to 'bftw.h')
-rw-r--r-- | bftw.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -193,6 +193,10 @@ enum bftw_flags { * Structure for holding the arguments passed to bftw(). */ struct bftw_args { + /** The path(s) to start from. */ + const char **paths; + /** The number of starting paths. */ + size_t npaths; /** The callback to invoke. */ bftw_callback *callback; /** A pointer which is passed to the callback. */ @@ -212,13 +216,11 @@ struct bftw_args { * and invokes a callback for each path it encounters. However, bftw() operates * breadth-first. * - * @param path - * The starting path. * @param args * The arguments that control the walk. * @return * 0 on success, or -1 on failure. */ -int bftw(const char *path, const struct bftw_args *args); +int bftw(const struct bftw_args *args); #endif // BFS_BFTW_H |