As far as I have seen, this code should work:
#define WHITESPACE " \t"
int isname(const char *str, const char *namelist)
{
char *newlist;
char *curtok;
newlist = strdup(namelist); /* make a copy since strtok 'modifies'
strings */
for(curtok = strtok(newlist, WHITESPACE); curtok; curtok = strtok(NULL,
WHITESPACE))
if(curtok && is_abbrev(str, curtok))
{
free(newlist);
return 1;
}
free(newlist);
return 0;
}
I think your problem was you changed is_abbrev to is_apart possibly a typo
on
your part. But the above code should be compatible with every version past
bpl15
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.365 / Virus Database: 202 - Release Date: 05/24/2002
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
| Newbie List: http://groups.yahoo.com/group/circle-newbies/ |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT