Logo Search packages:      
Sourcecode: madman version File versions  Download package

void apefrm_remove_real ( apetag mem_cnt,
char *  name 
)

remove frame from memory

(real) remove frame from ape_mem. Check apefrm_remove for more info

Parameters:
mem_cnt object apetag
name frame name for search and remove

Definition at line 436 of file apetaglib.c.

References APE_TAG_LIB_DEL_ALL, _ape_mem_cnt::countTag, and _ape_mem_cnt::tag.

{
    int n;
    struct tag **mTag;
    
    mTag = (mem_cnt->tag);
    
    /* Delete all */
    if (strcmp (name, APE_TAG_LIB_DEL_ALL) == 0) {
        for (n = mem_cnt->countTag-1; n >= 0; n--) { 
            free (mTag[n]->name);
            free (mTag[n]->value);
            free (mTag[n]);
            --mem_cnt->countTag;
        }
        return;
    }
    /* Delete only one */
    for (n = mem_cnt->countTag-1; n >= 0; n--) {
        if (strcasecmp (mTag[n]->name, name) == 0) {
            free (mTag[n]->name);
            free (mTag[n]->value);
            free (mTag[n]);
            mTag[n] = mTag[mem_cnt->countTag];
            --mem_cnt->countTag;
            /* !no return; search for all */
        }
    }
    
    return;
}


Generated by  Doxygen 1.6.0   Back to index