summaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorPhilip Kelley <phkelley@hotmail.com>2012-09-17 15:42:41 -0400
committerPhilip Kelley <phkelley@hotmail.com>2012-09-17 15:42:41 -0400
commitec40b7f99f7f7161b0a1b24f1d8a934ec0eaacb1 (patch)
tree59744c10038258c3993a4eb1b1dfc3896c35b97a /src/util.h
parente8776d30f7edb570f435cf746d712c696b862bdd (diff)
downloadlibgit2-ec40b7f99f7f7161b0a1b24f1d8a934ec0eaacb1.tar.gz
Support for core.ignorecase
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 905fc927f..4f83d3bc1 100644
--- a/src/util.h
+++ b/src/util.h
@@ -70,7 +70,14 @@ GIT_INLINE(void *) git__realloc(void *ptr, size_t size)
#define git__free(ptr) free(ptr)
+#define STRCMP_CASESELECT(IGNORE_CASE, STR1, STR2) \
+ ((IGNORE_CASE) ? strcasecmp((STR1), (STR2)) : strcmp((STR1), (STR2)))
+
+#define CASESELECT(IGNORE_CASE, ICASE, CASE) \
+ ((IGNORE_CASE) ? (ICASE) : (CASE))
+
extern int git__prefixcmp(const char *str, const char *prefix);
+extern int git__prefixcmp_icase(const char *str, const char *prefix);
extern int git__suffixcmp(const char *str, const char *suffix);
extern int git__strtol32(int32_t *n, const char *buff, const char **end_buf, int base);