#include "string/sprintf/xasprintf.h"
#include "string/strchr/stpspn.h"
#include "string/strchr/strrspn.h"
+#include "string/strcmp/strcaseeq.h"
#include "string/strcmp/streq.h"
#include "string/strtok/stpsep.h"
return false;
}
- return (strcasecmp (d->value, "yes") == 0);
+ return strcaseeq(d->value, "yes");
}
#include "prototypes.h"
#include "sizeof.h"
#include "string/strchr/strrspn.h"
+#include "string/strcmp/strcaseeq.h"
#include "string/strcmp/streq.h"
#include "string/strtok/stpsep.h"
* affected by any exceptions.
*/
while (NULL != (tok = strsep(&list, ", \t"))) {
- if (strcasecmp (tok, "EXCEPT") == 0) { /* EXCEPT: invert */
+ if (strcaseeq(tok, "EXCEPT")) { /* EXCEPT: invert */
if (!matched) { /* stop processing: not part of list */
break;
}
} else if ((group = getgrnam (tok)) != NULL) { /* try group membership */
int i;
for (i = 0; NULL != group->gr_mem[i]; i++) {
- if (strcasecmp (string, group->gr_mem[i]) == 0) {
+ if (strcaseeq(string, group->gr_mem[i])) {
return true;
}
}
str_len = strlen (string);
tok_len = strlen (tok);
if ( (str_len > tok_len)
- && (strcasecmp (tok, string + str_len - tok_len) == 0)) {
+ && strcaseeq(tok, string + str_len - tok_len)) {
return true;
}
- } else if (strcasecmp (tok, "LOCAL") == 0) { /* local: no dots */
+ } else if (strcaseeq(tok, "LOCAL")) { /* LOCAL: no dots */
if (strchr (string, '.') == NULL) {
return true;
}
* If the token has the magic value "ALL" the match always succeeds.
* Otherwise, return true if the token fully matches the string.
*/
- if (strcasecmp (tok, "ALL") == 0) { /* all: always matches */
+ if (strcaseeq(tok, "ALL")) { /* ALL: always matches */
return true;
- } else if (strcasecmp (tok, string) == 0) { /* try exact match */
+ } else if (strcaseeq(tok, string)) { /* try exact match */
return true;
}
return false;