aboutsummaryrefslogtreecommitdiff
path: root/tcl_proxyinlet.cxx
diff options
context:
space:
mode:
authormescalinum <mescalinum@users.sourceforge.net>2009-08-31 01:13:12 +0000
committermescalinum <mescalinum@users.sourceforge.net>2009-08-31 01:13:12 +0000
commitaa048d93e8fdae5b8152b3c963da02b3cd244274 (patch)
tree332e1a82d66b6b12ba93b53e86017f907afab563 /tcl_proxyinlet.cxx
parentd076e9fe58703eefb5f6ac1ba1366b09e273a113 (diff)
proxyinlet support working and generally everything working fine (in the list_change use case)
svn path=/trunk/externals/tclpd/; revision=12153
Diffstat (limited to 'tcl_proxyinlet.cxx')
-rw-r--r--tcl_proxyinlet.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/tcl_proxyinlet.cxx b/tcl_proxyinlet.cxx
index c7504c5..e1cdb48 100644
--- a/tcl_proxyinlet.cxx
+++ b/tcl_proxyinlet.cxx
@@ -16,21 +16,24 @@ void proxyinlet_clear(t_proxyinlet* x) {
}
}
+#define PROXYINLET_SEL_TO_LIST 0 // 0 or 1
+
void proxyinlet_anything(t_proxyinlet* x, t_symbol* s, int argc, t_atom* argv) {
proxyinlet_clear(x);
- if(!(x->argv = (t_atom*)getbytes((argc+1) * sizeof(*x->argv)))) {
+ if(!(x->argv = (t_atom*)getbytes((argc+PROXYINLET_SEL_TO_LIST) * sizeof(*x->argv)))) {
x->argc = 0;
error("proxyinlet: getbytes: out of memory");
return;
}
- x->argc = argc + 1;
- SETSYMBOL(&x->argv[0], s);
+ x->argc = argc + PROXYINLET_SEL_TO_LIST;
+ if(PROXYINLET_SEL_TO_LIST == 1) SETSYMBOL(&x->argv[0], s);
+ else x->sel = s;
int i;
for(i = 0; i < argc; i++) {
- x->argv[i+1] = argv[i];
+ x->argv[i+PROXYINLET_SEL_TO_LIST] = argv[i];
}
proxyinlet_trigger(x);
@@ -38,7 +41,7 @@ void proxyinlet_anything(t_proxyinlet* x, t_symbol* s, int argc, t_atom* argv) {
void proxyinlet_trigger(t_proxyinlet* x) {
if(x->target != NULL && x->sel != gensym("none")) {
- tclpd_anything(x->target, x->sel, x->argc, x->argv);
+ tclpd_inlet_anything(x->target, x->ninlet, x->sel, x->argc, x->argv);
}
}