summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-11-22 03:30:06 +0100
committerAdam Borowski <kilobyte@angband.pl>2012-11-22 04:34:29 +0100
commit44b6e7a985c2c5f852a6c9638bdca64259025d8e (patch)
tree83ba28d6144eb81ee574fc0a72892997e6adbaeb /crawl-ref/source/libutil.h
parent064836cfdb99776b23764e3e460af59756e6beef (diff)
downloadcrawl-ref-44b6e7a985c2c5f852a6c9638bdca64259025d8e.tar.gz
crawl-ref-44b6e7a985c2c5f852a6c9638bdca64259025d8e.zip
Fix prompts asking for 'I' in Turkish locales.
They have I<->ı and İ<->i. Fortunately, people are quite unlikely to type capital letters in response to prompts, perhaps save for the stat gain one.
Diffstat (limited to 'crawl-ref/source/libutil.h')
-rw-r--r--crawl-ref/source/libutil.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/libutil.h b/crawl-ref/source/libutil.h
index 6987eedf51..5b810e5c0c 100644
--- a/crawl-ref/source/libutil.h
+++ b/crawl-ref/source/libutil.h
@@ -65,6 +65,11 @@ static inline bool isaalnum(int c)
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9');
}
+static inline ucs_t toalower(ucs_t c)
+{
+ return isaupper(c) ? c + 'a' - 'A' : c;
+}
+
int numcmp(const char *a, const char *b, int limit = 0);
bool numcmpstr(string a, string b);
size_t strlcpy(char *dst, const char *src, size_t n);