summaryrefslogtreecommitdiffstats
path: root/exec.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-09-27 12:55:55 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-09-27 13:23:49 -0400
commit62bbbe1a4165f63b31c68b1595ecb0e67d7af3dc (patch)
treec770ff13f37023cae132108b29077a904e6d4dfb /exec.h
parent3c83bf4e1920be909f65945e56dc8b779c472a59 (diff)
downloadbfs-62bbbe1a4165f63b31c68b1595ecb0e67d7af3dc.tar.xz
Rename struct cmdline to bfs_ctx
The API remains similar, with some added accessor functions for lazy initialization of the pwcache and mtab.
Diffstat (limited to 'exec.h')
-rw-r--r--exec.h17
1 files changed, 9 insertions, 8 deletions
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 <tavianator@tavianator.com> *
+ * Copyright (C) 2017-2020 Tavian Barnes <tavianator@tavianator.com> *
* *
* 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.