aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2008-07-23 11:47:41 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2008-07-23 11:47:41 +0000
commit14a08e3d8a694b7fb718717130d4ff69d14243fb (patch)
tree00d12eda1e446ea0d94dc5ce5c2e1cebfa3b760a /src
parent375a3141c6153cf1f6a0e3102ea919c3d6292dd6 (diff)
fixed rename of canvasconnections;;
added boilerplate to oreceive svn path=/trunk/externals/iem/iemguts/; revision=10212
Diffstat (limited to 'src')
-rw-r--r--src/canvasconnections.c32
-rw-r--r--src/oreceive.c26
2 files changed, 40 insertions, 18 deletions
diff --git a/src/canvasconnections.c b/src/canvasconnections.c
index 58f881a..260e946 100644
--- a/src/canvasconnections.c
+++ b/src/canvasconnections.c
@@ -1,7 +1,7 @@
/******************************************************
*
- * canvasconnection - implementation file
+ * canvasconnections - implementation file
*
* copyleft (c) IOhannes m zmölnig
*
@@ -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_outlets(t_canvasconnection *x)
}
}
-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 @@ static void *canvasconnection_new(t_floatarg f)
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);
}
diff --git a/src/oreceive.c b/src/oreceive.c
index 13f2102..5109f4b 100644
--- a/src/oreceive.c
+++ b/src/oreceive.c
@@ -1,4 +1,22 @@
+/******************************************************
+ *
+ * oreceive - implementation file
+ *
+ * copyleft (c) IOhannes m zmölnig
+ *
+ * 2307:forum::für::umläute: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 @@ static t_class *oreceive_class, *oreceive_proxy_class, *oreceive_guts_class;
/* ------------------------------------------------------------- */
-/* 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 @@ static void *oreceive_new(t_symbol *s, t_float priority)
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);
}