[PD-cvs] pd/src kernel.c,1.1.2.81,1.1.2.82

Mathieu Bouchard matju at users.sourceforge.net
Thu Aug 9 09:18:19 CEST 2007


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

Modified Files:
      Tag: desiredata
	kernel.c 
Log Message:
added error messages in obj_disconnect


Index: kernel.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v
retrieving revision 1.1.2.81
retrieving revision 1.1.2.82
diff -C2 -d -r1.1.2.81 -r1.1.2.82
*** kernel.c	7 Aug 2007 17:21:19 -0000	1.1.2.81
--- kernel.c	9 Aug 2007 07:18:17 -0000	1.1.2.82
***************
*** 693,701 ****
  
  void obj_disconnect(t_object *from, int outlet, t_object *to, int inlet) {
!     t_outlet *o = find_outlet(from,outlet);
!     t_pd *i     =  find_inlet(to,inlet);
!     if (!o||!i) return;
      t_outconnect *oc = o->connections, *oc2;
!     if (!oc) return;
      if (oc->oc_to == i) {
          o->connections = oc->next;
--- 693,700 ----
  
  void obj_disconnect(t_object *from, int outlet, t_object *to, int inlet) {
!     t_outlet *o = find_outlet(from,outlet); if (!o) {post("outlet does not exist"); return;}
!     t_pd *i     =  find_inlet(to,   inlet); if (!i) {post( "inlet does not exist"); return;}
      t_outconnect *oc = o->connections, *oc2;
!     if (!oc) {post("outlet has no connections"); return;}
      if (oc->oc_to == i) {
          o->connections = oc->next;
***************
*** 711,714 ****
--- 710,714 ----
          oc = oc2;
      }
+     post("connection not found");
  done:
      if (o->sym == &s_signal) canvas_update_dsp();





More information about the Pd-cvs mailing list