MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / wildstrcmp

Function wildstrcmp

tests/checkasm/checkasm.c:853–866  ·  view source on GitHub ↗

Compares a string with a wildcard pattern. */

Source from the content-addressed store, hash-verified

851
852/* Compares a string with a wildcard pattern. */
853static 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 */
869static void check_cpu_flag(const char *name, int flag)

Callers 2

check_cpu_flagFunction · 0.85
checkasm_bench_funcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected