From 62bbbe1a4165f63b31c68b1595ecb0e67d7af3dc Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 27 Sep 2020 12:55:55 -0400 Subject: Rename struct cmdline to bfs_ctx The API remains similar, with some added accessor functions for lazy initialization of the pwcache and mtab. --- exec.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'exec.h') diff --git a/exec.h b/exec.h index ab3f59a..2ff0c73 100644 --- a/exec.h +++ b/exec.h @@ -1,6 +1,6 @@ /**************************************************************************** * bfs * - * Copyright (C) 2017 Tavian Barnes * + * Copyright (C) 2017-2020 Tavian Barnes * * * * Permission to use, copy, modify, and/or distribute this software for any * * purpose with or without fee is hereby granted. * @@ -24,7 +24,7 @@ #include "bftw.h" #include "color.h" -struct cmdline; +struct ctx; /** * Flags for the -exec actions. @@ -45,8 +45,8 @@ struct bfs_exec { /** Flags for this exec buffer. */ enum bfs_exec_flags flags; - /** The overall command line. */ - const struct cmdline *cmdline; + /** The bfs context. */ + const struct bfs_ctx *ctx; /** Command line template. */ char **tmpl_argv; /** Command line template size. */ @@ -82,11 +82,12 @@ struct bfs_exec { * The (bfs) command line argument to parse. * @param flags * Any flags for this exec action. - * @param cmdline - * The command line. - * @return The parsed exec action, or NULL on failure. + * @param ctx + * The bfs context. + * @return + * The parsed exec action, or NULL on failure. */ -struct bfs_exec *parse_bfs_exec(char **argv, enum bfs_exec_flags flags, const struct cmdline *cmdline); +struct bfs_exec *parse_bfs_exec(char **argv, enum bfs_exec_flags flags, const struct bfs_ctx *ctx); /** * Execute the command for a file. -- cgit v1.2.3