aboutsummaryrefslogtreecommitdiff
path: root/src/match.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/match.c
parentfbc6df8b8cfcf9603df93b02e0625067feebb6f1 (diff)
imported latest version 1.4 direct from Olaf
svn path=/trunk/externals/maxlib/; revision=898
Diffstat (limited to 'src/match.c')
-rw-r--r--src/match.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/match.c b/src/match.c
index 6fb7933..623ca87 100644
--- a/src/match.c
+++ b/src/match.c
@@ -29,11 +29,9 @@
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
-/* LATER compare with match.c from max sdk */
#include <string.h>
#include "m_pd.h"
-// #include "hammer.h"
#define MATCH_INISIZE 16 /* LATER rethink */
@@ -250,10 +248,18 @@ static void *match_new(t_symbol *s, int ac, t_atom *av)
return (x);
}
+#ifndef MAXLIB
void match_setup(void)
{
match_class = class_new(gensym("match"), (t_newmethod)match_new,
(t_method)match_free, sizeof(t_match), 0, A_GIMME, 0);
+#else
+void maxlib_match_setup(void)
+{
+ match_class = class_new(gensym("maxlib_match"), (t_newmethod)match_new,
+ (t_method)match_free, sizeof(t_match), 0, A_GIMME, 0);
+ class_addcreator((t_newmethod)match_new, gensym("match"), A_GIMME, 0);
+#endif
class_addfloat(match_class, match_float);
class_addsymbol(match_class, match_symbol);
class_addlist(match_class, match_list);
@@ -261,6 +267,8 @@ void match_setup(void)
class_addmethod(match_class, (t_method)match_set, gensym("set"), A_GIMME, 0);
class_addmethod(match_class, (t_method)match_clear, gensym("clear"), 0);
#ifndef MAXLIB
+ class_sethelpsymbol(match_class, gensym("help-match.pd"));
#else
+ class_sethelpsymbol(match_class, gensym("maxlib/help-match.pd"));
#endif
}