From de86cb7754d773a2dba3ae92eb0dfc4cb9d77cbd Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 29 Aug 2003 13:53:51 +0000 Subject: imported latest version 1.4 direct from Olaf svn path=/trunk/externals/maxlib/; revision=898 --- src/speedlim.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/speedlim.c') diff --git a/src/speedlim.c b/src/speedlim.c index 3055166..c4a4385 100644 --- a/src/speedlim.c +++ b/src/speedlim.c @@ -27,16 +27,16 @@ /* Based on PureData by Miller Puckette and others. */ /* */ /* ---------------------------------------------------------------------------- */ + /* this is the original copyright notice: */ + /* Copyright (c) 1997-2002 Miller Puckette and others. * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ -/* LATER 'clock' method */ #include #include "m_pd.h" -// #include "hammer.h" #define SPEEDLIM_INISIZE 32 /* LATER rethink */ #define SPEEDLIM_MAXSIZE 256 /* not used */ @@ -209,10 +209,18 @@ static void *speedlim_new(t_floatarg f) return (x); } +#ifndef MAXLIB void speedlim_setup(void) { speedlim_class = class_new(gensym("speedlim"), (t_newmethod)speedlim_new, (t_method)speedlim_free, sizeof(t_speedlim), 0, A_DEFFLOAT, 0); +#else +void maxlib_speedlim_setup(void) +{ + speedlim_class = class_new(gensym("maxlib_speedlim"), (t_newmethod)speedlim_new, + (t_method)speedlim_free, sizeof(t_speedlim), 0, A_DEFFLOAT, 0); + class_addcreator((t_newmethod)speedlim_new, gensym("speedlim"), A_DEFFLOAT, 0); +#endif class_addbang(speedlim_class, speedlim_bang); class_addfloat(speedlim_class, speedlim_float); class_addsymbol(speedlim_class, speedlim_symbol); @@ -220,6 +228,8 @@ void speedlim_setup(void) class_addanything(speedlim_class, speedlim_anything); class_addmethod(speedlim_class, (t_method)speedlim_ft1, gensym("ft1"), A_FLOAT, 0); #ifndef MAXLIB + class_sethelpsymbol(speedlim_class, gensym("help-speedlim.pd")); #else + class_sethelpsymbol(speedlim_class, gensym("maxlib/help-speedlim.pd")); #endif } -- cgit v1.2.1