Try this function
int EQ(char* ok, char* in)
{
int len;
char *p, *q, *o;
if (in && ok) {
if (in[0]) {
o = malloc(strlen(ok)+1);
strcpy(o,ok);
len = strlen(in)-1;
while (in[len] == ' ') in[len--]='\0';
while (*in == ' ') in++;
p = o;
while (NULL != (q = strchr(p, ','))) {
*q = '\0';
if (!strcmp(p, in)) return 1;
p = q + 1; // why is 'o' changing?
while (*p == ' ') p++;
}
if (!strcmp(p, in))
return 1;
} else {
if (!strcmp(ok, "(kein Participle)"))
return 1; // why it take this return?
}
}
return 0;
}
with the call
EQ("bla, blub, zack", "zack");