Lines Matching refs:pattern

40   struct URLPattern *pat = &glob->pattern[glob->size];  in glob_fixed()
98 char *pattern = *patternp; in glob_set() local
99 char *opattern = pattern; in glob_set()
102 pat = &glob->pattern[glob->size]; in glob_set()
111 switch(*pattern) { in glob_set()
120 if(opattern == pattern) in glob_set()
153 if(*pattern == '}') { in glob_set()
154 pattern++; /* pass the closing brace */ in glob_set()
160 ++pattern; in glob_set()
168 if(pattern[1]) { in glob_set()
169 ++pattern; in glob_set()
174 *buf++ = *pattern++; /* copy character to set element */ in glob_set()
179 *patternp = pattern; /* return with the new position */ in glob_set()
195 char *pattern = *patternp; in glob_range() local
198 pat = &glob->pattern[glob->size]; in glob_range()
201 if(ISALPHA(*pattern)) { in glob_range()
210 rc = sscanf(pattern, "%c-%c%c", &min_c, &max_c, &end_c); in glob_range()
216 step = strtoul(&pattern[4], &endp, 10); in glob_range()
217 if(errno || &pattern[4] == endp || *endp != ']') in glob_range()
220 pattern = endp + 1; in glob_range()
227 pattern += 4; in glob_range()
230 *posp += (pattern - *patternp); in glob_range()
249 else if(ISDIGIT(*pattern)) { in glob_range()
259 if(*pattern == '0') { in glob_range()
261 c = pattern; in glob_range()
270 min_n = strtoul(pattern, &endp, 10); in glob_range()
271 if(errno || (endp == pattern)) in glob_range()
277 pattern = endp + 1; in glob_range()
278 while(*pattern && ISBLANK(*pattern)) in glob_range()
279 pattern++; in glob_range()
280 if(!ISDIGIT(*pattern)) { in glob_range()
285 max_n = strtoul(pattern, &endp, 10); in glob_range()
290 pattern = endp + 1; in glob_range()
292 step_n = strtoul(pattern, &endp, 10); in glob_range()
300 pattern = endp + 1; in glob_range()
308 *posp += (pattern - *patternp); in glob_range()
330 *patternp = pattern; in glob_range()
371 static CURLcode glob_parse(struct URLGlob *glob, char *pattern, in glob_parse() argument
382 while(*pattern && !res) { in glob_parse()
385 while(*pattern && *pattern != '{') { in glob_parse()
386 if(*pattern == '[') { in glob_parse()
389 if(!peek_ipv6(pattern, &skip) && (pattern[1] == ']')) in glob_parse()
392 memcpy(buf, pattern, skip); in glob_parse()
394 pattern += skip; in glob_parse()
400 if(*pattern == '}' || *pattern == ']') in glob_parse()
405 if(*pattern == '\\' && in glob_parse()
406 (*(pattern + 1) == '{' || *(pattern + 1) == '[' || in glob_parse()
407 *(pattern + 1) == '}' || *(pattern + 1) == ']') ) { in glob_parse()
410 ++pattern; in glob_parse()
413 *buf++ = *pattern++; /* copy character to literal */ in glob_parse()
423 switch(*pattern) { in glob_parse()
429 pattern++; in glob_parse()
431 res = glob_set(glob, &pattern, &pos, amount, globindex++); in glob_parse()
436 pattern++; in glob_parse()
438 res = glob_range(glob, &pattern, &pos, amount, globindex++); in glob_parse()
515 if((glob->pattern[i].type == UPTSet) && in glob_cleanup()
516 (glob->pattern[i].content.Set.elements)) { in glob_cleanup()
517 for(elem = glob->pattern[i].content.Set.size - 1; in glob_cleanup()
520 Curl_safefree(glob->pattern[i].content.Set.elements[elem]); in glob_cleanup()
522 Curl_safefree(glob->pattern[i].content.Set.elements); in glob_cleanup()
549 pat = &glob->pattern[glob->size - 1 - i]; in glob_next_url()
585 pat = &glob->pattern[i]; in glob_next_url()
651 if(glob->pattern[i].globindex == (int)num) { in glob_match_url()
652 pat = &glob->pattern[i]; in glob_match_url()