void PurgeItemList(Item **list, char *name) { Item *ip, *copy = NULL; struct stat sb; CopyList(©, *list); for (ip = copy; ip != NULL; ip = ip->next) { if (stat(ip->name, &sb) == -1) { Log(LOG_LEVEL_VERBOSE, "Purging file '%s' from '%s' list as it no longer exists", ip->name, name); DeleteItemLiteral(list, ip->name); } } DeleteItemList(copy); }
void DeleteFromAlphaList(AlphaList *al, const char *string) { DeleteItemLiteral(&al->list[(int) *string], string); }