예제 #1
0
파일: files_lib.c 프로젝트: rcorrieri/core
void PurgeItemList(Item **list, char *name)
{
    Item *ip, *copy = NULL;
    struct stat sb;

    CopyList(&copy, *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);
}
예제 #2
0
파일: alphalist.c 프로젝트: fbettag/core
void DeleteFromAlphaList(AlphaList *al, const char *string)
{
    DeleteItemLiteral(&al->list[(int) *string], string);
}