Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22131
Modified Files:
Tag: devel_0_39
desire.c
Log Message:
adding the message responder class back into the source (OOPS)
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.82
retrieving revision 1.1.2.83
diff -C2 -d -r1.1.2.82 -r1.1.2.83
*** desire.c 12 Jun 2006 20:15:16 -0000 1.1.2.82
--- desire.c 19 Jun 2006 02:57:03 -0000 1.1.2.83
***************
*** 10711,10714 ****
--- 10711,10715 ----
/*static*/ t_class *text_class;
+ static t_class *mresp_class;
static t_class *message_class;
static t_class *gatom_class;
***************
*** 10854,10857 ****
--- 10855,10866 ----
} t_message;
+ static void mresp_bang(t_mresp *x) {outlet_bang(x->mr_outlet);}
+ static void mresp_float(t_mresp *x, t_float f) {outlet_float(x->mr_outlet, f);}
+ static void mresp_symbol(t_mresp *x, t_symbol *s) {outlet_symbol(x->mr_outlet, s);}
+ static void mresp_list(t_mresp *x, t_symbol *s, int argc, t_atom *argv)
+ {outlet_list(x->mr_outlet, s, argc, argv);}
+ static void mresp_anything(t_mresp *x, t_symbol *s, int argc, t_atom *argv)
+ {outlet_anything(x->mr_outlet, s, argc, argv);}
+
static void message_bang(t_message *x)
{binbuf_eval(x->m_text.te_binbuf, &x->m_mresp.mr_pd, 0, 0);}
***************
*** 10892,10898 ****
{
t_message *x = (t_message *)pd_new(message_class);
! x->m_mresp.mr_pd = 0; /* was mresp_class */
x->m_mresp.mr_outlet = outlet_new(&x->m_text, &s_float);
! x->m_text.te_width = 0; /* don't know it yet. */
x->m_text.te_type = T_MESSAGE;
x->m_text.te_binbuf = binbuf_new();
--- 10901,10907 ----
{
t_message *x = (t_message *)pd_new(message_class);
! x->m_mresp.mr_pd = mresp_class;
x->m_mresp.mr_outlet = outlet_new(&x->m_text, &s_float);
! x->m_text.te_width = 0; /* don't know it yet. */
x->m_text.te_type = T_MESSAGE;
x->m_text.te_binbuf = binbuf_new();
***************
*** 11354,11357 ****
--- 11363,11375 ----
CLASS_NOINLET | CLASS_PATCHABLE, 0);
+ c = mresp_class = class_new(gensym("messresponder"), 0, 0,
+ sizeof(t_text), CLASS_PD, 0);
+ class_addbang( c, mresp_bang);
+ class_addfloat( c, (t_method) mresp_float);
+ class_addsymbol( c, mresp_symbol);
+ class_addlist( c, mresp_list);
+ class_addanything(c, mresp_anything);
+
+
c = message_class = class_new(gensym("message"), 0,0,
sizeof(t_message), CLASS_PATCHABLE, 0);