builtin/apply: move 'patch_input_file' global into 'struct apply_state'
To libify the apply functionality the 'patch_input_file' variable should
not be static and global to the file. Let's move it into
'struct apply_state'.
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Christian Couder9 years agocommitted byJunio C Hamano
@ -1539,15 +1543,18 @@ static void record_ws_error(unsigned result, const char *line, int len, int line
@@ -1539,15 +1543,18 @@ static void record_ws_error(unsigned result, const char *line, int len, int line
err = whitespace_error_string(result);
fprintf(stderr, "%s:%d: %s.\n%.*s\n",
patch_input_file, linenr, err, len, line);
state->patch_input_file, linenr, err, len, line);
free(err);
}
static void check_whitespace(const char *line, int len, unsigned ws_rule)