Lines Matching refs:ptr
47 for (; path_pieces->ptr; ++path_pieces) free(path_pieces->ptr); in mod_evhost_free_path_pieces()
73 for (; bptr->ptr; ++bptr) free(bptr->ptr); in mod_evhost_parse_pattern_err()
77 static buffer * mod_evhost_parse_pattern(const char *ptr) { in mod_evhost_parse_pattern() argument
84 for(pos=ptr;*ptr;ptr++) { in mod_evhost_parse_pattern()
85 if(*ptr == '%') { in mod_evhost_parse_pattern()
91 if (ptr[1] == '%' || ptr[1] == '_' || light_isdigit(ptr[1])) { in mod_evhost_parse_pattern()
93 } else if (ptr[1] == '{') { in mod_evhost_parse_pattern()
94 if (!light_isdigit(ptr[2])) in mod_evhost_parse_pattern()
96 if (ptr[3] == '.') { in mod_evhost_parse_pattern()
97 if (!light_isdigit(ptr[4])) in mod_evhost_parse_pattern()
99 if (ptr[5] != '}') in mod_evhost_parse_pattern()
102 } else if (ptr[3] == '}') { in mod_evhost_parse_pattern()
111 buffer_copy_string_len(bptr+used, pos, ptr-pos); in mod_evhost_parse_pattern()
112 pos = ptr + len; in mod_evhost_parse_pattern()
114 buffer_copy_string_len(bptr+used+1, ptr, len); in mod_evhost_parse_pattern()
115 ptr += len - 1; /*(ptr++ in for() loop)*/ in mod_evhost_parse_pattern()
124 buffer_copy_string_len(bptr+used, pos, ptr-pos); in mod_evhost_parse_pattern()
180 const char * const ptr = cpv->v.b->ptr; in SETDEFAULTS_FUNC() local
181 cpv->v.v = mod_evhost_parse_pattern(ptr); in SETDEFAULTS_FUNC()
184 "invalid evhost.path-pattern: %s", ptr); in SETDEFAULTS_FUNC()
216 char *ptr = authority->ptr + buffer_clen(authority); in mod_evhost_parse_host() local
217 char *colon = ptr; /* needed to filter out the colon (if exists) */ in mod_evhost_parse_host()
223 if (*authority->ptr == '[') { /* authority is IPv6 literal address */ in mod_evhost_parse_host()
224 colon = ptr; in mod_evhost_parse_host()
225 if (ptr[-1] != ']') { in mod_evhost_parse_host()
226 do { --ptr; } while (ptr > authority->ptr && ptr[-1] != ']'); in mod_evhost_parse_host()
227 if (*ptr != ':') return; /*(should not happen for valid authority)*/ in mod_evhost_parse_host()
228 colon = ptr; in mod_evhost_parse_host()
230 ptr = authority->ptr; in mod_evhost_parse_host()
231 array_set_key_value(host,CONST_STR_LEN("%0"),ptr,colon-ptr); in mod_evhost_parse_host()
236 for(; ptr > authority->ptr; --ptr) { in mod_evhost_parse_host()
237 if(*ptr == '.') { in mod_evhost_parse_host()
240 } else if(*ptr == ':') { in mod_evhost_parse_host()
241 colon = ptr; in mod_evhost_parse_host()
247 if (*ptr == '.') ptr++; in mod_evhost_parse_host()
248 array_set_key_value(host, CONST_STR_LEN("%0"), ptr, colon-ptr); in mod_evhost_parse_host()
252 if (colon != authority->ptr) { in mod_evhost_parse_host()
253 for(ptr = colon - 1, i = 1; ptr > authority->ptr; --ptr) { in mod_evhost_parse_host()
254 if(*ptr == '.') { in mod_evhost_parse_host()
255 if (ptr != colon - 1) { in mod_evhost_parse_host()
260 array_set_key_value(host, BUF_PTR_LEN(key), ptr+1, colon-ptr-1); in mod_evhost_parse_host()
262 colon = ptr; in mod_evhost_parse_host()
267 if (colon != ptr) { in mod_evhost_parse_host()
271 array_set_key_value(host, BUF_PTR_LEN(key), ptr, colon-ptr); in mod_evhost_parse_host()
281 for (const char *ptr; (ptr = path_pieces->ptr); ++path_pieces) { in mod_evhost_build_doc_root_path() local
282 if (*ptr == '%') { in mod_evhost_build_doc_root_path()
285 if (*(ptr+1) == '%') { in mod_evhost_build_doc_root_path()
288 } else if (*(ptr+1) == '_' ) { in mod_evhost_build_doc_root_path()
290 char *colon = strchr(authority->ptr, ':'); in mod_evhost_build_doc_root_path()
296 buffer_append_string_len(b, authority->ptr, colon - authority->ptr); /* adds fqdn */ in mod_evhost_build_doc_root_path()
298 } else if (ptr[1] == '{' ) { in mod_evhost_build_doc_root_path()
300 …s[1] = ptr[2]; /*(assumes single digit before '.', and, optionally, '.' and single digit after '.'… in mod_evhost_build_doc_root_path()
302 if (ptr[3] != '.' || ptr[4] == '0') { in mod_evhost_build_doc_root_path()
305 if ((size_t)(ptr[4]-'0') <= buffer_clen(&ds->value)) { in mod_evhost_build_doc_root_path()
306 buffer_append_char(b, ds->value.ptr[(ptr[4]-'0')-1]); in mod_evhost_build_doc_root_path()
340 log_perror(r->conf.errh, __FILE__, __LINE__, "%s", b->ptr); in mod_evhost_uri_handler()