Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31078
Modified Files: Tag: desiredata kernel.c Log Message: removed b_ prefixes
Index: kernel.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v retrieving revision 1.1.2.46 retrieving revision 1.1.2.47 diff -C2 -d -r1.1.2.46 -r1.1.2.47 *** kernel.c 28 Jun 2007 07:57:16 -0000 1.1.2.46 --- kernel.c 10 Jul 2007 16:48:25 -0000 1.1.2.47 *************** *** 103,111 **** t_class *hash_class;
! typedef struct _hashentry { hashkey k; hashvalue v; ! struct _hashentry *next; ! } t_hashentry;
struct _hash : t_pd { --- 103,111 ---- t_class *hash_class;
! struct t_hashentry { hashkey k; hashvalue v; ! t_hashentry *next; ! };
struct _hash : t_pd { *************** *** 344,358 **** static t_class *bindlist_class;
! typedef struct _bindelem { t_pd *who; ! struct _bindelem *next; ! } t_bindelem;
! typedef struct _bindlist { ! t_pd b_pd; ! t_bindelem *b_list; ! } t_bindlist;
! #define bind_each(e,x) for (t_bindelem *e = x->b_list; e; e = e->next) static void bindlist_bang(t_bindlist *x) { bind_each(e,x) pd_bang(e->who);} --- 344,357 ---- static t_class *bindlist_class;
! struct t_bindelem { t_pd *who; ! t_bindelem *next; ! };
! struct t_bindlist : t_pd { ! t_bindelem *list; ! };
! #define bind_each(e,x) for (t_bindelem *e = x->list; e; e = e->next) static void bindlist_bang(t_bindlist *x) { bind_each(e,x) pd_bang(e->who);} *************** *** 379,387 **** if (s->thing->_class == bindlist_class) { t_bindlist *b = (t_bindlist *)s->thing; ! b->b_list = bindelem_new(x,b->b_list); } else { t_bindlist *b = (t_bindlist *)pd_new(bindlist_class); ! b->b_list = bindelem_new(x,bindelem_new(s->thing,0)); ! s->thing = &b->b_pd; } } else s->thing = x; --- 378,386 ---- if (s->thing->_class == bindlist_class) { t_bindlist *b = (t_bindlist *)s->thing; ! b->list = bindelem_new(x,b->list); } else { t_bindlist *b = (t_bindlist *)pd_new(bindlist_class); ! b->list = bindelem_new(x,bindelem_new(s->thing,0)); ! s->thing = b; } } else s->thing = x; *************** *** 396,411 **** t_bindlist *b = (t_bindlist *)s->thing; t_bindelem *e, *e2; ! if ((e = b->b_list)->who == x) { ! b->b_list = e->next; free(e); ! } else for (e = b->b_list; (e2=e->next); e = e2) if (e2->who == x) { e->next = e2->next; free(e2); break; } ! if (!b->b_list->next) { ! s->thing = b->b_list->who; ! free(b->b_list); ! pd_free(&b->b_pd); } } else pd_error(x, "%s: couldn't unbind", s->name); --- 395,410 ---- t_bindlist *b = (t_bindlist *)s->thing; t_bindelem *e, *e2; ! if ((e = b->list)->who == x) { ! b->list = e->next; free(e); ! } else for (e = b->list; (e2=e->next); e = e2) if (e2->who == x) { e->next = e2->next; free(e2); break; } ! if (!b->list->next) { ! s->thing = b->list->who; ! free(b->list); ! pd_free(b); } } else pd_error(x, "%s: couldn't unbind", s->name);