Example #1
0
static HashNode
removenameddirnode(HashTable ht, char *nam)
{
    HashNode hn = removehashnode(ht, nam);

    if(hn)
	finddir(NULL);		/* clear the finddir cache */
    return hn;
}
Example #2
0
HashNode
removeshfuncnode(HashTable ht, char *nam)
{
    HashNode hn;

    if ((hn = removehashnode(shfunctab, nam))) {
	if (!strncmp(hn->nam, "TRAP", 4))
	    unsettrap(getsignum(hn->nam + 4));
	return hn;
    } else
	return NULL;
}
Example #3
0
static HashNode
removeshfuncnode(UNUSED(HashTable ht), char *nam)
{
    HashNode hn;
    int signum;

    if (!strncmp(nam, "TRAP", 4) && (signum = getsignum(nam + 4)) != -1)
	hn = removetrap(signum);
    else
	hn = removehashnode(shfunctab, nam);

    return hn;
}
Example #4
0
int
cleanup_(Module m)
{
    HashNode hn = builtintab->getnode(builtintab, "local");
    *(Builtin)hn = save_local;

    removehashnode(reswdtab, "private");

    realparamtab->getnode = getparamnode;
    realparamtab->getnode2 = gethashnode2;
    realparamtab->printnode = printparamnode;

    deletewrapper(m, wrapper);
    return setfeatureenables(m, &module_features, NULL);
}
Example #5
0
void
freehistdata(Histent he, int unlink)
{
    if (!he)
	return;

    if (!(he->flags & (HIST_DUP | HIST_TMPSTORE)))
	removehashnode(histtab, he->text);

    zsfree(he->text);
    if (he->nwords)
	zfree(he->words, he->nwords*2*sizeof(short));

    if (unlink) {
	if (!--histlinect)
	    hist_ring = NULL;
	else {
	    if (he == hist_ring)
		hist_ring = hist_ring->up;
	    he->up->down = he->down;
	    he->down->up = he->up;
	}
    }
}