From fcd08ee02a660e7c3013b073e7122be5094e8d47 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 8 Jun 2016 23:26:48 -0400 Subject: Implement -fprint and -fprint0. --- bfs.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bfs.h') 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 #include +#include #include #include @@ -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); -- cgit v1.2.3