BCPL_GlobVec size fix.
[AROS.git] / compiler / autoinit / functions.c
blob16cb8f20369925cf6ddba2298b563784ef7a8389
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: autoinit library - functions sets handling
6 Lang: english
7 */
9 #define DEBUG 0
11 #include <aros/symbolsets.h>
12 #include <aros/debug.h>
14 int set_call_funcs(const void * const set[], int direction, int test_fail)
16 int pos, (*func)(void);
18 D(bug("entering set_call_funcs() - %p\n", set));
20 ForeachElementInSet(set, direction, pos, func)
22 D(bug(" %p[%d] %p()", set, pos, func));
24 if (test_fail)
26 int ret = (*func)();
27 D(bug(" => %d", ret));
28 if (!ret)
29 return 0;
31 else
33 (void)(*func)();
35 D(bug("\n"));
38 return 1;