| 1896 | "loongarch", "loongarch64", NULL}; |
| 1897 | |
| 1898 | static bool platform_token_eq(const char *s, size_t len) { |
| 1899 | for (int i = 0; platform_tokens[i]; i++) { |
| 1900 | const char *t = platform_tokens[i]; |
| 1901 | size_t tl = strlen(t); |
| 1902 | if (tl != len) { |
| 1903 | continue; |
| 1904 | } |
| 1905 | size_t k = 0; |
| 1906 | while (k < len && tolower((unsigned char)s[k]) == t[k]) { |
| 1907 | k++; |
| 1908 | } |
| 1909 | if (k == len) { |
| 1910 | return true; |
| 1911 | } |
| 1912 | } |
| 1913 | return false; |
| 1914 | } |
| 1915 | |
| 1916 | /* Length of `stem` without a trailing `_<token>` / `-<token>` / `.<token>` |
| 1917 | * platform suffix (the longest one), or `len` when it has none. */ |
no outgoing calls
no test coverage detected