Update of /cvsroot/pure-data/externals/miXed/toxy
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21923/toxy
Modified Files:
build_counter notes.txt plustot.c plustot.env.c plustot.h
plustot.in.c plustot.out.c plustot.print.c plustot.qlist.c
plustot.var.c pluswidget.c
Log Message:
toxy alpha19 and pddp alpha3 (see notes.txt for toxy and pddp)
Index: plustot.qlist.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/plustot.qlist.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** plustot.qlist.c 30 May 2005 09:29:26 -0000 1.4
--- plustot.qlist.c 13 Jun 2005 20:41:52 -0000 1.5
***************
*** 181,185 ****
(tob = plustob_new(tin, 0)))
{
! x = (t_plustot_qlist *)plusobject_new(plustot_qlist_class, s, ac, av);
plusbob_preserve((t_plusbob *)tob);
plusbob_setowner((t_plusbob *)tob, (t_pd *)x);
--- 181,186 ----
(tob = plustob_new(tin, 0)))
{
! x = (t_plustot_qlist *)
! plusobject_new(plustot_qlist_class, s, ac, av, 0);
plusbob_preserve((t_plusbob *)tob);
plusbob_setowner((t_plusbob *)tob, (t_pd *)x);
Index: notes.txt
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/notes.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** notes.txt 30 May 2005 09:29:26 -0000 1.4
--- notes.txt 13 Jun 2005 20:41:52 -0000 1.5
***************
*** 11,18 ****
. do not evaluate if fresh, unless explicitly forced to (are side-effects
to be modal, requested with a flag, or triggered with a message?)
! . creation time evaluation
DONE for toxy
alpha18
* plustot:
--- 11,56 ----
. do not evaluate if fresh, unless explicitly forced to (are side-effects
to be modal, requested with a flag, or triggered with a message?)
! . pull inputs
DONE for toxy
+ alpha19
+ * plustot
+ . rules for slot creation:
+ - there is always at least one slot, although it may be deaf
+ - if a command contains a pseudo-scalar, there is exactly one,
+ listening slot
+ - if a command contains pseudo-array elements, there are as many slots
+ as the highest index + 1 (but not more than 256, a sanity limit);
+ listening slots are created for explicitly used elements, all other
+ slots are deaf
+ - mixing pseudo-scalar and pseudo-array forms in a single command
+ is prohibited
+ - if a command does not contain pseudo-variables, there is exactly one,
+ deaf slot
+ . firing rules established for push inputs:
+ - firing (evaluation with output) is executed iff all listening slots
+ have data and a) a hot slot receives input, or b) any slot receives
+ an explicit firing request ('bang' message)
+ - $Hin and $Cin forms of pseudo-variables: each slot may be explicitly
+ declared hot (Hin) or cold (Cin), overriding the default rule (leftmost
+ slot, if listening, is hot, others are cold) observed when the plain
+ form, $in, is used
+ - $Tin form of pseudo-variables, which is a ``pure dataflow'' variant
+ of $Hin: a hot slot, which looses data after evaluation (all other
+ kinds of slots keep data after evaluation, unless explicitly 'cleared')
+ - 'set' message accepted in all inlets as the `cold' input
+ - 'bang' message accepted in all inlets as the firing trigger
+ . evaluation without output:
+ - executed iff all listening slots have data and a) an object has
+ just been created (creation time evaluation), or b) an object
+ received an explicit evaluation request ('eval' message)
+ - creation time evaluation suppresses all error messages, explicit
+ evaluation does not
+ . message 'clear' in any inlet clears its slot of data
+ . message 'clearall' in leftmost inlet clears all listening slots
+ . appearance: converting dot-sequences to valid Tcl for presentation
+ . bug fix: made unclickable in gop
+
alpha18
* plustot:
Index: pluswidget.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/pluswidget.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** pluswidget.c 30 May 2005 09:29:26 -0000 1.1
--- pluswidget.c 13 Jun 2005 20:41:52 -0000 1.2
***************
*** 21,28 ****
struct _pluswidget
{
! char *pw_vistext; /* binbuf_gettext()-style (no null termination) */
! int pw_vissize;
! int pw_rtextactive;
! int pw_ishit;
};
--- 21,29 ----
struct _pluswidget
{
! t_plusstring *pw_visstring;
! char *pw_visbuf; /* binbuf_gettext()-style: no null termination */
! int pw_vissize;
! int pw_rtextactive;
! int pw_ishit;
};
***************
*** 146,150 ****
else
sys_vgui(".x%lx.c itemconfigure %s -text {%.*s} -fill brown\n",
! glist, rtext_gettag(y), pw->pw_vissize, pw->pw_vistext);
}
}
--- 147,151 ----
else
sys_vgui(".x%lx.c itemconfigure %s -text {%.*s} -fill brown\n",
! glist, rtext_gettag(y), pw->pw_vissize, pw->pw_visbuf);
}
}
***************
*** 175,179 ****
rtext_draw(y);
sys_vgui(".x%lx.c itemconfigure %s -text {%.*s} -fill brown\n",
! glist, rtext_gettag(y), pw->pw_vissize, pw->pw_vistext);
}
}
--- 176,180 ----
rtext_draw(y);
sys_vgui(".x%lx.c itemconfigure %s -text {%.*s} -fill brown\n",
! glist, rtext_gettag(y), pw->pw_vissize, pw->pw_visbuf);
}
}
***************
*** 192,198 ****
int shift, int alt, int dbl, int doit)
{
! if (doit)
! pd_bang((t_pd *)z);
! return (1);
}
--- 193,203 ----
int shift, int alt, int dbl, int doit)
{
! if (glist->gl_havewindow)
! {
! if (doit)
! pd_bang((t_pd *)z);
! return (1);
! }
! else return (0);
}
***************
*** 215,245 ****
if (pw)
{
! if (pw->pw_vistext)
! freebytes(pw->pw_vistext, pw->pw_vissize);
freebytes(pw, sizeof(*pw));
}
}
! void plusobject_widgetcreate(t_plusobject *po, t_symbol *s, int ac, t_atom *av)
{
t_pluswidget *pw = getbytes(sizeof(*pw));
! t_binbuf *inbb = binbuf_new();
! if (!s || s == &s_)
! s = plusps_tot;
! po->po_widget = pw;
! if ((s != totps_plustot && s != plusps_tot) || ac == 0)
{
! t_atom at;
! if (s == totps_plustot)
s = plusps_tot;
! SETSYMBOL (&at, s);
! binbuf_add(inbb, 1, &at);
}
- if (ac > 0)
- binbuf_add(inbb, ac, av);
- binbuf_gettext(inbb, &pw->pw_vistext, &pw->pw_vissize);
- binbuf_free(inbb);
pw->pw_rtextactive = 0;
pw->pw_ishit = 0;
}
--- 220,267 ----
if (pw)
{
! if (pw->pw_visstring)
! plusstring_release(pw->pw_visstring);
! else if (pw->pw_visbuf)
! freebytes(pw->pw_visbuf, pw->pw_vissize);
freebytes(pw, sizeof(*pw));
}
}
! /* assuming non-null ps will remain constant, LATER rethink */
! void plusobject_widgetcreate(t_plusobject *po, t_symbol *s, int ac, t_atom *av,
! t_plusstring *ps)
{
t_pluswidget *pw = getbytes(sizeof(*pw));
! pw->pw_visstring = 0;
! if (ps)
{
! plusstring_preserve(ps);
! pw->pw_visbuf = plusstring_get(ps, &pw->pw_vissize);
! if (pw->pw_vissize > 0)
! pw->pw_visstring = ps;
! else
! plusstring_release(ps);
! }
! if (pw->pw_visstring == 0)
! {
! t_binbuf *inbb = binbuf_new();
! if (!s || s == &s_)
s = plusps_tot;
! if ((s != totps_plustot && s != plusps_tot) || ac == 0)
! {
! t_atom at;
! if (s == totps_plustot)
! s = plusps_tot;
! SETSYMBOL (&at, s);
! binbuf_add(inbb, 1, &at);
! }
! if (ac > 0)
! binbuf_add(inbb, ac, av);
! binbuf_gettext(inbb, &pw->pw_visbuf, &pw->pw_vissize);
! binbuf_free(inbb);
}
pw->pw_rtextactive = 0;
pw->pw_ishit = 0;
+ po->po_widget = pw;
}
Index: plustot.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/plustot.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** plustot.c 30 May 2005 09:29:26 -0000 1.5
--- plustot.c 13 Jun 2005 20:41:52 -0000 1.6
***************
*** 392,395 ****
--- 392,412 ----
}
+ int plustob_clear(t_plustob *tob)
+ {
+ if (!tob->tob_tin)
+ {
+ /* FIXME */
+ loud_warning(0, "+tot", "+To: environment missing");
+ return (0);
[...1105 lines suppressed...]
--- 2284,2291 ----
class_addmethod(plustot_class, (t_method)plustot_eval,
gensym("eval"), 0);
+ class_addmethod(plustot_class, (t_method)plustot_clear,
+ gensym("clear"), 0);
+ class_addmethod(plustot_class, (t_method)plustot_clearall,
+ gensym("clearall"), 0);
class_addmethod(plustot_class, (t_method)plustot_set,
gensym("set"), A_GIMME, 0);
***************
*** 2110,2113 ****
--- 2303,2310 ----
class_addsymbol(plusproxy_class, plusproxy_symbol);
class_addlist(plusproxy_class, plusproxy_list);
+ class_addmethod(plusproxy_class, (t_method)plusproxy_clear,
+ gensym("clear"), 0);
+ class_addmethod(plusproxy_class, (t_method)plusproxy_set,
+ gensym("set"), A_GIMME, 0);
#ifdef PLUSTOT_DEBUG
Index: plustot.h
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/plustot.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** plustot.h 30 May 2005 09:29:26 -0000 1.3
--- plustot.h 13 Jun 2005 20:41:52 -0000 1.4
***************
*** 24,27 ****
--- 24,30 ----
#define t_plusvar struct _plusvar
+ EXTERN_STRUCT _plusstring;
+ #define t_plusstring struct _plusstring
+
EXTERN_STRUCT _pluswidget;
#define t_pluswidget struct _pluswidget
***************
*** 30,33 ****
--- 33,37 ----
{
t_object po_ob;
+ t_glist *po_glist;
t_pluswidget *po_widget;
int po_ninlets;
***************
*** 66,69 ****
--- 70,74 ----
Tcl_Obj *plusatom_tobvalue(t_atom *ap, t_pd *caller);
+ int plustob_clear(t_plustob *tob);
Tcl_Obj *plustob_set(t_plustob *tob, t_plustin *tin, Tcl_Obj *ob);
Tcl_Obj *plustob_setfloat(t_plustob *tob, t_float f);
***************
*** 79,82 ****
--- 84,88 ----
Tcl_Obj *plusvar_push(t_plusvar *var);
Tcl_Obj *plusvar_pull(t_plusvar *var);
+ void plusvar_clear(t_plusvar *var, int doit);
Tcl_Obj *plusvar_set(t_plusvar *var, Tcl_Obj *ob, int doit);
Tcl_Obj *plusvar_setfloat(t_plusvar *var, t_float f, int doit);
***************
*** 84,89 ****
Tcl_Obj *plusvar_setlist(t_plusvar *var, int ac, t_atom *av, int doit);
void plusobject_free(t_plusobject *po);
! t_plusobject *plusobject_new(t_class *c, t_symbol *s, int ac, t_atom *av);
t_inlet *plusinlet_new(t_plusobject *po, t_pd *dest,
t_symbol *s1, t_symbol *s2);
--- 90,100 ----
Tcl_Obj *plusvar_setlist(t_plusvar *var, int ac, t_atom *av, int doit);
+ void plusstring_preserve(t_plusstring *ps);
+ void plusstring_release(t_plusstring *ps);
+ char *plusstring_get(t_plusstring *ps, int *lenp);
+
void plusobject_free(t_plusobject *po);
! t_plusobject *plusobject_new(t_class *c, t_symbol *s, int ac, t_atom *av,
! t_plusstring *ps);
t_inlet *plusinlet_new(t_plusobject *po, t_pd *dest,
t_symbol *s1, t_symbol *s2);
Index: plustot.in.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/plustot.in.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** plustot.in.c 30 May 2005 09:29:26 -0000 1.2
--- plustot.in.c 13 Jun 2005 20:41:52 -0000 1.3
***************
*** 88,92 ****
(tob = plustob_new(tin, 0)))
{
! x = (t_plustot_in *)plusobject_new(plustot_in_class, s, ac, av);
plusbob_preserve((t_plusbob *)tob);
plusbob_setowner((t_plusbob *)tob, (t_pd *)x);
--- 88,92 ----
(tob = plustob_new(tin, 0)))
{
! x = (t_plustot_in *)plusobject_new(plustot_in_class, s, ac, av, 0);
plusbob_preserve((t_plusbob *)tob);
plusbob_setowner((t_plusbob *)tob, (t_pd *)x);
Index: plustot.env.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/plustot.env.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** plustot.env.c 30 May 2005 09:29:26 -0000 1.3
--- plustot.env.c 13 Jun 2005 20:41:52 -0000 1.4
***************
*** 112,116 ****
{
int warned = 0;
! x = (t_plustot_env *)plusobject_new(plustot_env_class, s, ac, av);
x->x_tin = tin;
plusbob_preserve((t_plusbob *)tin);
--- 112,116 ----
{
int warned = 0;
! x = (t_plustot_env *)plusobject_new(plustot_env_class, s, ac, av, 0);
x->x_tin = tin;
plusbob_preserve((t_plusbob *)tin);
Index: plustot.print.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/plustot.print.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** plustot.print.c 30 May 2005 09:29:26 -0000 1.3
--- plustot.print.c 13 Jun 2005 20:41:52 -0000 1.4
***************
*** 82,86 ****
{
t_plustot_print *x =
! (t_plustot_print *)plusobject_new(plustot_print_class, s, ac, av);
x->x_label = (ac && av->a_type == A_SYMBOL ? av->a_w.w_symbol : 0);
x->x_bb = binbuf_new();
--- 82,86 ----
{
t_plustot_print *x =
! (t_plustot_print *)plusobject_new(plustot_print_class, s, ac, av, 0);
x->x_label = (ac && av->a_type == A_SYMBOL ? av->a_w.w_symbol : 0);
x->x_bb = binbuf_new();
Index: plustot.var.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/plustot.var.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** plustot.var.c 30 May 2005 09:29:26 -0000 1.2
--- plustot.var.c 13 Jun 2005 20:41:52 -0000 1.3
***************
*** 89,93 ****
(var = plusvar_new(av->a_w.w_symbol->s_name, 0, tin)))
{
! x = (t_plustot_var *)plusobject_new(plustot_var_class, s, ac, av);
plusbob_preserve((t_plusbob *)var);
plusbob_setowner((t_plusbob *)var, (t_pd *)x);
--- 89,93 ----
(var = plusvar_new(av->a_w.w_symbol->s_name, 0, tin)))
{
! x = (t_plustot_var *)plusobject_new(plustot_var_class, s, ac, av, 0);
plusbob_preserve((t_plusbob *)var);
plusbob_setowner((t_plusbob *)var, (t_pd *)x);
Index: plustot.out.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/plustot.out.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** plustot.out.c 30 May 2005 09:29:26 -0000 1.2
--- plustot.out.c 13 Jun 2005 20:41:52 -0000 1.3
***************
*** 59,63 ****
{
t_plustot_out *x =
! (t_plustot_out *)plusobject_new(plustot_out_class, s, ac, av);
x->x_bb = binbuf_new();
plusoutlet_new(&x->x_plusobject, &s_anything);
--- 59,63 ----
{
t_plustot_out *x =
! (t_plustot_out *)plusobject_new(plustot_out_class, s, ac, av, 0);
x->x_bb = binbuf_new();
plusoutlet_new(&x->x_plusobject, &s_anything);
Index: build_counter
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/toxy/build_counter,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** build_counter 30 May 2005 09:29:26 -0000 1.16
--- build_counter 13 Jun 2005 20:41:52 -0000 1.17
***************
*** 1,7 ****
#define TOXY_VERSION "0.1"
#define TOXY_RELEASE "alpha"
! #define TOXY_BUILD 18
#if 0
! TOXY_SNAPSHOT = 0.1-alpha18
#endif
--- 1,7 ----
#define TOXY_VERSION "0.1"
#define TOXY_RELEASE "alpha"
! #define TOXY_BUILD 19
#if 0
! TOXY_SNAPSHOT = 0.1-alpha19
#endif