Revision: 10212 http://pure-data.svn.sourceforge.net/pure-data/?rev=10212&view=rev Author: zmoelnig Date: 2008-07-23 11:47:41 +0000 (Wed, 23 Jul 2008)
Log Message: ----------- fixed rename of canvasconnections;; added boilerplate to oreceive
Modified Paths: -------------- trunk/externals/iem/iemguts/src/canvasconnections.c trunk/externals/iem/iemguts/src/oreceive.c
Modified: trunk/externals/iem/iemguts/src/canvasconnections.c =================================================================== --- trunk/externals/iem/iemguts/src/canvasconnections.c 2008-07-23 11:41:40 UTC (rev 10211) +++ trunk/externals/iem/iemguts/src/canvasconnections.c 2008-07-23 11:47:41 UTC (rev 10212) @@ -1,7 +1,7 @@
/****************************************************** * - * canvasconnection - implementation file + * canvasconnections - implementation file * * copyleft (c) IOhannes m zm\xF6lnig * @@ -20,7 +20,7 @@ * this object provides a way to send messages to upstream canvases * by default it sends messages to the containing canvas, but you can give the * "depth" as argument; - * e.g. [canvasconnection 1] will send messages to the parent of the containing canvas + * e.g. [canvasconnections 1] will send messages to the parent of the containing canvas */
#include "m_pd.h" @@ -29,19 +29,19 @@
int glist_getindex(t_glist *x, t_gobj *y);
-/* ------------------------- canvasconnection ---------------------------- */ +/* ------------------------- canvasconnections ---------------------------- */
-static t_class *canvasconnection_class; +static t_class *canvasconnections_class;
-typedef struct _canvasconnection +typedef struct _canvasconnections { t_object x_obj; t_canvas *x_parent; t_object *x_object; t_outlet *x_out; -} t_canvasconnection; +} t_canvasconnections;
-static void canvasconnection_outlets(t_canvasconnection *x) +static void canvasconnections_outlets(t_canvasconnections *x) { int noutlets=0; int nout=0; @@ -81,22 +81,22 @@ } }
-static void canvasconnection_bang(t_canvasconnection *x) +static void canvasconnections_bang(t_canvasconnections *x) { - canvasconnection_outlets(x); + canvasconnections_outlets(x); }
-static void canvasconnection_free(t_canvasconnection *x) +static void canvasconnections_free(t_canvasconnections *x) { x->x_object=0; outlet_free(x->x_out); x->x_out=0; }
-static void *canvasconnection_new(t_floatarg f) +static void *canvasconnections_new(t_floatarg f) { - t_canvasconnection *x = (t_canvasconnection *)pd_new(canvasconnection_class); + t_canvasconnections *x = (t_canvasconnections *)pd_new(canvasconnections_class); t_glist *glist=(t_glist *)canvas_getcurrent(); t_canvas *canvas=(t_canvas*)glist_getcanvas(glist); int depth=(int)f; @@ -121,9 +121,9 @@ return (x); }
-void canvasconnection_setup(void) +void canvasconnections_setup(void) { - canvasconnection_class = class_new(gensym("canvasconnection"), (t_newmethod)canvasconnection_new, - (t_method)canvasconnection_free, sizeof(t_canvasconnection), 0, A_DEFFLOAT, 0); - class_addbang(canvasconnection_class, (t_method)canvasconnection_bang); + canvasconnections_class = class_new(gensym("canvasconnections"), (t_newmethod)canvasconnections_new, + (t_method)canvasconnections_free, sizeof(t_canvasconnections), 0, A_DEFFLOAT, 0); + class_addbang(canvasconnections_class, (t_method)canvasconnections_bang); }
Modified: trunk/externals/iem/iemguts/src/oreceive.c =================================================================== --- trunk/externals/iem/iemguts/src/oreceive.c 2008-07-23 11:41:40 UTC (rev 10211) +++ trunk/externals/iem/iemguts/src/oreceive.c 2008-07-23 11:47:41 UTC (rev 10212) @@ -1,4 +1,22 @@
+/****************************************************** + * + * oreceive - implementation file + * + * copyleft (c) IOhannes m zm\xF6lnig + * + * 2307:forum::f\xFCr::uml\xE4ute:2008 + * + * institute of electronic music and acoustics (iem) + * unsiversity of music and dramatic arts graz (kug) + * + ****************************************************** + * + * license: GNU General Public License v.2 + * + ******************************************************/ + + #include "m_pd.h"
#if 0 @@ -11,7 +29,12 @@
/* ------------------------------------------------------------- */ -/* there come the guts: our own bind/unbind mechanism that + +/* + * [oreceive] : ordered receive + * + * + * there come the guts: our own bind/unbind mechanism that * includes priorities * * the plan is as follows: @@ -249,7 +272,6 @@ x->x_sym = s; x->x_priority = priority; pd_bind_priority(&x->x_obj.ob_pd, s, priority); - // pd_bind(&x->x_obj.ob_pd, s); outlet_new(&x->x_obj, 0); return (x); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.