util.h: define an enum for normcase specs
These will be used in upcoming patches to efficiently create a dirstate
foldmap.
--- a/mercurial/encoding.py Thu Apr 02 19:13:50 2015 -0700
+++ b/mercurial/encoding.py Thu Apr 02 19:17:32 2015 -0700
@@ -364,7 +364,9 @@
lower: normcase lowercases ASCII strings
upper: normcase uppercases ASCII strings
- other: the fallback function should always be called'''
+ other: the fallback function should always be called
+
+ This should be kept in sync with normcase_spec in util.h.'''
lower = -1
upper = 1
other = 0
--- a/mercurial/util.h Thu Apr 02 19:13:50 2015 -0700
+++ b/mercurial/util.h Thu Apr 02 19:17:32 2015 -0700
@@ -209,6 +209,13 @@
return ret;
}
+/* This should be kept in sync with normcasespecs in encoding.py. */
+enum normcase_spec {
+ NORMCASE_LOWER = -1,
+ NORMCASE_UPPER = 1,
+ NORMCASE_OTHER = 0
+};
+
#define MIN(a, b) (((a)<(b))?(a):(b))
/* VC9 doesn't include bool and lacks stdbool.h based on my searching */
#ifdef _MSC_VER