Mercurial > ~dholland > hg > tradcpp > index.cgi
diff files.c @ 9:1fbcbd58742e
move destroyall to array.h
author | David A. Holland |
---|---|
date | Sun, 19 Dec 2010 19:19:02 -0500 |
parents | 97243badae69 |
children | 800f3a560a3b |
line wrap: on
line diff
--- a/files.c Sun Dec 19 19:15:55 2010 -0500 +++ b/files.c Sun Dec 19 19:19:02 2010 -0500 @@ -31,22 +31,6 @@ //////////////////////////////////////////////////////////// // management -#define DESTROYALL(T) \ - static \ - void \ - T##array_destroyall(struct T##array *arr) \ - { \ - unsigned i, num; \ - struct T *t; \ - \ - num = T##array_num(arr); \ - for (i=0; i<num; i++) { \ - t = T##array_get(arr, i); \ - T##_destroy(t); \ - } \ - T##array_setsize(arr, 0); \ - } - static struct incdir * incdir_create(const char *name, bool issystem) @@ -94,8 +78,8 @@ incdirarray_init(&bracketpath); } -DESTROYALL(incdir); -DESTROYALL(seenfile); +DESTROYALL_ARRAY(incdir, ); +DESTROYALL_ARRAY(seenfile, ); void files_cleanup(void)