summaryrefslogtreecommitdiffstats
path: root/bfs.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-06-08 23:26:48 -0400
committerTavian Barnes <tavianator@tavianator.com>2016-06-08 23:26:48 -0400
commitfcd08ee02a660e7c3013b073e7122be5094e8d47 (patch)
tree915bb5c2e1d0ed34d1a45c091f3b8f8972413653 /bfs.h
parent593e2135a98b66999f3143c70dd5169701972906 (diff)
downloadbfs-fcd08ee02a660e7c3013b073e7122be5094e8d47.tar.xz
Implement -fprint and -fprint0.
Diffstat (limited to 'bfs.h')
-rw-r--r--bfs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/bfs.h b/bfs.h
index f6f120d..a6c7264 100644
--- a/bfs.h
+++ b/bfs.h
@@ -15,6 +15,7 @@
#include "color.h"
#include <stdbool.h>
#include <stddef.h>
+#include <stdio.h>
#include <sys/types.h>
#include <time.h>
@@ -91,6 +92,9 @@ struct cmdline {
/** The command line expression. */
struct expr *expr;
+
+ /** The number of open files used by the expression tree. */
+ int nopen_files;
};
/**
@@ -192,6 +196,9 @@ struct expr {
/** Optional inode number for a target file. */
ino_t ino;
+ /** File to output to. */
+ FILE *file;
+
/** Optional -exec flags. */
enum execflags execflags;
@@ -247,6 +254,7 @@ bool eval_delete(const struct expr *expr, struct eval_state *state);
bool eval_exec(const struct expr *expr, struct eval_state *state);
bool eval_nohidden(const struct expr *expr, struct eval_state *state);
bool eval_print(const struct expr *expr, struct eval_state *state);
+bool eval_fprint(const struct expr *expr, struct eval_state *state);
bool eval_print0(const struct expr *expr, struct eval_state *state);
bool eval_prune(const struct expr *expr, struct eval_state *state);
bool eval_quit(const struct expr *expr, struct eval_state *state);