diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-12-11 20:31:22 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2005-12-11 20:31:22 +0000 |
commit | 8083086402c947183d42fff909504862397d8c0d (patch) | |
tree | 9ca9e8b8e42385c5859c6452f567575310925baf /bin/ksh/table.c | |
parent | 634e51cbb0dcbacc58c0cdbe439f9d2c412befa0 (diff) |
fix a few name clashes with libc; found by lint. ok deraadt@
Diffstat (limited to 'bin/ksh/table.c')
-rw-r--r-- | bin/ksh/table.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bin/ksh/table.c b/bin/ksh/table.c index bf7ff59c8de..7de3091feba 100644 --- a/bin/ksh/table.c +++ b/bin/ksh/table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table.c,v 1.11 2005/03/30 17:16:37 deraadt Exp $ */ +/* $OpenBSD: table.c,v 1.12 2005/12/11 20:31:21 otto Exp $ */ /* * dynamic hashed associative table for commands and variables @@ -23,7 +23,7 @@ hash(const char *n) } void -tinit(struct table *tp, Area *ap, int tsize) +ktinit(struct table *tp, Area *ap, int tsize) { tp->areap = ap; tp->tbls = NULL; @@ -68,7 +68,7 @@ texpand(struct table *tp, int nsize) /* name to enter */ /* hash(n) */ struct tbl * -tsearch(struct table *tp, const char *n, unsigned int h) +ktsearch(struct table *tp, const char *n, unsigned int h) { struct tbl **pp, *p; @@ -91,7 +91,7 @@ tsearch(struct table *tp, const char *n, unsigned int h) /* name to enter */ /* hash(n) */ struct tbl * -tenter(struct table *tp, const char *n, unsigned int h) +ktenter(struct table *tp, const char *n, unsigned int h) { struct tbl **pp, *p; int len; @@ -130,20 +130,20 @@ tenter(struct table *tp, const char *n, unsigned int h) } void -tdelete(struct tbl *p) +ktdelete(struct tbl *p) { p->flag = 0; } void -twalk(struct tstate *ts, struct table *tp) +ktwalk(struct tstate *ts, struct table *tp) { ts->left = tp->size; ts->next = tp->tbls; } struct tbl * -tnext(struct tstate *ts) +ktnext(struct tstate *ts) { while (--ts->left >= 0) { struct tbl *p = *ts->next++; @@ -160,7 +160,7 @@ tnamecmp(void *p1, void *p2) } struct tbl ** -tsort(struct table *tp) +ktsort(struct table *tp) { int i; struct tbl **p, **sp, **dp; @@ -195,14 +195,14 @@ tprintinfo(struct table *tp) shellf("table size %d, nfree %d\n", tp->size, tp->nfree); shellf(" Ncmp name\n"); - twalk(&ts, tp); - while ((te = tnext(&ts))) { + ktwalk(&ts, tp); + while ((te = ktnext(&ts))) { struct tbl **pp, *p; h = hash(n = te->name); ncmp = 0; - /* taken from tsearch() and added counter */ + /* taken from ktsearch() and added counter */ for (pp = &tp->tbls[h & (tp->size-1)]; (p = *pp); pp--) { ncmp++; if (*p->name == *n && strcmp(p->name, n) == 0 && |