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/divmod.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/divmod.c') diff --git a/src/divmod.c b/src/divmod.c index f84862c..ee552e7 100644 --- a/src/divmod.c +++ b/src/divmod.c @@ -72,18 +72,29 @@ static void *divmod_new(t_floatarg fl, t_floatarg fr) x->x_rightvalue = fr; x->x_leftvalue = fl; -#ifndef MAXLIB - post(version); -#endif return (void *)x; } +#ifndef MAXLIB void divmod_setup(void) { divmod_class = class_new(gensym("divmod"), (t_newmethod)divmod_new, 0, sizeof(t_divmod), 0, A_DEFFLOAT, A_DEFFLOAT, 0); +#else +void maxlib_divmod_setup(void) +{ + divmod_class = class_new(gensym("maxlib_divmod"), (t_newmethod)divmod_new, + 0, sizeof(t_divmod), 0, A_DEFFLOAT, A_DEFFLOAT, 0); +#endif class_addfloat(divmod_class, divmod_float); class_addmethod(divmod_class, (t_method)divmod_ft1, gensym("ft1"), A_FLOAT, 0); class_addbang(divmod_class, (t_method)divmod_bang); +#ifndef MAXLIB + class_sethelpsymbol(divmod_class, gensym("help-divmod.pd")); + post(version); +#else + class_addcreator((t_newmethod)divmod_new, gensym("divmod"), A_DEFFLOAT, A_DEFFLOAT, 0); + class_sethelpsymbol(divmod_class, gensym("maxlib/help-divmod.pd")); +#endif } -- cgit v1.2.1