rem: dp = (struct directory *)calloc(sizeof (struct directory), 1);
add: dp = (struct directory *)xcalloc(sizeof (struct directory), 1);
context: dochngd(tchar **v){	tchar *cp;	struct directory *dp;#ifdef TRACE	tprintf("TRACE- dochngd()\n");#endif	printd = 0;	if (*++v == NOSTR) {		if ((cp = value(S_home)) == NOSTR || *cp == 0)			bferr("No home directory");		if (chdir_(cp) < 0)			bferr("Can't change to home directory");		cp = savestr(cp);	} else if ((dp = dfind(*v)) != 0) {		printd = 1;		if (chdir_(dp->di_name) < 0)			Perror(dp->di_name);		dcwd->di_prev->di_next = dcwd->di_next;		dcwd->di_next->di_prev = dcwd->di_prev;		goto flushcwd;	} else		cp = dfollow(*v);	dp = (struct directory *)calloc(sizeof (struct directory), 1);	dp->di_name = cp;	dp->di_count = 0;	dp->di_next = dcwd->di_next;	dp->di_prev = dcwd->di_prev;	dp->di_prev->di_next = dp;	dp->di_next->di_prev = dp;flushcwd:	dfree(dcwd);	dnewcwd(dp);}