Lines Matching defs:pattern
38 * Match a hostname against a wildcard pattern.
57 static int hostmatch(char *hostname, char *pattern)
67 /* normalize pattern and hostname by stripping off trailing dots */
71 len = strlen(pattern);
72 if(pattern[len-1]=='.')
73 pattern[len-1]=0;
75 pattern_wildcard = strchr(pattern, '*');
77 return Curl_raw_equal(pattern, hostname) ?
88 /* We require at least 2 dots in pattern to avoid too wide wildcard
91 pattern_label_end = strchr(pattern, '.');
94 Curl_raw_nequal(pattern, "xn--", 4)) {
98 return Curl_raw_equal(pattern, hostname) ?
108 of the pattern. */
109 if(hostname_label_end - hostname < pattern_label_end - pattern)
112 prefixlen = pattern_wildcard - pattern;
114 return Curl_raw_nequal(pattern, hostname, prefixlen) &&