[PD-cvs] pd/src desire.c,1.1.2.23,1.1.2.24
Mathieu Bouchard
matju at users.sourceforge.net
Thu Sep 22 09:35:18 CEST 2005
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7103
Modified Files:
Tag: devel_0_39
desire.c
Log Message:
renamed pd_saveargs to pd_vsaveargs and provided a (...) version again using the original name.
same with pd_scanargs -> pd_vscanargs.
also worked around some warnings.
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.23
retrieving revision 1.1.2.24
diff -C2 -d -r1.1.2.23 -r1.1.2.24
*** desire.c 20 Sep 2005 23:17:51 -0000 1.1.2.23
--- desire.c 22 Sep 2005 07:35:16 -0000 1.1.2.24
***************
*** 776,780 ****
void canvas_vis(t_canvas *x, t_floatarg f)
{
- char buf[30];
int flag = (f != 0);
if (flag)
--- 776,779 ----
***************
*** 3803,3808 ****
canvas_setcursor(x, CURSOR_RUNMODE_NOTHING);
}
! sys_vgui("pdtk_canvas_editval .x%lx %d\n",
! glist_getcanvas(x), x->gl_edit);
}
--- 3802,3806 ----
canvas_setcursor(x, CURSOR_RUNMODE_NOTHING);
}
! sys_vgui("%lx editval %d\n", glist_getcanvas(x), x->gl_edit);
}
***************
*** 6313,6318 ****
t_gobj *y;
text_widgetbehavior.w_deletefn(z, glist);
! while (y = x->gl_list)
! glist_delete(x, y);
}
--- 6311,6315 ----
t_gobj *y;
text_widgetbehavior.w_deletefn(z, glist);
! while ((y = x->gl_list)) glist_delete(x, y);
}
***************
*** 6797,6802 ****
if (ntotal)
{
! for (y = x->gl_list, nnew = 1; y2 = y->g_next;
! y = y2, nnew++)
if (nnew == ntotal)
{
--- 6794,6798 ----
if (ntotal)
{
! for (y = x->gl_list, nnew = 1; (y2 = y->g_next); y = y2, nnew++)
if (nnew == ntotal)
{
***************
*** 7081,7085 ****
linetraverser_start(&t, x);
! while (oc = linetraverser_next(&t))
{
int srcno = canvas_getindex(x, &t.tr_ob->ob_g);
--- 7077,7081 ----
linetraverser_start(&t, x);
! while ((oc = linetraverser_next(&t)))
{
int srcno = canvas_getindex(x, &t.tr_ob->ob_g);
***************
*** 8048,8053 ****
{
int x1, y1, x2, y2;
! if (tmpl = template_findbyname(templatesym))
! template_notify(tmpl, gensym("select"), 1, &at);
gpointer_unset(&gp);
--- 8044,8049 ----
{
int x1, y1, x2, y2;
! tmpl = template_findbyname(templatesym);
! if (tmpl) template_notify(tmpl, gensym("select"), 1, &at);
gpointer_unset(&gp);
***************
*** 8062,8067 ****
{
sys_vgui(".x%lx.c delete select%lx\n", glist_getcanvas(owner), x);
! if (tmpl = template_findbyname(templatesym))
! template_notify(tmpl, gensym("deselect"), 1, &at);
}
--- 8058,8063 ----
{
sys_vgui(".x%lx.c delete select%lx\n", glist_getcanvas(owner), x);
! tmpl = template_findbyname(templatesym);
! if (tmpl) template_notify(tmpl, gensym("deselect"), 1, &at);
}
***************
*** 8168,8175 ****
t_parentwidgetbehavior *wb = pd_getparentwidget(&y->g_pd);
if (!wb) continue;
! if (hit = (*wb->w_parentclickfn)(y, owner,
data, template, sc, ap, basex + xloc, basey + yloc,
! xpix, ypix, shift, alt, dbl, doit))
! return (hit);
}
return (0);
--- 8164,8171 ----
t_parentwidgetbehavior *wb = pd_getparentwidget(&y->g_pd);
if (!wb) continue;
! hit = wb->w_parentclickfn(y, owner,
data, template, sc, ap, basex + xloc, basey + yloc,
! xpix, ypix, shift, alt, dbl, doit);
! if (hit) return hit;
}
return (0);
***************
*** 8544,8548 ****
{
t_gobj *y, *y2;
! for (y = glist->gl_list; y2 = y->g_next; y = y2)
if (y2 == &scfrom->sc_gobj)
{
--- 8540,8544 ----
{
t_gobj *y, *y2;
! for (y = glist->gl_list; (y2 = y->g_next); y = y2)
if (y2 == &scfrom->sc_gobj)
{
***************
*** 8841,8845 ****
{
t_gtemplate *x2, *x3;
! for (x2 = x->x_template->t_list; x3 = x2->x_next; x2 = x3)
;
x2->x_next = x;
--- 8837,8841 ----
{
t_gtemplate *x2, *x3;
! for (x2 = x->x_template->t_list; (x3 = x2->x_next); x2 = x3)
;
x2->x_next = x;
***************
*** 8928,8932 ****
{
t_gtemplate *x2, *x3;
! for (x2 = t->t_list; x3 = x2->x_next; x2 = x3)
{
if (x == x3)
--- 8924,8928 ----
{
t_gtemplate *x2, *x3;
! for (x2 = t->t_list; (x3 = x2->x_next); x2 = x3)
{
if (x == x3)
***************
*** 9920,9924 ****
sys_vgui(
".x%lx.c create rectangle %d %d %d %d -fill black -width 0 -tags plot%lx\n",
! glist_getcanvas(glist),
ixpix, (int)glist_ytopixels(glist,
basey + fielddesc_cvttocoord(yfielddesc, minyval)),
--- 9916,9920 ----
sys_vgui(
".x%lx.c create rectangle %d %d %d %d -fill black -width 0 -tags plot%lx\n",
! (long)glist_getcanvas(glist),
ixpix, (int)glist_ytopixels(glist,
basey + fielddesc_cvttocoord(yfielddesc, minyval)),
***************
*** 10337,10341 ****
drawnumber_sprintf(x, buf, &at);
sys_vgui(".x%lx.c create text %d %d -anchor nw -fill %s -text {%s}",
! glist_getcanvas(glist), xloc, yloc, colorstring, buf);
sys_vgui(" -font -*-courier-bold--normal--%d-*",
sys_hostfontsize(glist_getfont(glist)));
--- 10333,10337 ----
drawnumber_sprintf(x, buf, &at);
sys_vgui(".x%lx.c create text %d %d -anchor nw -fill %s -text {%s}",
! (long)glist_getcanvas(glist), xloc, yloc, colorstring, buf);
sys_vgui(" -font -*-courier-bold--normal--%d-*",
sys_hostfontsize(glist_getfont(glist)));
***************
*** 10556,10571 ****
void gpointer_unset(t_gpointer *gp)
{
! t_gstub *gs;
! if (gs = gp->gp_stub)
! {
! gstub_dis(gs);
! gp->gp_stub = 0;
! }
}
void gpointer_setglist(t_gpointer *gp, t_glist *glist, t_scalar *x)
{
! t_gstub *gs;
! if (gs = gp->gp_stub) gstub_dis(gs);
gp->gp_stub = gs = glist->gl_stub;
gp->gp_valid = glist->gl_valid;
--- 10552,10563 ----
void gpointer_unset(t_gpointer *gp)
{
! t_gstub *gs = gp->gp_stub;
! if (gs) {gstub_dis(gs); gp->gp_stub = 0;}
}
void gpointer_setglist(t_gpointer *gp, t_glist *glist, t_scalar *x)
{
! t_gstub *gs = gp->gp_stub;
! if (gs) gstub_dis(gs);
gp->gp_stub = gs = glist->gl_stub;
gp->gp_valid = glist->gl_valid;
***************
*** 10576,10581 ****
static void gpointer_setarray(t_gpointer *gp, t_array *array, t_word *w)
{
! t_gstub *gs;
! if (gs = gp->gp_stub) gstub_dis(gs);
gp->gp_stub = gs = array->a_stub;
gp->gp_valid = array->a_valid;
--- 10568,10573 ----
static void gpointer_setarray(t_gpointer *gp, t_array *array, t_word *w)
{
! t_gstub *gs = gp->gp_stub;
! if (gs) gstub_dis(gs);
gp->gp_stub = gs = array->a_stub;
gp->gp_valid = array->a_valid;
***************
*** 11766,11770 ****
}
if (!x) x = (t_text *)pd_new(text_class);
! sys_vgui("global _ focus; set _(%x:canvas) %lx; set focus(objname) {%.*s}\n",(long)x,(long)gl,s);
//sys_vgui("global _; set _(%x:canvas) %lx\n",(long)x,(long)gl);
x->te_binbuf = b;
--- 11758,11763 ----
}
if (!x) x = (t_text *)pd_new(text_class);
! sys_vgui("global _ focus; set _(%lx:canvas) %lx; set focus(objname) {%.*s}\n",(long)x,(long)gl,n,s);
! //sys_vgui("global _ focus; set _(%x:canvas) %lx; set focus(objname) {%.*s}\n",(long)x,(long)gl,s);
//sys_vgui("global _; set _(%x:canvas) %lx\n",(long)x,(long)gl);
x->te_binbuf = b;
***************
*** 12449,12454 ****
}
! #define NEXT p=va_arg(val,void*); fprintf(stderr,"p=%p\n",p);
! static int pd_scanargs(int argc, t_atom *argv, char *fmt, va_list val) {
int i=0;
int optional=0;
--- 12442,12447 ----
}
! #define NEXT p=va_arg(val,void*); /*fprintf(stderr,"p=%p\n",p);*/
! int pd_vscanargs(int argc, t_atom *argv, char *fmt, va_list val) {
int i=0;
int optional=0;
***************
*** 12468,12478 ****
break1:
for (i=0; i<argc; i++) {
- fprintf(stderr,"%d: %d, %p\n", i, argv[i].a_type, argv[i].a_w.w_gpointer);
- }
- for (i=0; i<argc; i++) {
void *p;
char bof[666];
atom_string(argv+i,bof,666);
! fprintf(stderr,"%d: %s\n",i,bof);
switch (fmt[i]) {
case '*': case ';': goto break2;
--- 12461,12468 ----
break1:
for (i=0; i<argc; i++) {
void *p;
char bof[666];
atom_string(argv+i,bof,666);
! /*fprintf(stderr,"%d: %s\n",i,bof);*/
switch (fmt[i]) {
case '*': case ';': goto break2;
***************
*** 12512,12516 ****
into each struct...
*/
! static int pd_saveargs(t_binbuf *b, char *fmt, va_list val) {
int i=0;
t_atom a;
--- 12502,12506 ----
into each struct...
*/
! int pd_vsaveargs(t_binbuf *b, char *fmt, va_list val) {
int i=0;
t_atom a;
***************
*** 12540,12543 ****
--- 12530,12551 ----
}
+ int pd_scanargs(int argc, t_atom *argv, char *fmt, ...) {
+ int i;
+ va_list val;
+ va_start(val,fmt);
+ i=pd_vscanargs(argc,argv,fmt,val);
+ va_end(val);
+ return i;
+ }
+
+ int pd_saveargs(t_binbuf *b, char *fmt, ...) {
+ int i;
+ va_list val;
+ va_start(val,fmt);
+ i=pd_vsaveargs(b,fmt,val);
+ va_end(val);
+ return i;
+ }
+
int pd_pickle(t_foo *foo, char *fmt, ...) {
va_list val;
***************
*** 12571,12578 ****
binbuf_gettext(buf,&s,&n);
sys_vgui("update_object %x {%.*s}\n", (unsigned)self,n,s);
! //sys_mgui(self,"inlets=","i", obj_ninlets((t_text *)self));
! //sys_mgui(self,"outlets=","i",obj_noutlets((t_text *)self));
! sys_vgui("%lx ninlets= %d\n", self, obj_ninlets((t_text *)self));
! sys_vgui("%lx noutlets= %d\n", self, obj_noutlets((t_text *)self));
binbuf_free(buf);
free(s);
--- 12579,12586 ----
binbuf_gettext(buf,&s,&n);
sys_vgui("update_object %x {%.*s}\n", (unsigned)self,n,s);
! //sys_mgui(self,"ninlets=","i", obj_ninlets((t_text *)self));
! //sys_mgui(self,"noutlets=","i",obj_noutlets((t_text *)self));
! sys_vgui("%lx ninlets= %d\n", (long)self, obj_ninlets((t_text *)self));
! sys_vgui("%lx noutlets= %d\n", (long)self, obj_noutlets((t_text *)self));
binbuf_free(buf);
free(s);
More information about the Pd-cvs
mailing list