[PD-cvs] externals/miXed/shared/unstable fragile.c,1.3,1.4 fragile.h,1.2,1.3

krzyszcz at users.sourceforge.net krzyszcz at users.sourceforge.net
Thu Feb 19 23:23:20 CET 2004


Update of /cvsroot/pure-data/externals/miXed/shared/unstable
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15203/shared/unstable

Modified Files:
	fragile.c fragile.h 
Log Message:
many small improvements in toxy, plustot added

Index: fragile.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/shared/unstable/fragile.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** fragile.c	19 Sep 2003 12:19:32 -0000	1.3
--- fragile.c	19 Feb 2004 22:23:17 -0000	1.4
***************
*** 7,10 ****
--- 7,11 ----
  #include <string.h>
  #include "m_pd.h"
+ #include "common/loud.h"
  #include "unstable/pd_imp.h"
  #include "unstable/fragile.h"
***************
*** 69,72 ****
--- 70,128 ----
  }
  
+ t_outconnect *fragile_outlet_nextconnection(t_outconnect *last,
+ 					    t_object **destp, int *innop)
+ {
+     t_inlet *dummy;
+     return (obj_nexttraverseoutlet(last, destp, &dummy, innop));
+ }
+ 
+ /* silent, if caller is empty */
+ t_object *fragile_outlet_destination(t_outlet *op,
+ 				     int ntypes, t_symbol **types,
+ 				     t_pd *caller, char *errand)
+ {
+     t_object *booty = 0;
+     t_symbol *badtype = 0;
+     int count = 0;
+     t_outconnect *tobooty = fragile_outlet_connections(op);
+     while (tobooty)
+     {
+ 	t_object *ob;
+ 	int inno;
+ 	count++;
+ 	tobooty = fragile_outlet_nextconnection(tobooty, &ob, &inno);
+ 	if (ob && inno == 0)
+ 	{
+ 	    /* LATER ask for class_getname()'s symbol version */
+ 	    t_symbol **tp, *dsttype = gensym(class_getname(*(t_pd *)ob));
+ 	    int i;
+ 	    for (i = 0, tp = types; i < ntypes; i++, tp++)
+ 	    {
+ 		if (*tp == dsttype)
+ 		{
+ 		    booty = ob;
+ 		    break;
+ 		}
+ 		else badtype = dsttype;
+ 	    }
+ 	}
+     }
+     if (booty)
+     {
+ 	if (count > 1 && caller)
+ 	    loud_warning(caller, "multiple targets");
+     }
+     else if (caller)
+     {
+ 	if (badtype)
+ 	    loud_error(caller, "bad target type '%s'", badtype->s_name);
+ 	else
+ 	    loud_error(caller, "no target");
+ 	if (errand)
+ 	    loud_errand(caller, errand);
+     }
+     return (booty);
+ }
+ 
  /* These are local to m_obj.c. */
  union inletunion

Index: fragile.h
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/shared/unstable/fragile.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** fragile.h	14 Aug 2003 14:26:06 -0000	1.2
--- fragile.h	19 Feb 2004 22:23:17 -0000	1.3
***************
*** 10,13 ****
--- 10,18 ----
  t_glist *fragile_garray_glist(void *arr);
  t_outconnect *fragile_outlet_connections(t_outlet *o);
+ t_outconnect *fragile_outlet_nextconnection(t_outconnect *last,
+ 					    t_object **destp, int *innop);
+ t_object *fragile_outlet_destination(t_outlet *op,
+ 				     int ntypes, t_symbol **types,
+ 				     t_pd *caller, char *errand);
  t_sample *fragile_inlet_signalscalar(t_inlet *i);
  





More information about the Pd-cvs mailing list