2 * Based on output of the cfsm FSM compiler:
3 * http://www.mindrot.org/projects/cfsm/
18 * Allocate a new FSM and set its starting state to STATE_INIT (0)
20 #define MYFSM_INIT() ( (struct myfsm *)(calloc(1, sizeof(struct myfsm))) )
24 * Free a FSM created with MYFSM_INIT
26 #define MYFSM_FREE(fsm) { free(fsm); }
30 * Returns the current state of the FSM.
32 #define MYFSM_CURRENT(fsm) ( fsm->current_state )