Match literal string "s" against the a virtually-joined string consisting * of all the pointers in array "texts" (which has a NULL pointer at the * end). The int "where" can be 0 (normal matching), or > 0 (match * only the trailing N slash-separated filename components of "texts"). */
| 352 | * end). The int "where" can be 0 (normal matching), or > 0 (match |
| 353 | * only the trailing N slash-separated filename components of "texts"). */ |
| 354 | int litmatch_array(const char *string, const char*const *texts, int where) |
| 355 | { |
| 356 | const uchar *s = (const uchar*)string; |
| 357 | const uchar*const *a = (const uchar* const*)texts; |
| 358 | const uchar *text; |
| 359 | |
| 360 | if (where > 0) |
| 361 | text = trailing_N_elements(&a, where); |
| 362 | else |
| 363 | text = *a++; |
| 364 | if (!text) |
| 365 | return FALSE; |
| 366 | |
| 367 | return doliteral(s, text, a) == TRUE; |
| 368 | } |
no test coverage detected