aboutsummaryrefslogtreecommitdiff
path: root/src/subst.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2003-08-29 13:53:51 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2003-08-29 13:53:51 +0000
commitde86cb7754d773a2dba3ae92eb0dfc4cb9d77cbd (patch)
treeb84e943785318f49e99423980235c207d2f2435c /src/subst.c
parentfbc6df8b8cfcf9603df93b02e0625067feebb6f1 (diff)
imported latest version 1.4 direct from Olaf
svn path=/trunk/externals/maxlib/; revision=898
Diffstat (limited to 'src/subst.c')
-rw-r--r--src/subst.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/subst.c b/src/subst.c
index 0a4acf4..f473d53 100644
--- a/src/subst.c
+++ b/src/subst.c
@@ -366,9 +366,6 @@ static void *subst_new(t_symbol *s, int argc, t_atom *argv)
long i;
t_symbol *sym;
t_subst *x = (t_subst *)pd_new(subst_class);
-#ifndef MAXLIB
- post(version);
-#endif
// read in order...
x->x_order = 3;
if(argc == 1)
@@ -391,8 +388,10 @@ static void *subst_new(t_symbol *s, int argc, t_atom *argv)
static void subst_free(t_subst *x)
{
+ /* nothing to do */
}
+#ifndef MAXLIB
void subst_setup(void)
{
subst_class = class_new(gensym("subst"), (t_newmethod)subst_new,
@@ -404,4 +403,22 @@ void subst_setup(void)
class_addmethod(subst_class, (t_method)subst_display, gensym("display"), 0);
class_addlist(subst_class, subst_list);
class_addbang(subst_class, subst_bang);
+ class_sethelpsymbol(subst_class, gensym("help-subst.pd"));
+ post(version);
+}
+#else
+void maxlib_subst_setup(void)
+{
+ subst_class = class_new(gensym("maxlib_subst"), (t_newmethod)subst_new,
+ (t_method)subst_free, sizeof(t_subst), 0, A_GIMME, 0);
+ class_addcreator((t_newmethod)subst_new, gensym("subst"), A_GIMME, 0);
+ class_addmethod(subst_class, (t_method)subst_set_order, gensym("order"), A_FLOAT, 0);
+ class_addmethod(subst_class, (t_method)subst_intv, gensym("interval"), A_FLOAT, 0);
+ class_addmethod(subst_class, (t_method)subst_set, gensym("set"), A_SYMBOL, 0);
+ class_addmethod(subst_class, (t_method)subst_load, gensym("load"), A_SYMBOL, 0);
+ class_addmethod(subst_class, (t_method)subst_display, gensym("display"), 0);
+ class_addlist(subst_class, subst_list);
+ class_addbang(subst_class, subst_bang);
+ class_sethelpsymbol(subst_class, gensym("maxlib/help-subst.pd"));
}
+#endif \ No newline at end of file