diff options
Diffstat (limited to 'src/linear.c')
-rw-r--r-- | src/linear.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/linear.c b/src/linear.c index 1f86c7d..a5869a2 100644 --- a/src/linear.c +++ b/src/linear.c @@ -60,12 +60,22 @@ static void rand_linear_bang(t_rand_linear *x) outlet_float(x->x_obj.ob_outlet, u1);
}
+#ifndef MAXLIB
void linear_setup(void)
{
rand_linear_class = class_new(gensym("linear"), (t_newmethod)rand_linear_new, 0,
sizeof(t_rand_linear), 0, A_DEFFLOAT, 0);
class_addbang(rand_linear_class, rand_linear_bang);
-#ifndef MAXLIB
+ class_sethelpsymbol(rand_linear_class, gensym("help-linear.pd"));
post(version);
-#endif
}
+#else
+void maxlib_linear_setup(void)
+{
+ rand_linear_class = class_new(gensym("maxlib_linear"), (t_newmethod)rand_linear_new, 0,
+ sizeof(t_rand_linear), 0, A_DEFFLOAT, 0);
+ class_addcreator((t_newmethod)rand_linear_new, gensym("linear"), A_DEFFLOAT, 0);
+ class_addbang(rand_linear_class, rand_linear_bang);
+ class_sethelpsymbol(rand_linear_class, gensym("maxlib/help-linear.pd"));
+}
+#endif
\ No newline at end of file |