関数 | |
int | wildmatch (const char *pattern, const char *text) |
int | iwildmatch (const char *pattern, const char *text) |
int | wildmatch_array (const char *pattern, const char *const *texts, int where) |
int | litmatch_array (const char *string, const char *const *texts, int where) |
int wildmatch | ( | const char * | pattern, | |
const char * | text | |||
) |
wildmatch.c の 288 行で定義されています。
参照先 dowild()・wildmatch_iteration_count.
参照元 auth_server()・match_hostname()・run_test()・set_refuse_options().
00289 { 00290 static const uchar *nomore[1]; /* A NULL pointer. */ 00291 #ifdef WILD_TEST_ITERATIONS 00292 wildmatch_iteration_count = 0; 00293 #endif 00294 return dowild((const uchar*)pattern, (const uchar*)text, nomore) == TRUE; 00295 }
int iwildmatch | ( | const char * | pattern, | |
const char * | text | |||
) |
wildmatch.c の 298 行で定義されています。
参照先 dowild()・force_lower_case・wildmatch_iteration_count.
参照元 set_compression().
00299 { 00300 static const uchar *nomore[1]; /* A NULL pointer. */ 00301 int ret; 00302 #ifdef WILD_TEST_ITERATIONS 00303 wildmatch_iteration_count = 0; 00304 #endif 00305 force_lower_case = 1; 00306 ret = dowild((const uchar*)pattern, (const uchar*)text, nomore) == TRUE; 00307 force_lower_case = 0; 00308 return ret; 00309 }
int wildmatch_array | ( | const char * | pattern, | |
const char *const * | texts, | |||
int | where | |||
) |
wildmatch.c の 316 行で定義されています。
参照先 dowild()・trailing_N_elements()・wildmatch_iteration_count.
参照元 rule_matches()・run_test().
00317 { 00318 const uchar *p = (const uchar*)pattern; 00319 const uchar*const *a = (const uchar*const*)texts; 00320 const uchar *text; 00321 int matched; 00322 00323 #ifdef WILD_TEST_ITERATIONS 00324 wildmatch_iteration_count = 0; 00325 #endif 00326 00327 if (where > 0) 00328 text = trailing_N_elements(&a, where); 00329 else 00330 text = *a++; 00331 if (!text) 00332 return FALSE; 00333 00334 if ((matched = dowild(p, text, a)) != TRUE && where < 0 00335 && matched != ABORT_ALL) { 00336 while (1) { 00337 if (*text == '\0') { 00338 if ((text = (uchar*)*a++) == NULL) 00339 return FALSE; 00340 continue; 00341 } 00342 if (*text++ == '/' && (matched = dowild(p, text, a)) != FALSE 00343 && matched != ABORT_TO_STARSTAR) 00344 break; 00345 } 00346 } 00347 return matched == TRUE; 00348 }
int litmatch_array | ( | const char * | string, | |
const char *const * | texts, | |||
int | where | |||
) |
wildmatch.c の 354 行で定義されています。
参照先 doliteral()・trailing_N_elements().
参照元 rule_matches().
00355 { 00356 const uchar *s = (const uchar*)string; 00357 const uchar*const *a = (const uchar* const*)texts; 00358 const uchar *text; 00359 00360 if (where > 0) 00361 text = trailing_N_elements(&a, where); 00362 else 00363 text = *a++; 00364 if (!text) 00365 return FALSE; 00366 00367 return doliteral(s, text, a) == TRUE; 00368 }