patch 9.0.1215: using isalpha() adds dependency on current locale
Problem: Using isalpha() adds dependency on current locale.
Solution: Do not use isalpha() for recognizing a URL or the end of an Ex
command. (closes #11835)
diff --git a/src/misc1.c b/src/misc1.c
index 019bbaf..d369f2a 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2699,11 +2699,11 @@
// non-URL text.
// first character must be alpha
- if (!isalpha(*fname))
+ if (!ASCII_ISALPHA(*fname))
return 0;
// check body: alpha or dash
- for (p = fname + 1; (isalpha(*p) || (*p == '-')); ++p)
+ for (p = fname + 1; (ASCII_ISALPHA(*p) || (*p == '-')); ++p)
;
// check last char is not a dash