aboutsummaryrefslogtreecommitdiff
path: root/control
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2003-09-18 11:27:02 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2003-09-18 11:27:02 +0000
commit791b9c638aa9a38517206328d6d54f46df465d44 (patch)
tree0d97549bebaa03ac3169577aec7d73d89b605740 /control
parentad378ef9774ccabc4fc7fae6e2e8b131193833a3 (diff)
added static tmp string
svn path=/trunk/externals/ggee/; revision=1009
Diffstat (limited to 'control')
-rwxr-xr-xcontrol/concat.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/control/concat.c b/control/concat.c
index 502705d..2a8cc16 100755
--- a/control/concat.c
+++ b/control/concat.c
@@ -17,31 +17,22 @@ typedef struct _concat
t_symbol* x_sym;
} t_concat;
+static char tsym[2048];
void concat_float(t_concat *x,t_float f)
{
- char* nsym;
- int len = (12+strlen(x->x_sym));
- nsym = getbytes(len);
+ sprintf(tsym,"%g",f);
+ strcat(tsym,x->x_sym->s_name);
- sprintf(nsym,"%g",f);
- strcat(nsym,x->x_sym->s_name);
-
- outlet_symbol(x->x_obj.ob_outlet,gensym(nsym));
- freebytes(nsym,len);
+ outlet_symbol(x->x_obj.ob_outlet,gensym(tsym));
}
void concat_symbol(t_concat *x,t_symbol* s)
{
- char* nsym;
- int len = (strlen(s->s_name)+strlen(x->x_sym));
- nsym = getbytes(len);
-
- strcpy(nsym,s->s_name);
- strcat(nsym,x->x_sym->s_name);
+ strcpy(tsym,s->s_name);
+ strcat(tsym,x->x_sym->s_name);
- outlet_symbol(x->x_obj.ob_outlet,gensym(nsym));
- freebytes(nsym,len);
+ outlet_symbol(x->x_obj.ob_outlet,gensym(tsym));
}
@@ -51,6 +42,7 @@ static void *concat_new(t_symbol* s)
outlet_new(&x->x_obj,&s_float);
symbolinlet_new(&x->x_obj, &x->x_sym);
x->x_sym = s;
+ *tsym = 0;
return (x);
}