From 21c068f1916330e90f814bed461fe0821d1665ec Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sun, 9 Oct 2011 16:36:37 +0000 Subject: checked in pd-0.43-0.src.tar.gz svn path=/trunk/; revision=15557 --- pd/src/m_obj.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'pd/src/m_obj.c') diff --git a/pd/src/m_obj.c b/pd/src/m_obj.c index df8a2c12..bc6056b4 100644 --- a/pd/src/m_obj.c +++ b/pd/src/m_obj.c @@ -75,12 +75,16 @@ static void inlet_wrong(t_inlet *x, t_symbol *s) x->i_symfrom->s_name, s->s_name); } +static void inlet_list(t_inlet *x, t_symbol *s, int argc, t_atom *argv); + /* LATER figure out how to make these efficient: */ static void inlet_bang(t_inlet *x) { if (x->i_symfrom == &s_bang) pd_vmess(x->i_dest, x->i_symto, ""); else if (!x->i_symfrom) pd_bang(x->i_dest); + else if (x->i_symfrom == &s_list) + inlet_list(x, &s_bang, 0, 0); else inlet_wrong(x, &s_bang); } @@ -89,6 +93,12 @@ static void inlet_pointer(t_inlet *x, t_gpointer *gp) if (x->i_symfrom == &s_pointer) pd_vmess(x->i_dest, x->i_symto, "p", gp); else if (!x->i_symfrom) pd_pointer(x->i_dest, gp); + else if (x->i_symfrom == &s_list) + { + t_atom a; + SETPOINTER(&a, gp); + inlet_list(x, &s_pointer, 1, &a); + } else inlet_wrong(x, &s_pointer); } @@ -100,6 +110,12 @@ static void inlet_float(t_inlet *x, t_float f) x->i_un.iu_floatsignalvalue = f; else if (!x->i_symfrom) pd_float(x->i_dest, f); + else if (x->i_symfrom == &s_list) + { + t_atom a; + SETFLOAT(&a, f); + inlet_list(x, &s_float, 1, &a); + } else inlet_wrong(x, &s_float); } @@ -108,6 +124,12 @@ static void inlet_symbol(t_inlet *x, t_symbol *s) if (x->i_symfrom == &s_symbol) pd_vmess(x->i_dest, x->i_symto, "s", s); else if (!x->i_symfrom) pd_symbol(x->i_dest, s); + else if (x->i_symfrom == &s_list) + { + t_atom a; + SETSYMBOL(&a, s); + inlet_list(x, &s_symbol, 1, &a); + } else inlet_wrong(x, &s_symbol); } @@ -118,6 +140,12 @@ static void inlet_list(t_inlet *x, t_symbol *s, int argc, t_atom *argv) || x->i_symfrom == &s_symbol || x->i_symfrom == &s_pointer) typedmess(x->i_dest, x->i_symto, argc, argv); else if (!x->i_symfrom) pd_list(x->i_dest, s, argc, argv); + else if (!argc) + inlet_bang(x); + else if (argc==1 && argv->a_type == A_FLOAT) + inlet_float(x, atom_getfloat(argv)); + else if (argc==1 && argv->a_type == A_SYMBOL) + inlet_symbol(x, atom_getsymbol(argv)); else inlet_wrong(x, &s_list); } -- cgit v1.2.1