ignore_ws_change
};
+enum apply_verbosity {
+ verbosity_silent = -1,
+ verbosity_normal = 0,
+ verbosity_verbose = 1
+};
+
/*
* We need to keep track of how symlinks in the preimage are
* manipulated by the patches. A patch to add a/b/c where a/b
int allow_overlap;
int apply_in_reverse;
int apply_with_reject;
- int apply_verbosely;
int no_add;
int threeway;
int unidiff_zero;
int unsafe_paths;
/* Other non boolean parameters */
+ enum apply_verbosity apply_verbosity;
const char *fake_ancestor;
const char *patch_input_file;
int line_termination;
int applied_after_fixing_ws;
};
-extern int parse_whitespace_option(struct apply_state *state,
- const char *option);
-extern int parse_ignorewhitespace_option(struct apply_state *state,
- const char *option);
+extern int apply_option_parse_exclude(const struct option *opt,
+ const char *arg, int unset);
+extern int apply_option_parse_include(const struct option *opt,
+ const char *arg, int unset);
+extern int apply_option_parse_p(const struct option *opt,
+ const char *arg,
+ int unset);
+extern int apply_option_parse_whitespace(const struct option *opt,
+ const char *arg, int unset);
+extern int apply_option_parse_directory(const struct option *opt,
+ const char *arg, int unset);
+extern int apply_option_parse_space_change(const struct option *opt,
+ const char *arg, int unset);
extern int init_apply_state(struct apply_state *state,
const char *prefix,
struct lock_file *lock_file);
extern void clear_apply_state(struct apply_state *state);
+extern int check_apply_state(struct apply_state *state, int force_apply);
+
+/*
+ * Some aspects of the apply behavior are controlled by the following
+ * bits in the "options" parameter passed to apply_all_patches().
+ */
+#define APPLY_OPT_INACCURATE_EOF (1<<0) /* accept inaccurate eof */
+#define APPLY_OPT_RECOUNT (1<<1) /* accept inaccurate line count */
+
+extern int apply_all_patches(struct apply_state *state,
+ int argc,
+ const char **argv,
+ int options);
#endif