[Gridflow-cvs] [svn] commit: r3503 - /trunk/base/flow_objects.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Mon Apr 14 21:29:37 EDT 2008


Author: matju
Date: Mon Apr 14 21:29:36 2008
New Revision: 3503

Log:
fix [listfind]

Modified:
    trunk/base/flow_objects.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Mon Apr 14 21:29:36 2008
@@ -2460,6 +2460,7 @@
 	\decl 0 list(...);
 	\decl 1 list(...);
 	\decl 0 float(float f);
+	\decl 0 symbol(t_symbol *s);
 };
 \def void initialize(...) {_1_list(argc,argv);}
 \def 1 list (...) {
@@ -2472,14 +2473,17 @@
 	t_atom a[1];
 	if (argc<1) RAISE("empty input");
 	ruby2pd(1,argv,at);
-	int i=0;
-	for (; i<ac; i++) if (atom_eq(at[i],*a)) break;
+	int i=0; for (; i<ac; i++) if (atom_eq(at[i],*a)) break;
 	outlet_float(bself->out[0],i==ac?-1:i);
 }
 \def 0 float (float f) {
 	t_atom a[1]; SETFLOAT(a,f);
-	int i=0;
-	for (; i<ac; i++) if (atom_eq(at[i],*a)) break;
+	int i=0; for (; i<ac; i++) if (atom_eq(at[i],*a)) break;
+	outlet_float(bself->out[0],i==ac?-1:i);
+}
+\def 0 symbol (t_symbol *s) {
+	t_atom a[1]; SETSYMBOL(a,s);
+	int i=0; for (; i<ac; i++) if (atom_eq(at[i],*a)) break;
 	outlet_float(bself->out[0],i==ac?-1:i);
 }
 //doc:_1_list,"list to search into"



More information about the Gridflow-cvs mailing list