|I'd solve these cases like this:
1) Make an interpreter that analyzes the script and determines which function to call next.
2) Just split the execution into individual parts and call them sequentially. If the individual parts work or continue to work on a common context, make a struct to hold that context and pass a pointer to that as a parameter to each part-function.
In both cases there is no reason at all to encode the sequence of function calls right into the functions themselves. In fact, it would be bad to do so, for the very reasons pointed out above.