diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-06-08 23:26:48 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-06-08 23:26:48 -0400 |
commit | fcd08ee02a660e7c3013b073e7122be5094e8d47 (patch) | |
tree | 915bb5c2e1d0ed34d1a45c091f3b8f8972413653 /bfs.h | |
parent | 593e2135a98b66999f3143c70dd5169701972906 (diff) | |
download | bfs-fcd08ee02a660e7c3013b073e7122be5094e8d47.tar.xz |
Implement -fprint and -fprint0.
Diffstat (limited to 'bfs.h')
-rw-r--r-- | bfs.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |