[PD-cvs] pd/src m_conf.c, 1.1.1.3.12.4, 1.1.1.3.12.5 m_hash.c, 1.1.2.4, 1.1.2.5 m_obj.c, 1.2.4.3.2.5, 1.2.4.3.2.6

Mathieu Bouchard matju at users.sourceforge.net
Sun Apr 23 08:48:33 CEST 2006


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

Modified Files:
      Tag: devel_0_39
	m_conf.c m_hash.c m_obj.c 
Log Message:
now patchcords are sort of objects too
(t_outconnect is a subclass of t_pd)


Index: m_hash.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/m_hash.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** m_hash.c	22 Apr 2006 01:33:15 -0000	1.1.2.4
--- m_hash.c	23 Apr 2006 06:48:31 -0000	1.1.2.5
***************
*** 35,38 ****
--- 35,43 ----
  }
  
+ void hash_free(t_hash *self) {
+ 	free(self->tab);
+ 	free(self);
+ }
+ 
  long hash_size(t_hash *self) {return self->size;}
  void hash_start(t_hash *self) {self->i=0; self->next=0;}

Index: m_conf.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_conf.c,v
retrieving revision 1.1.1.3.12.4
retrieving revision 1.1.1.3.12.5
diff -C2 -d -r1.1.1.3.12.4 -r1.1.1.3.12.5
*** m_conf.c	24 Sep 2005 02:19:56 -0000	1.1.1.3.12.4
--- m_conf.c	23 Apr 2006 06:48:31 -0000	1.1.1.3.12.5
***************
*** 15,18 ****
--- 15,19 ----
  #ifdef DESIRE
      S(desire)
+     S(m_obj)
  #else
      S(g_bang) S(g_hradio) S(g_hslider) S(g_mycanvas) S(g_numbox)
***************
*** 31,34 ****
--- 32,44 ----
  void conf_init(void) {
  #ifdef DESIRE
+     S(m_obj)
+ #endif
+     S(m_pd) S(x_acoustics) S(x_interface) S(x_connective)
+     S(x_time) S(x_arithmetic) S(x_midi) S(x_misc) S(x_net) S(x_qlist)
+     S(x_gui) S(x_list) S(d_arithmetic) S(d_array) S(d_ctl) S(d_dac)
+     S(d_delay) S(d_fft) S(d_filter) S(d_global)
+     S(d_math) S(d_misc) S(d_osc) S(d_soundfile) S(d_ugen)
+ 
+ #ifdef DESIRE
      S(desire)
  #else
***************
*** 38,45 ****
      S(g_traversal)
  #endif
-     S(m_pd) S(x_acoustics) S(x_interface) S(x_connective)
-     S(x_time) S(x_arithmetic) S(x_midi) S(x_misc) S(x_net) S(x_qlist)
-     S(x_gui) S(x_list) S(d_arithmetic) S(d_array) S(d_ctl) S(d_dac)
-     S(d_delay) S(d_fft) S(d_filter) S(d_global)
-     S(d_math) S(d_misc) S(d_osc) S(d_soundfile) S(d_ugen)
  }
--- 48,50 ----

Index: m_obj.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_obj.c,v
retrieving revision 1.2.4.3.2.5
retrieving revision 1.2.4.3.2.6
diff -C2 -d -r1.2.4.3.2.5 -r1.2.4.3.2.6
*** m_obj.c	30 Nov 2005 13:36:58 -0000	1.2.4.3.2.5
--- m_obj.c	23 Apr 2006 06:48:31 -0000	1.2.4.3.2.6
***************
*** 338,343 ****
--- 338,347 ----
  struct _outconnect
  {
+ #ifdef DESIRE
+     t_gobj oc_gobj;
+ #endif
      struct _outconnect *oc_next;
      t_pd *oc_to;
+     t_hash *oc_visual;
  };
  
***************
*** 350,353 ****
--- 354,376 ----
  };
  
+ #ifdef DESIRE
+ typedef struct _outconnect t_wire;
+ t_class *wire_class;
+ t_wire *wire_new (t_symbol *s, int argc, t_atom *argv) {
+     t_wire *self = (t_wire *)pd_new(wire_class);
+     self->oc_gobj.g_adix = appendix_new((t_gobj *)self);
+     self->oc_visual = hash_new(1);
+     return self;
+ }
+ void wire_free (t_wire *self) {
+ 	hash_free(self->oc_visual);
+ 	pd_free((t_pd *)self);
+ }
+ void m_obj_setup(void) {
+     wire_class = class_new(gensym("__wire"), (t_newmethod)wire_new,
+ 	(t_method)wire_free, sizeof(t_wire), CLASS_GOBJ, A_GIMME, 0);
+ }
+ #endif
+ 
  t_outlet *outlet_new(t_object *owner, t_symbol *s)
  {
***************
*** 536,540 ****
--- 559,567 ----
      to = &i->i_pd;
  doit:
+ #ifdef DESIRE
+     oc = wire_new(0,0,0);
+ #else
      oc = (t_outconnect *)t_getbytes(sizeof(*oc));
+ #endif
      oc->oc_next = 0;
      oc->oc_to = to;





More information about the Pd-cvs mailing list