aboutsummaryrefslogtreecommitdiff
path: root/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'url.c')
-rw-r--r--url.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/url.c b/url.c
index 282b12495a..3ca5987e90 100644
--- a/url.c
+++ b/url.c
@@ -3,6 +3,19 @@
#include "strbuf.h"
#include "url.h"
+int is_rfc3986_unreserved(char ch)
+{
+ return isalnum(ch) ||
+ ch == '-' || ch == '_' || ch == '.' || ch == '~';
+}
+
+int is_casefolding_rfc3986_unreserved(char c)
+{
+ return (c >= 'a' && c <= 'z') ||
+ (c >= '0' && c <= '9') ||
+ c == '-' || c == '.' || c == '_' || c == '~';
+}
+
int is_urlschemechar(int first_flag, int ch)
{
/*