summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-06-26 22:35:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-06-27 01:13:50 (GMT)
commit8f8841e9c8e6a26153b0cf9417c7540cf65ef09f (patch)
treeae7ad9eae079372793dd39b7544105f64aba95f7 /cache.h
parent5ff10dd602f5926f0f5a73ae7de5866713428aa7 (diff)
downloadgit-8f8841e9c8e6a26153b0cf9417c7540cf65ef09f.zip
git-8f8841e9c8e6a26153b0cf9417c7540cf65ef09f.tar.gz
git-8f8841e9c8e6a26153b0cf9417c7540cf65ef09f.tar.bz2
check_and_emit_line(): rename and refactor
The function name was too bland and not explicit enough as to what it is checking. Split it into two, and call the one that checks if there is a whitespace breakage "ws_check()", and call the other one that checks and emits the line after color coding "ws_check_emit()". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/cache.h b/cache.h
index 64ef86e..3dfa53c 100644
--- a/cache.h
+++ b/cache.h
@@ -819,9 +819,8 @@ void shift_tree(const unsigned char *, const unsigned char *, unsigned char *, i
extern unsigned whitespace_rule_cfg;
extern unsigned whitespace_rule(const char *);
extern unsigned parse_whitespace_rule(const char *);
-extern unsigned check_and_emit_line(const char *line, int len, unsigned ws_rule,
- FILE *stream, const char *set,
- const char *reset, const char *ws);
+extern unsigned ws_check(const char *line, int len, unsigned ws_rule);
+extern void ws_check_emit(const char *line, int len, unsigned ws_rule, FILE *stream, const char *set, const char *reset, const char *ws);
extern char *whitespace_error_string(unsigned ws);
extern int ws_fix_copy(char *, const char *, int, unsigned, int *);