1 struct o_fsm_t; 2 struct o_fsm_event_t; 3 4 typedef void (*fn_t) (struct o_fsm_t *, 5 struct o_fsm_event_t const *); 6 7 struct o_fsm_state_t { 8 fn_t dispatch; 9 }; 10 11 struct o_fsm_t { 12 fn_t dispatch; 13 }; 14 15 extern struct o_fsm_state_t o_fsm_tran(struct o_fsm_t *fsm, 16 struct o_fsm_state_t next_state); 17 static void plist_parser_state_start(struct o_fsm_t *fsm, 18 struct o_fsm_event_t const *fsm_event); 19 o_fsm_state(fn_t dispatch_fcn)20struct o_fsm_state_t o_fsm_state(fn_t dispatch_fcn) 21 { 22 return *(struct o_fsm_state_t *)&dispatch_fcn; 23 } 24 25 typedef struct _o_plist_parser_t { 26 struct o_fsm_t fsm; 27 } o_plist_parser_t; 28 plist_parser_state_start(struct o_fsm_t * fsm,struct o_fsm_event_t const * fsm_event)29static void plist_parser_state_start(struct o_fsm_t *fsm, 30 struct o_fsm_event_t const *fsm_event) 31 { 32 } 33 o_plist_deserialize_xml(int fin)34void o_plist_deserialize_xml(int fin) 35 { 36 o_plist_parser_t parser; 37 o_fsm_tran(&parser.fsm, o_fsm_state(plist_parser_state_start)); 38 } 39