aboutsummaryrefslogtreecommitdiff
path: root/src/gestalt.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/gestalt.c
parentfbc6df8b8cfcf9603df93b02e0625067feebb6f1 (diff)
imported latest version 1.4 direct from Olaf
svn path=/trunk/externals/maxlib/; revision=898
Diffstat (limited to 'src/gestalt.c')
-rw-r--r--src/gestalt.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gestalt.c b/src/gestalt.c
index cd07969..650efdb 100644
--- a/src/gestalt.c
+++ b/src/gestalt.c
@@ -91,12 +91,10 @@ static void *gestalt_new(t_floatarg f)
x->x_reftime = f;
if(x->x_reftime < 1) x->x_reftime = 1;
-#ifndef MAXLIB
- post(version);
-#endif
return (void *)x;
}
+#ifndef MAXLIB
void gestalt_setup(void)
{
gestalt_class = class_new(gensym("gestalt"), (t_newmethod)gestalt_new,
@@ -104,5 +102,19 @@ void gestalt_setup(void)
class_addfloat(gestalt_class, gestalt_float);
class_addmethod(gestalt_class, (t_method)gestalt_ft1, gensym("ft1"), A_FLOAT, 0);
class_addmethod(gestalt_class, (t_method)gestalt_ft2, gensym("ft2"), A_FLOAT, 0);
+ class_sethelpsymbol(gestalt_class, gensym("help-gestalt.pd"));
+ post(version);
+}
+#else
+void maxlib_gestalt_setup(void)
+{
+ gestalt_class = class_new(gensym("maxlib_gestalt"), (t_newmethod)gestalt_new,
+ 0, sizeof(t_gestalt), 0, A_DEFFLOAT, 0);
+ class_addcreator((t_newmethod)gestalt_new, gensym("gestalt"), A_DEFFLOAT, 0);
+ class_addfloat(gestalt_class, gestalt_float);
+ class_addmethod(gestalt_class, (t_method)gestalt_ft1, gensym("ft1"), A_FLOAT, 0);
+ class_addmethod(gestalt_class, (t_method)gestalt_ft2, gensym("ft2"), A_FLOAT, 0);
+ class_sethelpsymbol(gestalt_class, gensym("maxlib/help-gestalt.pd"));
}
+#endif