aboutsummaryrefslogtreecommitdiff
path: root/source/vclip.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-02-10 00:34:05 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2010-02-10 00:34:05 +0000
commit086e6b358ad45bda0e6a948cfb7ea2d33ab7da5a (patch)
treeb87b0adfbfd8f9b9439d8bf528b63b64f23dce03 /source/vclip.c
parent98e3e1214cf71a62b2de938c9c7e07f6bdd0090c (diff)
re-arranged into libdir and setup with the template Makefile+debian stuff. renabled vv+ and vv- as vvplus and vvminus
svn path=/trunk/externals/smlib/; revision=13158
Diffstat (limited to 'source/vclip.c')
-rw-r--r--source/vclip.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/source/vclip.c b/source/vclip.c
deleted file mode 100644
index 4a11ef5..0000000
--- a/source/vclip.c
+++ /dev/null
@@ -1,58 +0,0 @@
-#include "defines.h"
-
-/*--------------- vclip ----------------*/
-/* clips a vector */
-
-
-static t_class *vclip_class;
-
-typedef struct _vclip
-{
- t_object x_obj;
- float m_lo;
- float m_hi;
-} t_vclip;
-
-
-static void vclip_perform(t_vclip *x, t_symbol *s, int argc, t_atom *argv)
-{
- int i;
- float lo,hi;
- t_atom *ap,*app;
- ap = (t_atom *)getbytes(sizeof(t_atom)*argc);
- app=ap;
- lo=x->m_lo;
- hi=x->m_hi;
- for (i = 0; i < argc; i++)
- {
- float f=atom_getfloat(argv++);
- SETFLOAT(app, (f<lo?lo:(f>hi?hi:f)));
- app++;
- }
- outlet_list(x->x_obj.ob_outlet,gensym("list"),argc,ap);
- freebytes(ap,argc);
-}
-
-static void *vclip_new(t_float lo, t_float hi)
-{
- t_vclip *x=(t_vclip *)pd_new(vclip_class);
-
- floatinlet_new(&x->x_obj, &x->m_lo);
- floatinlet_new(&x->x_obj, &x->m_hi);
-
- outlet_new(&x->x_obj, gensym("list"));
- x->m_hi=hi;
- x->m_lo=lo;
- return (void *)x;
-}
-
-void vclip_setup(void)
-{
- vclip_class = class_new(gensym("vclip"),
- (t_newmethod)vclip_new, 0,
- sizeof(t_vclip),
- CLASS_DEFAULT,
- A_DEFFLOAT,A_DEFFLOAT,0);
- class_addlist(vclip_class, (t_method)vclip_perform);
-}
-