URL
https://opencores.org/ocsvn/eco32/eco32/trunk
Subversion Repositories eco32
[/] [eco32/] [trunk/] [lcc/] [src/] [event.c] - Rev 7
Go to most recent revision | Compare with Previous | Blame | View Log
#include "c.h" static char rcsid[] = "$Id: event.c,v 1.1 2002/08/28 23:12:43 drh Exp $"; struct entry { Apply func; void *cl; }; Events events; void attach(Apply func, void *cl, List *list) { struct entry *p; NEW(p, PERM); p->func = func; p->cl = cl; *list = append(p, *list); } void apply(List event, void *arg1, void *arg2) { if (event) { List lp = event; do { struct entry *p = lp->x; (*p->func)(p->cl, arg1, arg2); lp = lp->link; } while (lp != event); } }
Go to most recent revision | Compare with Previous | Blame | View Log