aboutsummaryrefslogtreecommitdiff
path: root/shared/toxy/scriptlet.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2011-03-08 02:12:52 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2011-03-08 02:12:52 +0000
commit47c48c71f7b95aee1347fa4e02c0de09eef1234d (patch)
treed44148b95dccf1ecd7d1c98563a61c40d79cd01b /shared/toxy/scriptlet.c
parent9d2b9b9fabb73757c710440c955ef528d76aea87 (diff)
ported to 0.43 and added backwards compatibility proc
svn path=/trunk/externals/miXed/; revision=15018
Diffstat (limited to 'shared/toxy/scriptlet.c')
-rw-r--r--shared/toxy/scriptlet.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/shared/toxy/scriptlet.c b/shared/toxy/scriptlet.c
index 42e3c02..db836ab 100644
--- a/shared/toxy/scriptlet.c
+++ b/shared/toxy/scriptlet.c
@@ -380,17 +380,17 @@ static char *scriptlet_dedot(t_scriptlet *sp, char *ibuf,
{
if (ibuf[1] == ':')
{
- sprintf(obuf, "{pd [concat ");
+ sprintf(obuf, "{pdsend [concat ");
len = 2;
}
else if (ibuf[1] == '|')
{
- sprintf(obuf, "{pd [concat %s ", sp->s_rptarget->s_name);
+ sprintf(obuf, "{pdsend [concat %s ", sp->s_rptarget->s_name);
len = 2;
}
else
{
- sprintf(obuf, "{pd [concat %s _cb ", sp->s_cbtarget->s_name);
+ sprintf(obuf, "{pdsend [concat %s _cb ", sp->s_cbtarget->s_name);
len = 1;
}
}
@@ -1064,6 +1064,9 @@ t_scriptlet *scriptlet_new(t_pd *owner,
sys_gui(" pd [concat $target _rp $::toxy::reply \\;]\n");
sys_gui(" unset ::toxy::reply\n");
sys_gui("}\n");
+ /* if older than 0.43, create an 0.43-style pdsend */
+ sys_gui("if {[llength [info procs ::pdsend]] == 0} {");
+ sys_gui("proc ::pdsend {args} {::pd \"[join $args { }] ;\"}}\n");
configured = 1;
}
sp->s_owner = owner;