win: os_shell_is_cmdexe() + tests

This commit is contained in:
Justin M. Keyes
2017-04-12 01:35:17 +02:00
parent d31d177a0c
commit 7c4e5dfd27
5 changed files with 60 additions and 28 deletions

View File

@@ -495,6 +495,13 @@ bool strequal(const char *a, const char *b)
return (a == NULL && b == NULL) || (a && b && strcmp(a, b) == 0);
}
/// Case-insensitive `strequal`.
bool striequal(const char *a, const char *b)
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
{
return (a == NULL && b == NULL) || (a && b && STRICMP(a, b) == 0);
}
/*
* Avoid repeating the error message many times (they take 1 second each).
* Did_outofmem_msg is reset when a character is read.