From 90407c44ba6fe11a35445575e77a77034ed8b385 Mon Sep 17 00:00:00 2001 From: mdw Date: Thu, 25 Jan 2001 21:11:59 +0000 Subject: [PATCH] Use the new @ASSOC_ATOM@ macro. --- assoc-test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/assoc-test.c b/assoc-test.c index fc1f82e..5949857 100644 --- a/assoc-test.c +++ b/assoc-test.c @@ -14,7 +14,7 @@ static int cmp(const void *a, const void *b) { const word *const *v = b; const word *const *w = a; - return (strcmp(ATOM_NAME((*w)->_b.a), ATOM_NAME((*v)->_b.a))); + return (strcmp(ATOM_NAME(ASSOC_ATOM(*w)), ATOM_NAME(ASSOC_ATOM(*v)))); } int main(void) @@ -74,9 +74,9 @@ int main(void) for (vv = v, assoc_mkiter(&i, &t); (w = assoc_next(&i)) != 0; vv++) *vv = w; qsort(v, n, sizeof(*v), cmp); - printf("%s:%i", ATOM_NAME((*v)->_b.a), (*v)->i); + printf("%s:%i", ATOM_NAME(ASSOC_ATOM(*v)), (*v)->i); for (vv = v + 1; --n; vv++) - printf(" %s:%i", ATOM_NAME((*vv)->_b.a), (*vv)->i); + printf(" %s:%i", ATOM_NAME(ASSOC_ATOM(*vv)), (*vv)->i); free(v); putchar('\n'); } @@ -85,5 +85,6 @@ int main(void) } assoc_destroy(&t); + atom_destroytable(&at); return (0); } -- 2.11.0