[PD-cvs] pd/src x_arithmetic.c, 1.2.10.1, 1.2.10.2 x_connective.c, 1.3.4.1.2.10.2.2, 1.3.4.1.2.10.2.3

Mathieu Bouchard matju at users.sourceforge.net
Fri Dec 8 07:45:09 CET 2006


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

Modified Files:
      Tag: desiredata
	x_arithmetic.c x_connective.c 
Log Message:
0.40


Index: x_arithmetic.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_arithmetic.c,v
retrieving revision 1.2.10.1
retrieving revision 1.2.10.2
diff -C2 -d -r1.2.10.1 -r1.2.10.2
*** x_arithmetic.c	8 Dec 2006 06:35:17 -0000	1.2.10.1
--- x_arithmetic.c	8 Dec 2006 06:45:07 -0000	1.2.10.2
***************
*** 672,675 ****
--- 672,676 ----
      float x_f1;
      float x_f2;
+     float x_f3;
  } t_clip;
  
***************
*** 677,692 ****
  {
      t_clip *x = (t_clip *)pd_new(clip_class);
-     floatinlet_new(&x->x_ob, &x->x_f1);
      floatinlet_new(&x->x_ob, &x->x_f2);
      outlet_new(&x->x_ob, &s_float);
!     x->x_f1 = f1;
!     x->x_f2 = f2;
      return (x);
  }
  
  static void clip_float(t_clip *x, t_float f)
  {
!     outlet_float(x->x_ob.ob_outlet, (f < x->x_f1 ? x->x_f1 : (
!         f > x->x_f2 ? x->x_f2 : f)));
  }
  
--- 678,700 ----
  {
      t_clip *x = (t_clip *)pd_new(clip_class);
      floatinlet_new(&x->x_ob, &x->x_f2);
+     floatinlet_new(&x->x_ob, &x->x_f3);
      outlet_new(&x->x_ob, &s_float);
!     x->x_f2 = f1;
!     x->x_f3 = f2;
      return (x);
  }
  
+ static void clip_bang(t_clip *x)
+ {
+         outlet_float(x->x_ob.ob_outlet, (x->x_f1 < x->x_f2 ? x->x_f2 : (
+         x->x_f1 > x->x_f3 ? x->x_f3 : x->x_f1)));
+ }
+ 
  static void clip_float(t_clip *x, t_float f)
  {
!         x->x_f1 = f;
!         outlet_float(x->x_ob.ob_outlet, (x->x_f1 < x->x_f2 ? x->x_f2 : (
!         x->x_f1 > x->x_f3 ? x->x_f3 : x->x_f1)));
  }
  
***************
*** 696,699 ****
--- 704,708 ----
          sizeof(t_clip), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
      class_addfloat(clip_class, clip_float);
+     class_addbang(clip_class, clip_bang);
  }
  

Index: x_connective.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/x_connective.c,v
retrieving revision 1.3.4.1.2.10.2.2
retrieving revision 1.3.4.1.2.10.2.3
diff -C2 -d -r1.3.4.1.2.10.2.2 -r1.3.4.1.2.10.2.3
*** x_connective.c	5 Dec 2006 23:38:22 -0000	1.3.4.1.2.10.2.2
--- x_connective.c	8 Dec 2006 06:45:07 -0000	1.3.4.1.2.10.2.3
***************
*** 235,238 ****
--- 235,240 ----
  {
      t_send *x = (t_send *)pd_new(send_class);
+     if (!*s->s_name)
+         symbolinlet_new(&x->x_obj, &x->x_sym);
      x->x_sym = s;
      return (x);





More information about the Pd-cvs mailing list