summaryrefslogtreecommitdiff
path: root/bin/ksh/exec.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2005-12-11 20:31:22 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2005-12-11 20:31:22 +0000
commit8083086402c947183d42fff909504862397d8c0d (patch)
tree9ca9e8b8e42385c5859c6452f567575310925baf /bin/ksh/exec.c
parent634e51cbb0dcbacc58c0cdbe439f9d2c412befa0 (diff)
fix a few name clashes with libc; found by lint. ok deraadt@
Diffstat (limited to 'bin/ksh/exec.c')
-rw-r--r--bin/ksh/exec.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c
index 9f33d13f291..f96781ce66f 100644
--- a/bin/ksh/exec.c
+++ b/bin/ksh/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.43 2005/12/11 18:53:51 deraadt Exp $ */
+/* $OpenBSD: exec.c,v 1.44 2005/12/11 20:31:21 otto Exp $ */
/*
* execute command tree
@@ -698,7 +698,7 @@ shcomexec(char **wp)
{
struct tbl *tp;
- tp = tsearch(&builtins, *wp, hash(*wp));
+ tp = ktsearch(&builtins, *wp, hash(*wp));
if (tp == NULL)
internal_errorf(1, "shcomexec: %s", *wp);
return call_builtin(tp, wp);
@@ -715,11 +715,11 @@ findfunc(const char *name, unsigned int h, int create)
struct tbl *tp = (struct tbl *) 0;
for (l = e->loc; l; l = l->next) {
- tp = tsearch(&l->funs, name, h);
+ tp = ktsearch(&l->funs, name, h);
if (tp)
break;
if (!l->next && create) {
- tp = tenter(&l->funs, name, h);
+ tp = ktenter(&l->funs, name, h);
tp->flag = DEFINED;
tp->type = CFUNC;
tp->val.t = (struct op *) 0;
@@ -761,7 +761,7 @@ define(const char *name, struct op *t)
}
if (t == NULL) { /* undefine */
- tdelete(tp);
+ ktdelete(tp);
return was_set ? 0 : 1;
}
@@ -794,7 +794,7 @@ builtin(const char *name, int (*func) (char **))
break;
}
- tp = tenter(&builtins, name, hash(name));
+ tp = ktenter(&builtins, name, hash(name));
tp->flag = DEFINED | flag;
tp->type = CSHELL;
tp->val.f = func;
@@ -820,7 +820,7 @@ findcom(const char *name, int flags)
flags &= ~FC_FUNC;
goto Search;
}
- tbi = (flags & FC_BI) ? tsearch(&builtins, name, h) : NULL;
+ tbi = (flags & FC_BI) ? ktsearch(&builtins, name, h) : NULL;
/* POSIX says special builtins first, then functions, then
* POSIX regular builtins, then search path...
*/
@@ -850,7 +850,7 @@ findcom(const char *name, int flags)
if (!tp && (flags & FC_UNREGBI) && tbi)
tp = tbi;
if (!tp && (flags & FC_PATH) && !(flags & FC_DEFPATH)) {
- tp = tsearch(&taliases, name, h);
+ tp = ktsearch(&taliases, name, h);
if (tp && (tp->flag & ISSET) && access(tp->val.s, X_OK) != 0) {
if (tp->flag & ALLOC) {
tp->flag &= ~ALLOC;
@@ -865,7 +865,7 @@ findcom(const char *name, int flags)
(flags & FC_PATH)) {
if (!tp) {
if (insert && !(flags & FC_DEFPATH)) {
- tp = tenter(&taliases, name, h);
+ tp = ktenter(&taliases, name, h);
tp->type = CTALIAS;
} else {
tp = &temp;
@@ -905,7 +905,7 @@ flushcom(int all) /* just relative or all */
struct tbl *tp;
struct tstate ts;
- for (twalk(&ts, &taliases); (tp = tnext(&ts)) != NULL; )
+ for (ktwalk(&ts, &taliases); (tp = ktnext(&ts)) != NULL; )
if ((tp->flag&ISSET) && (all || tp->val.s[0] != '/')) {
if (tp->flag&ALLOC) {
tp->flag &= ~(ALLOC|ISSET);