diff options
Diffstat (limited to 'bin/ksh/var.c')
-rw-r--r-- | bin/ksh/var.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/bin/ksh/var.c b/bin/ksh/var.c index 733f82f2967..52d6e3a7a45 100644 --- a/bin/ksh/var.c +++ b/bin/ksh/var.c @@ -1,4 +1,4 @@ -/* $OpenBSD: var.c,v 1.27 2005/10/08 18:02:59 otto Exp $ */ +/* $OpenBSD: var.c,v 1.28 2005/12/11 20:31:21 otto Exp $ */ #include "sh.h" #include <time.h> @@ -47,8 +47,8 @@ newblock(void) l->argv = e->loc->argv; } l->exit = l->error = NULL; - tinit(&l->vars, &l->area, 0); - tinit(&l->funs, &l->area, 0); + ktinit(&l->vars, &l->area, 0); + ktinit(&l->funs, &l->area, 0); l->next = e->loc; e->loc = l; } @@ -111,9 +111,9 @@ initvar(void) int i; struct tbl *tp; - tinit(&specials, APERM, 32); /* must be 2^n (currently 17 specials) */ + ktinit(&specials, APERM, 32); /* must be 2^n (currently 17 specials) */ for (i = 0; names[i].name; i++) { - tp = tenter(&specials, names[i].name, hash(names[i].name)); + tp = ktenter(&specials, names[i].name, hash(names[i].name)); tp->flag = DEFINED|ISSET; tp->type = names[i].v; } @@ -213,7 +213,7 @@ global(const char *n) return vp; } for (l = e->loc; ; l = l->next) { - vp = tsearch(&l->vars, n, h); + vp = ktsearch(&l->vars, n, h); if (vp != NULL) { if (array) return arraysearch(vp, val); @@ -223,7 +223,7 @@ global(const char *n) if (l->next == NULL) break; } - vp = tenter(&l->vars, n, h); + vp = ktenter(&l->vars, n, h); if (array) vp = arraysearch(vp, val); vp->flag |= DEFINED; @@ -254,12 +254,12 @@ local(const char *n, bool copy) vp->areap = ATEMP; return vp; } - vp = tenter(&l->vars, n, h); + vp = ktenter(&l->vars, n, h); if (copy && !(vp->flag & DEFINED)) { struct block *ll = l; struct tbl *vq = (struct tbl *) 0; - while ((ll = ll->next) && !(vq = tsearch(&ll->vars, n, h))) + while ((ll = ll->next) && !(vq = ktsearch(&ll->vars, n, h))) ; if (vq) { vp->flag |= vq->flag & @@ -838,7 +838,7 @@ makenv(void) /* unexport any redefined instances */ for (l2 = l->next; l2 != NULL; l2 = l2->next) { - vp2 = tsearch(&l2->vars, vp->name, h); + vp2 = ktsearch(&l2->vars, vp->name, h); if (vp2 != NULL) vp2->flag &= ~EXPORT; } @@ -884,7 +884,7 @@ special(const char *name) { struct tbl *tp; - tp = tsearch(&specials, name, hash(name)); + tp = ktsearch(&specials, name, hash(name)); return tp && (tp->flag & ISSET) ? tp->type : V_NONE; } @@ -894,9 +894,9 @@ unspecial(const char *name) { struct tbl *tp; - tp = tsearch(&specials, name, hash(name)); + tp = ktsearch(&specials, name, hash(name)); if (tp) - tdelete(tp); + ktdelete(tp); } static time_t seconds; /* time SECONDS last set */ |