aboutsummaryrefslogtreecommitdiff
path: root/cyclone/hammer/prepend.c
diff options
context:
space:
mode:
authorN.N. <krzyszcz@users.sourceforge.net>2005-01-27 14:42:55 +0000
committerN.N. <krzyszcz@users.sourceforge.net>2005-01-27 14:42:55 +0000
commitbfb359fd22e61faaca3a6e49ad3b7a81f2d71551 (patch)
treed070071515c7e7f53073da32046b24855e8307c8 /cyclone/hammer/prepend.c
parent6435314717c5fb8fa062eb682c72c8df095b1be3 (diff)
cyclone alpha52 and toxy alpha15 (see notes.txt for cyclone, toxy and shared)
svn path=/trunk/externals/miXed/; revision=2550
Diffstat (limited to 'cyclone/hammer/prepend.c')
-rw-r--r--cyclone/hammer/prepend.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/cyclone/hammer/prepend.c b/cyclone/hammer/prepend.c
index 2dbe7be..b305f2f 100644
--- a/cyclone/hammer/prepend.c
+++ b/cyclone/hammer/prepend.c
@@ -34,8 +34,7 @@ typedef struct _prependxy
static t_class *prepend_class;
static t_class *prependxy_class;
-static t_symbol *prependps_compatibility = 0;
-static t_symbol *prependps_max;
+static int prepend_iscompatible = 0; /* FIXME per-object */
/* Usually a preallocation method is used, except in special cases of:
1) reentrant output request, or 2) an output request which would cause
@@ -153,7 +152,7 @@ static void prepend_bang(t_prepend *x)
{
if (x->x_selector)
{
- if (prependps_compatibility == prependps_max)
+ if (prepend_iscompatible)
{
t_atom at;
SETSYMBOL(&at, &s_bang); /* CHECKED */
@@ -324,7 +323,7 @@ static void *prepend_new(t_symbol *s, int ac, t_atom *av)
}
else
{
- if (prependps_compatibility == prependps_max)
+ if (prepend_iscompatible)
/* CHECKED in max an object without an outlet is created,
and there is no warning when loading from a file. */
fittermax_warning(prepend_class,
@@ -337,6 +336,11 @@ static void *prepend_new(t_symbol *s, int ac, t_atom *av)
return (x);
}
+static void prepend_fitter(void)
+{
+ prepend_iscompatible = fittermax_get();
+}
+
void prepend_setup(void)
{
prepend_class = class_new(gensym("prepend"),
@@ -360,6 +364,5 @@ void prepend_setup(void)
class_addlist(prependxy_class, prependxy_list);
class_addanything(prependxy_class, prependxy_anything);
- prependps_max = gensym("max");
- fitter_setup(prepend_class, &prependps_compatibility, 0);
+ fitter_setup(prepend_class, prepend_fitter);
}