[PD-cvs] pd/src desire.c, 1.1.2.217.2.100, 1.1.2.217.2.101 m_pd.h, 1.4.4.11.2.33.2.21, 1.4.4.11.2.33.2.22

Mathieu Bouchard matju at users.sourceforge.net
Wed Jan 3 03:03:23 CET 2007


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

Modified Files:
      Tag: desiredata
	desire.c m_pd.h 
Log Message:
GP_GLIST renamed to GP_CANVAS


Index: m_pd.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v
retrieving revision 1.4.4.11.2.33.2.21
retrieving revision 1.4.4.11.2.33.2.22
diff -C2 -d -r1.4.4.11.2.33.2.21 -r1.4.4.11.2.33.2.22
*** m_pd.h	31 Dec 2006 19:21:40 -0000	1.4.4.11.2.33.2.21
--- m_pd.h	3 Jan 2007 02:03:21 -0000	1.4.4.11.2.33.2.22
***************
*** 96,100 ****
  
  #define GP_NONE 0       /* the stub points nowhere (has been cut off) */
! #define GP_GLIST 1      /* the stub points to a glist element */
  #define GP_ARRAY 2      /* ... or array */
  
--- 96,101 ----
  
  #define GP_NONE 0       /* the stub points nowhere (has been cut off) */
! #define GP_CANVAS 1     /* the stub points to a glist element */
! #define GP_GLIST 1
  #define GP_ARRAY 2      /* ... or array */
  

Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.100
retrieving revision 1.1.2.217.2.101
diff -C2 -d -r1.1.2.217.2.100 -r1.1.2.217.2.101
*** desire.c	31 Dec 2006 19:21:38 -0000	1.1.2.217.2.100
--- desire.c	3 Jan 2007 02:03:18 -0000	1.1.2.217.2.101
***************
*** 5067,5071 ****
  t_gstub *gstub_new(t_canvas *gl, t_array *a) {
      t_gstub *gs = (t_gstub *)getbytes(sizeof(*gs));
!     if (gl) {gs->gs_which = GP_GLIST; gs->gs_un.gs_glist = gl;}
      else    {gs->gs_which = GP_ARRAY; gs->gs_un.gs_array = a;}
      gs->gs_refcount = 0;
--- 5067,5071 ----
  t_gstub *gstub_new(t_canvas *gl, t_array *a) {
      t_gstub *gs = (t_gstub *)getbytes(sizeof(*gs));
!     if (gl) {gs->gs_which = GP_CANVAS; gs->gs_un.gs_glist = gl;}
      else    {gs->gs_which = GP_ARRAY; gs->gs_un.gs_array = a;}
      gs->gs_refcount = 0;
***************
*** 5100,5104 ****
      if (!gs) return 0;
      if (gs->gs_which == GP_ARRAY) return gs->gs_un.gs_array->valid == gp->gp_valid;
!     if (gs->gs_which == GP_GLIST) {
          if (!headok && !gp->gp_un.gp_scalar) return 0;
          if (gs->gs_un.gs_glist->valid != gp->gp_valid) return 0;
--- 5100,5104 ----
      if (!gs) return 0;
      if (gs->gs_which == GP_ARRAY) return gs->gs_un.gs_array->valid == gp->gp_valid;
!     if (gs->gs_which == GP_CANVAS) {
          if (!headok && !gp->gp_un.gp_scalar) return 0;
          if (gs->gs_un.gs_glist->valid != gp->gp_valid) return 0;
***************
*** 5111,5115 ****
  static t_symbol *gpointer_gettemplatesym(const t_gpointer *gp) {
      t_gstub *gs = gp->gp_stub;
!     if (gs->gs_which == GP_GLIST) {t_scalar *sc = gp->gp_un.gp_scalar; return sc ? sc->t : 0;}
      else                          {t_array   *a = gs->gs_un.gs_array;  return a->templatesym;}
  }
--- 5111,5115 ----
  static t_symbol *gpointer_gettemplatesym(const t_gpointer *gp) {
      t_gstub *gs = gp->gp_stub;
!     if (gs->gs_which == GP_CANVAS) {t_scalar *sc = gp->gp_un.gp_scalar; return sc ? sc->t : 0;}
      else                          {t_array   *a = gs->gs_un.gs_array;  return a->templatesym;}
  }
***************
*** 5193,5197 ****
  
      if (!gs) {pd_error(x, "next: no current pointer"); return;}
!     if (gs->gs_which != GP_GLIST) {pd_error(x, "next: lists only, not arrays"); return;}
      canvas = gs->gs_un.gs_glist;
      if (canvas->valid != gp->gp_valid) {pd_error(x, "next: stale pointer"); return;}
--- 5193,5197 ----
  
      if (!gs) {pd_error(x, "next: no current pointer"); return;}
!     if (gs->gs_which != GP_CANVAS) {pd_error(x, "next: lists only, not arrays"); return;}
      canvas = gs->gs_un.gs_glist;
      if (canvas->valid != gp->gp_valid) {pd_error(x, "next: stale pointer"); return;}
***************
*** 5221,5225 ****
      if (!gpointer_check(&x->gp, 1)) {pd_error(x, "bang: empty pointer"); return;}
      gs = x->gp.gp_stub;
!     if (gs->gs_which == GP_GLIST) canvas = gs->gs_un.gs_glist;
      else {
          t_array *owner_array = gs->gs_un.gs_array;
--- 5221,5225 ----
      if (!gpointer_check(&x->gp, 1)) {pd_error(x, "bang: empty pointer"); return;}
      gs = x->gp.gp_stub;
!     if (gs->gs_which == GP_CANVAS) canvas = gs->gs_un.gs_glist;
      else {
          t_array *owner_array = gs->gs_un.gs_array;
***************
*** 5253,5257 ****
      if (!gpointer_check(&x->gp, 1)) {pd_error(x, "rewind: empty pointer"); return;}
      gs = x->gp.gp_stub;
!     if (gs->gs_which != GP_GLIST) {pd_error(x, "rewind: sorry, unavailable for arrays"); return;}
      canvas = gs->gs_un.gs_glist;
      gpointer_setcanvas(&x->gp, canvas, 0);
--- 5253,5257 ----
      if (!gpointer_check(&x->gp, 1)) {pd_error(x, "rewind: empty pointer"); return;}
      gs = x->gp.gp_stub;
!     if (gs->gs_which != GP_CANVAS) {pd_error(x, "rewind: sorry, unavailable for arrays"); return;}
      canvas = gs->gs_un.gs_glist;
      gpointer_setcanvas(&x->gp, canvas, 0);
***************
*** 5381,5385 ****
           for (int i=0; i<nitems; i++,vp++) template_setsymbol(t, vp->sym, vec, vp->w.w_symbol, 1);
      else for (int i=0; i<nitems; i++,vp++) template_setfloat(t, vp->sym, vec, vp->w.w_float, 1);
!     if (gs->gs_which == GP_GLIST) scalar_redraw(gp->gp_un.gp_scalar, gs->gs_un.gs_glist);
      else {
          t_array *owner_array = gs->gs_un.gs_array;
--- 5381,5385 ----
           for (int i=0; i<nitems; i++,vp++) template_setsymbol(t, vp->sym, vec, vp->w.w_symbol, 1);
      else for (int i=0; i<nitems; i++,vp++) template_setfloat(t, vp->sym, vec, vp->w.w_float, 1);
!     if (gs->gs_which == GP_CANVAS) scalar_redraw(gp->gp_un.gp_scalar, gs->gs_un.gs_glist);
      else {
          t_array *owner_array = gs->gs_un.gs_array;
***************
*** 5557,5561 ****
         but if we belong to an element of another array we have to search back until we get to a
         scalar to erase. When graphics updates become queueable this may fall apart... */
!     if (gs->gs_which == GP_GLIST) {
          if (canvas_isvisible(gs->gs_un.gs_glist)) sys_mgui(gp->gp_un.gp_scalar,"delete","");
      } else {
--- 5557,5561 ----
         but if we belong to an element of another array we have to search back until we get to a
         scalar to erase. When graphics updates become queueable this may fall apart... */
!     if (gs->gs_which == GP_CANVAS) {
          if (canvas_isvisible(gs->gs_un.gs_glist)) sys_mgui(gp->gp_un.gp_scalar,"delete","");
      } else {
***************
*** 5576,5580 ****
          }
      }
!     if (gs->gs_which == GP_GLIST) {
          gobj_changed(gp->gp_un.gp_scalar,0);
      } else {/*is there something missing here?*/
--- 5576,5580 ----
          }
      }
!     if (gs->gs_which == GP_CANVAS) {
          gobj_changed(gp->gp_un.gp_scalar,0);
      } else {/*is there something missing here?*/
***************
*** 5632,5636 ****
      TEMPLATE_CHECK(x,x->templatesym,)
      if (!gs) {pd_error(x, "no current pointer"); return;}
!     if (gs->gs_which != GP_GLIST) {pd_error(x, "lists only, not arrays"); return;}
      t_canvas *canvas = gs->gs_un.gs_glist;
      if (canvas->valid != gp->gp_valid) {pd_error(x, "stale pointer"); return;}
--- 5632,5636 ----
      TEMPLATE_CHECK(x,x->templatesym,)
      if (!gs) {pd_error(x, "no current pointer"); return;}
!     if (gs->gs_which != GP_CANVAS) {pd_error(x, "lists only, not arrays"); return;}
      t_canvas *canvas = gs->gs_un.gs_glist;
      if (canvas->valid != gp->gp_valid) {pd_error(x, "stale pointer"); return;}
***************
*** 6242,6247 ****
      dummy_class = class_new(gensym("dummy"), 0, 0, sizeof(t_text), 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);
--- 6242,6246 ----
      dummy_class = class_new(gensym("dummy"), 0, 0, sizeof(t_text), 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);
***************
*** 6250,6255 ****
      class_addanything(c, mresp_anything);
  
!     c = message_class = class_new(gensym("message"), 0,0,
!     	sizeof(t_message), CLASS_PATCHABLE, 0);
      class_addbang(c, message_bang);
      class_addfloat(c, message_float);
--- 6249,6253 ----
      class_addanything(c, mresp_anything);
  
!     c = message_class = class_new(gensym("message"), 0,0, sizeof(t_message), CLASS_PATCHABLE, 0);
      class_addbang(c, message_bang);
      class_addfloat(c, message_float);
***************
*** 7841,7844 ****
--- 7839,7843 ----
      pd_bind((t_pd *)&maxclass, gensym("max"));
  
+     /* this smells bad... a conflict with [pd] subpatches */
      t_class *c = glob_pdobject = class_new(gensym("pd"), 0, 0, sizeof(t_pd), CLASS_DEFAULT, A_NULL);
  





More information about the Pd-cvs mailing list