можно как-то так: typedef int (*my_func_t)(int param, void* next);
int f2(int param, void* next)
{
printf("call f2\n");
*((my_func_t*)next) = f2;
return -1;
}
int f1(int param, void* next)
{
printf("call f1\n");
*((my_func_t*)next) = f2;
return 0;
}
void main()
{
my_func_t f = f1;
while(f(1, &f) >= 0){};
}
хотя бы понятно, какой результат выполнения у функции