[PD-cvs] pd/src desire.c, 1.1.2.217.2.91, 1.1.2.217.2.92 desire.h, 1.1.2.49.2.14, 1.1.2.49.2.15

Mathieu Bouchard matju at users.sourceforge.net
Wed Dec 27 00:37:22 CET 2006


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31382

Modified Files:
      Tag: desiredata
	desire.c desire.h 
Log Message:
in t_template, "t_list" renamed to just "list".


Index: desire.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.h,v
retrieving revision 1.1.2.49.2.14
retrieving revision 1.1.2.49.2.15
diff -C2 -d -r1.1.2.49.2.14 -r1.1.2.49.2.15
*** desire.h	20 Dec 2006 10:28:07 -0000	1.1.2.49.2.14
--- desire.h	26 Dec 2006 23:37:20 -0000	1.1.2.49.2.15
***************
*** 63,66 ****
--- 63,67 ----
  typedef void (*t_floatmethod)  (t_pd *x, t_float f);
  typedef void (*t_symbolmethod) (t_pd *x, t_symbol *s);
+ typedef void (*t_stringmethod) (t_pd *x, t_string *s);
  typedef void (*t_listmethod)   (t_pd *x, t_symbol *s, int argc, t_atom *argv);
  typedef void (*t_anymethod)    (t_pd *x, t_symbol *s, int argc, t_atom *argv);
***************
*** 80,84 ****
      t_pointermethod c_pointermethod;
      t_floatmethod   c_floatmethod;
!     t_symbolmethod  c_symbolmethod;
      t_listmethod    c_listmethod;
      t_anymethod     c_anymethod;
--- 81,85 ----
      t_pointermethod c_pointermethod;
      t_floatmethod   c_floatmethod;
!     t_symbolmethod  c_symbolmethod; /* or t_stringmethod, but C doesn't have anonymous unions */
      t_listmethod    c_listmethod;
      t_anymethod     c_anymethod;
***************
*** 194,198 ****
      t_pd t_pdobj;               /* header */
  #endif
!     t_gtemplate *t_list;  /* list of "struct"/gtemplate objects */
      t_symbol *sym;            /* name */
      int n;                    /* number of dataslots (fields) */
--- 195,199 ----
      t_pd t_pdobj;               /* header */
  #endif
!     t_gtemplate *list;  /* list of "struct"/gtemplate objects */
      t_symbol *sym;            /* name */
      int n;                    /* number of dataslots (fields) */

Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.91
retrieving revision 1.1.2.217.2.92
diff -C2 -d -r1.1.2.217.2.91 -r1.1.2.217.2.92
*** desire.c	20 Dec 2006 10:10:35 -0000	1.1.2.217.2.91
--- desire.c	26 Dec 2006 23:37:18 -0000	1.1.2.217.2.92
***************
*** 4112,4116 ****
      t_gtemplate *gt;
      if (!t) bug("template_findcanvas");
!     if (!(gt = t->t_list)) return 0;
      return gt->owner;
      /* return ((t_canvas *)pd_findbyclass(t->sym, canvas_class)); */
--- 4112,4116 ----
      t_gtemplate *gt;
      if (!t) bug("template_findcanvas");
!     if (!(gt = t->list)) return 0;
      return gt->owner;
      /* return ((t_canvas *)pd_findbyclass(t->sym, canvas_class)); */
***************
*** 4118,4122 ****
  
  void template_notify(t_template *t, t_symbol *s, int argc, t_atom *argv) {
!     if (t->t_list) outlet_anything(t->t_list->ob_outlet, s, argc, argv);
  }
  
--- 4118,4122 ----
  
  void template_notify(t_template *t, t_symbol *s, int argc, t_atom *argv) {
!     if (t->list) outlet_anything(t->list->ob_outlet, s, argc, argv);
  }
  
***************
*** 4149,4153 ****
          /* If the new template is the same as the old one, there's nothing to do.  */
          if (!template_match(x, y)) { /* Are there "struct" objects upholding this template? */
!             if (x->t_list) {
                  pd_error(x,"%s: template mismatch", templatesym->s_name);
              } else {
--- 4149,4153 ----
          /* If the new template is the same as the old one, there's nothing to do.  */
          if (!template_match(x, y)) { /* Are there "struct" objects upholding this template? */
!             if (x->list) {
                  pd_error(x,"%s: template mismatch", templatesym->s_name);
              } else {
***************
*** 4155,4159 ****
                  pd_free(x);
                  t_template *y2 = template_new(templatesym, argc, argv);
!                 y2->t_list = 0;
              }
          }
--- 4155,4159 ----
                  pd_free(x);
                  t_template *y2 = template_new(templatesym, argc, argv);
!                 y2->list = 0;
              }
          }
***************
*** 4193,4199 ****
          /* if it's already got a "struct" object we
             just tack this one to the end of the list and leave it there. */
!         if (t->t_list) {
              t_gtemplate *x2, *x3;
!             for (x2 = x->t->t_list; (x3 = x2->next); x2 = x3) {}
              x2->next = x;
              post("template %s: warning: already exists.", sym->s_name);
--- 4193,4199 ----
          /* if it's already got a "struct" object we
             just tack this one to the end of the list and leave it there. */
!         if (t->list) {
              t_gtemplate *x2, *x3;
!             for (x2 = x->t->list; (x3 = x2->next); x2 = x3) {}
              x2->next = x;
              post("template %s: warning: already exists.", sym->s_name);
***************
*** 4210,4214 ****
              }
              pd_free(y);
!             t->t_list = x;
              canvas_redrawallfortemplate(t, 1);
          }
--- 4210,4214 ----
              }
              pd_free(y);
!             t->list = x;
              canvas_redrawallfortemplate(t, 1);
          }
***************
*** 4216,4220 ****
          /* otherwise make a new one and we're the only struct on it. */
          x->t = t = template_new(sym, argc, argv);
!         t->t_list = x;
      }
      outlet_new(x,0);
--- 4216,4220 ----
          /* otherwise make a new one and we're the only struct on it. */
          x->t = t = template_new(sym, argc, argv);
!         t->list = x;
      }
      outlet_new(x,0);
***************
*** 4244,4248 ****
      /* get off the template's list */
      t_template *t = x->t;
!     if (x == t->t_list) {
          canvas_redrawallfortemplate(t, 2);
          if (x->next) {
--- 4244,4248 ----
      /* get off the template's list */
      t_template *t = x->t;
!     if (x == t->list) {
          canvas_redrawallfortemplate(t, 2);
          if (x->next) {
***************
*** 4255,4265 ****
              pd_free(z);
              z = template_new(x->sym, x->next->argc, x->next->argv);
!             z->t_list = x->next;
!             for (t_gtemplate *y=z->t_list; y ; y=y->next) y->t=z;
!         } else t->t_list = 0;
          canvas_redrawallfortemplate(t, 1);
      } else {
          t_gtemplate *x2, *x3;
!         for (x2=t->t_list; (x3=x2->next); x2=x3) if (x==x3) {x2->next=x3->next; break;}
      }
      freebytes(x->argv, sizeof(t_atom) * x->argc);
--- 4255,4265 ----
              pd_free(z);
              z = template_new(x->sym, x->next->argc, x->next->argv);
!             z->list = x->next;
!             for (t_gtemplate *y=z->list; y ; y=y->next) y->t=z;
!         } else t->list = 0;
          canvas_redrawallfortemplate(t, 1);
      } else {
          t_gtemplate *x2, *x3;
!         for (x2=t->list; (x3=x2->next); x2=x3) if (x==x3) {x2->next=x3->next; break;}
      }
      freebytes(x->argv, sizeof(t_atom) * x->argc);





More information about the Pd-cvs mailing list