mksh/mksh.logging/exec.c
struct tbl *
findfunc(const char *name, uint32_t h, bool create)
{
	struct block *l;
	struct tbl *tp = NULL;

	for (l = e->loc; l; l = l->next) {
		tp = ktsearch(&l->funs, name, h);
		if (tp)
			break;
		if (!l->next && create) {
			tp = ktenter(&l->funs, name, h);
			tp->flag = DEFINED;
			tp->type = CFUNC;
			tp->val.t = NULL;
			break;
		}
	}
	return (tp);
}
/*
 * Search function tables for a function. If create set, a table entry
 * is created if none is found.
 */
Search function tables for a function. If create set, a table entry
is created if none is found.
Search function tables for a function . If create set a table entry is created if none is found .
struct tbl *
findfunc(const char *name, uint32_t h, bool create)
{
	struct block *l;
	struct tbl *tp = NULL;
	for (l = e->loc; l; l = l->next) {
		tp = ktsearch(&l->funs, name, h);
		if (tp)
			break;
		if (!l->next && create) {
			tp = ktenter(&l->funs, name, h);
			tp->flag = DEFINED;
			tp->type = CFUNC;
			tp->val.t = NULL;
			break;
		}
	}
	return (tp);
}
struct tbl * findfunc ( const char * name , uint32_t h , bool create ) { struct block * l ; struct tbl * tp = NULL ; for ( l = e -> loc ; l ; l = l -> next ) { tp = ktsearch ( & l -> funs , name , h ) ; if ( tp ) break ; if ( ! l -> next && create ) { tp = ktenter ( & l -> funs , name , h ) ; tp -> flag = DEFINED ; tp -> type = CFUNC ; tp -> val . t = NULL ; break ; } } return ( tp ) ; }
Search function tables for a function.
Search function tables for a function .