* _substrcmp takes two strings and returns 1 if they do not match, * and 0 if they match exactly or the first string is a sub-string * of the second. A warning is printed to stderr in the case that the * first string is a sub-string of the second. * * This function will be removed in the future through the usual * deprecation process. */
| 823 | * deprecation process. |
| 824 | */ |
| 825 | int |
| 826 | _substrcmp(const char *str1, const char* str2) |
| 827 | { |
| 828 | |
| 829 | if (strncmp(str1, str2, strlen(str1)) != 0) |
| 830 | return 1; |
| 831 | |
| 832 | if (strlen(str1) != strlen(str2)) |
| 833 | warnx("DEPRECATED: '%s' matched '%s' as a sub-string", |
| 834 | str1, str2); |
| 835 | return 0; |
| 836 | } |
| 837 | |
| 838 | /* |
| 839 | * _substrcmp2 takes three strings and returns 1 if the first two do not match, |
no test coverage detected