From 59556548230e617b837343c2c07e357e688e2ca4 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Sat, 30 Nov 2013 21:55:40 +0100 Subject: replace {pre,suf}fixcmp() with {starts,ends}_with() Leaving only the function definitions and declarations so that any new topic in flight can still make use of the old functions, replace existing uses of the prefixcmp() and suffixcmp() with new API functions. The change can be recreated by mechanically applying this: $ git grep -l -e prefixcmp -e suffixcmp -- \*.c | grep -v strbuf\\.c | xargs perl -pi -e ' s|!prefixcmp\(|starts_with\(|g; s|prefixcmp\(|!starts_with\(|g; s|!suffixcmp\(|ends_with\(|g; s|suffixcmp\(|!ends_with\(|g; ' on the result of preparatory changes in this series. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pager.c') diff --git a/pager.c b/pager.c index fa19765eb..345b0bc4b 100644 --- a/pager.c +++ b/pager.c @@ -151,7 +151,7 @@ int decimal_width(int number) static int pager_command_config(const char *var, const char *value, void *data) { struct pager_config *c = data; - if (!prefixcmp(var, "pager.") && !strcmp(var + 6, c->cmd)) { + if (starts_with(var, "pager.") && !strcmp(var + 6, c->cmd)) { int b = git_config_maybe_bool(var, value); if (b >= 0) c->want = b; -- cgit v1.2.1