Lines Matching refs:glob
35 glob->error = string, glob->pos = column, code
37 void glob_cleanup(URLGlob* glob);
39 static CURLcode glob_fixed(URLGlob *glob, char *fixed, size_t len) in glob_fixed() argument
41 URLPattern *pat = &glob->pattern[glob->size]; in glob_fixed()
75 static CURLcode glob_set(URLGlob *glob, char **patternp, in glob_set() argument
84 char *buf = glob->glob_buffer; in glob_set()
89 pat = &glob->pattern[glob->size]; in glob_set()
134 strdup(glob->glob_buffer); in glob_set()
145 buf = glob->glob_buffer; in glob_set()
169 static CURLcode glob_range(URLGlob *glob, char **patternp, in glob_range() argument
184 pat = &glob->pattern[glob->size]; in glob_range()
334 static CURLcode glob_parse(URLGlob *glob, char *pattern, in glob_parse() argument
346 char *buf = glob->glob_buffer; in glob_parse()
381 res = glob_fixed(glob, glob->glob_buffer, sublen); in glob_parse()
392 res = glob_set(glob, &pattern, &pos, amount, globindex++); in glob_parse()
399 res = glob_range(glob, &pattern, &pos, amount, globindex++); in glob_parse()
404 if(++glob->size >= GLOB_PATTERN_NUM) in glob_parse()
410 CURLcode glob_url(URLGlob** glob, char* url, unsigned long *urlnum, in glob_url() argument
422 *glob = NULL; in glob_url()
460 *glob = glob_expand; in glob_url()
464 void glob_cleanup(URLGlob* glob) in glob_cleanup() argument
469 for(i = 0; i < glob->size; i++) { in glob_cleanup()
470 if((glob->pattern[i].type == UPTSet) && in glob_cleanup()
471 (glob->pattern[i].content.Set.elements)) { in glob_cleanup()
472 for(elem = glob->pattern[i].content.Set.size - 1; in glob_cleanup()
475 Curl_safefree(glob->pattern[i].content.Set.elements[elem]); in glob_cleanup()
477 Curl_safefree(glob->pattern[i].content.Set.elements); in glob_cleanup()
480 Curl_safefree(glob->glob_buffer); in glob_cleanup()
481 Curl_safefree(glob); in glob_cleanup()
484 CURLcode glob_next_url(char **globbed, URLGlob *glob) in glob_next_url() argument
489 size_t buflen = glob->urllen + 1; in glob_next_url()
490 char *buf = glob->glob_buffer; in glob_next_url()
494 if(!glob->beenhere) in glob_next_url()
495 glob->beenhere = 1; in glob_next_url()
501 for(i = 0; carry && (i < glob->size); i++) { in glob_next_url()
503 pat = &glob->pattern[glob->size - 1 - i]; in glob_next_url()
539 for(i = 0; i < glob->size; ++i) { in glob_next_url()
540 pat = &glob->pattern[i]; in glob_next_url()
568 *globbed = strdup(glob->glob_buffer); in glob_next_url()
575 CURLcode glob_match_url(char **result, char *filename, URLGlob *glob) in glob_match_url() argument
603 if(num < glob->size) { in glob_match_url()
606 for(i=0; i<glob->size; i++) { in glob_match_url()
607 if(glob->pattern[i].globindex == (int)num) { in glob_match_url()
608 pat = &glob->pattern[i]; in glob_match_url()