aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2003-06-03 12:59:11 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2003-06-03 12:59:11 +0000
commitac8636feaf3c1106e4c6ddd0abd2ef3aa3c8eb5b (patch)
treee749775a6b945168af5899f43ccdbd736a876c44
parent8947f14211034e9d3598f9bfd24dccae8cb9d8d4 (diff)
incorporated patch from Orm Finnendahl <finnendahl@folkwang-hochschule.de>, fixed float and list handling
svn path=/trunk/externals/ggee/; revision=674
-rwxr-xr-xcontrol/prepend.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/control/prepend.c b/control/prepend.c
index f2fc4af..7b5bb0f 100755
--- a/control/prepend.c
+++ b/control/prepend.c
@@ -27,18 +27,20 @@ void prepend_anything(t_prepend *x,t_symbol* s,t_int argc,t_atom* argv)
int c_out = 0;
t_atom* a = a_out;
-#if 1
- SETSYMBOL(a,s);
- a++;
- c_out++;
-#endif
+ if (argv->a_type == A_SYMBOL) {
+ SETSYMBOL(a,s);
+ a++;
+ c_out++;
+ }
+
while (i--) {
switch( argv->a_type) {
case A_FLOAT:
- post("%f",atom_getfloat(argv));
+ SETFLOAT(a,atom_getfloat(argv));
+ a++;
+ c_out++;
break;
case A_SYMBOL:
- post("%s",atom_getsymbol(argv)->s_name);
SETSYMBOL(a,atom_getsymbol(argv));
a++;
c_out++;
@@ -48,9 +50,7 @@ void prepend_anything(t_prepend *x,t_symbol* s,t_int argc,t_atom* argv)
}
argv++;
}
-
- outlet_list(x->x_obj.ob_outlet,x->x_s,c_out,(t_atom*)&a_out);
- post("done");
+ outlet_anything(x->x_obj.ob_outlet,x->x_s,c_out,(t_atom*)&a_out);
}
static void *prepend_new(t_symbol* s)
@@ -59,8 +59,10 @@ static void *prepend_new(t_symbol* s)
outlet_new(&x->x_obj, &s_float);
if (s != &s_)
x->x_s = s;
- else
+ else {
x->x_s = gensym("prepend");
+ error("prepend needs symbol argument");
+ }
return (x);
}