| 1671 | } |
| 1672 | |
| 1673 | int str_comp_filenames(const char *a, const char *b) |
| 1674 | { |
| 1675 | int result; |
| 1676 | |
| 1677 | for(; *a && *b; ++a, ++b) |
| 1678 | { |
| 1679 | if(*a >= '0' && *a <= '9' && *b >= '0' && *b <= '9') |
| 1680 | { |
| 1681 | result = 0; |
| 1682 | do |
| 1683 | { |
| 1684 | if(!result) |
| 1685 | result = *a - *b; |
| 1686 | ++a; ++b; |
| 1687 | } |
| 1688 | while(*a >= '0' && *a <= '9' && *b >= '0' && *b <= '9'); |
| 1689 | |
| 1690 | if(*a >= '0' && *a <= '9') |
| 1691 | return 1; |
| 1692 | else if(*b >= '0' && *b <= '9') |
| 1693 | return -1; |
| 1694 | else if(result) |
| 1695 | return result; |
| 1696 | } |
| 1697 | |
| 1698 | if(tolower(*a) != tolower(*b)) |
| 1699 | break; |
| 1700 | } |
| 1701 | return tolower(*a) - tolower(*b); |
| 1702 | } |
| 1703 | |
| 1704 | const char *str_find_nocase(const char *haystack, const char *needle) |
| 1705 | { |
nothing calls this directly
no outgoing calls
no test coverage detected