X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/9da403afeef5f4c1ecb9d1d9e678a87a2457d0e0..34b97201c46d8fe19753369c0d1bbb89cf973023:/sym.c diff --git a/sym.c b/sym.c index 965da3f..6ddc45c 100644 --- a/sym.c +++ b/sym.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: sym.c,v 1.5 1999/05/13 22:48:37 mdw Exp $ + * $Id: sym.c,v 1.6 1999/05/26 21:08:31 mdw Exp $ * * Symbol table management * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: sym.c,v $ + * Revision 1.6 1999/05/26 21:08:31 mdw + * Rename symbols in line with newer conventions. + * * Revision 1.5 1999/05/13 22:48:37 mdw * Twiddle the extension threshold. Change `-ise' to `-ize' throughout. * @@ -87,7 +90,7 @@ /*----- Main code ---------------------------------------------------------*/ -/* --- @sym_createTable@ --- * +/* --- @sym_create@ --- * * * Arguments: @sym_table *t@ = symbol table to initialize * @@ -97,7 +100,7 @@ * there isn't enough memory. */ -void sym_createTable(sym_table *t) +void sym_create(sym_table *t) { size_t i; @@ -114,7 +117,7 @@ void sym_createTable(sym_table *t) TRACK_POP; } -/* --- @sym_destroyTable@ --- * +/* --- @sym_destroy@ --- * * * Arguments: @sym_table *t@ = pointer to symbol table in question * @@ -124,7 +127,7 @@ void sym_createTable(sym_table *t) * occupy. */ -void sym_destroyTable(sym_table *t) +void sym_destroy(sym_table *t) { size_t i; sym_base *p, *q; @@ -360,7 +363,7 @@ void sym_remove(sym_table *t, void *b) t->c++; } -/* --- @sym_createIter@ --- * +/* --- @sym_mkiter@ --- * * * Arguments: @sym_iter *i@ = pointer to an iterator object * @sym_table *t@ = pointer to a symbol table object @@ -371,7 +374,7 @@ void sym_remove(sym_table *t, void *b) * iterate through a symbol table. */ -void sym_createIter(sym_iter *i, sym_table *t) +void sym_mkiter(sym_iter *i, sym_table *t) { i->t = t; i->i = 0; @@ -496,7 +499,7 @@ int main(void) flag[i] = 0; entries = 0; - sym_createTable(&tbl); + sym_create(&tbl); for (;;) { i = (unsigned)rand() % sz; @@ -569,7 +572,7 @@ int main(void) ntbl = xmalloc(sz * sizeof(sym_word *)); memcpy(ntbl, flag, sz * sizeof(sym_word *)); - sym_createIter(&it, &tbl); + sym_mkiter(&it, &tbl); while ((w = sym_next(&it)) != 0) { if (ntbl[w->i] == 0)