Compares a string with a wildcard pattern. */
| 851 | |
| 852 | /* Compares a string with a wildcard pattern. */ |
| 853 | static int wildstrcmp(const char *str, const char *pattern) |
| 854 | { |
| 855 | const char *wild = strchr(pattern, '*'); |
| 856 | if (wild) { |
| 857 | const size_t len = wild - pattern; |
| 858 | if (strncmp(str, pattern, len)) return 1; |
| 859 | while (*++wild == '*'); |
| 860 | if (!*wild) return 0; |
| 861 | str += len; |
| 862 | while (*str && wildstrcmp(str, wild)) str++; |
| 863 | return !*str; |
| 864 | } |
| 865 | return strcmp(str, pattern); |
| 866 | } |
| 867 | |
| 868 | /* Perform tests and benchmarks for the specified cpu flag if supported by the host */ |
| 869 | static void check_cpu_flag(const char *name, int flag) |
no outgoing calls
no test coverage detected