From c1419b43ea354fa04360450ae4f64612df065099 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 14 Nov 2005 21:59:09 +0000 Subject: these pragmas are only used for MSVC, not MinGW or Cygwin, therefore changing the define from NT to _MSC_VER svn path=/trunk/externals/ggee/; revision=3903 --- control/prepend.c | 152 +++++++++++++++++++++++++++--------------------------- 1 file changed, 76 insertions(+), 76 deletions(-) (limited to 'control/prepend.c') diff --git a/control/prepend.c b/control/prepend.c index 7b5bb0f..f0c6f15 100755 --- a/control/prepend.c +++ b/control/prepend.c @@ -1,76 +1,76 @@ -/* (C) Guenter Geiger */ - - -#include -#ifdef NT -#pragma warning( disable : 4244 ) -#pragma warning( disable : 4305 ) -#endif - -/* ------------------------ prepend ----------------------------- */ - -static t_class *prepend_class; - - -typedef struct _prepend -{ - t_object x_obj; - t_symbol* x_s; -} t_prepend; - - -void prepend_anything(t_prepend *x,t_symbol* s,t_int argc,t_atom* argv) -{ - int i = argc; - t_symbol* cur; - t_atom a_out[256]; - int c_out = 0; - t_atom* a = a_out; - - if (argv->a_type == A_SYMBOL) { - SETSYMBOL(a,s); - a++; - c_out++; - } - - while (i--) { - switch( argv->a_type) { - case A_FLOAT: - SETFLOAT(a,atom_getfloat(argv)); - a++; - c_out++; - break; - case A_SYMBOL: - SETSYMBOL(a,atom_getsymbol(argv)); - a++; - c_out++; - break; - default: - post("unknown type"); - } - argv++; - } - outlet_anything(x->x_obj.ob_outlet,x->x_s,c_out,(t_atom*)&a_out); -} - -static void *prepend_new(t_symbol* s) -{ - t_prepend *x = (t_prepend *)pd_new(prepend_class); - outlet_new(&x->x_obj, &s_float); - if (s != &s_) - x->x_s = s; - else { - x->x_s = gensym("prepend"); - error("prepend needs symbol argument"); - } - return (x); -} - -void prepend_setup(void) -{ - prepend_class = class_new(gensym("prepend"), (t_newmethod)prepend_new, 0, - sizeof(t_prepend), 0,A_DEFSYM,NULL); - class_addanything(prepend_class,prepend_anything); -} - - +/* (C) Guenter Geiger */ + + +#include +#ifdef _MSC_VER +#pragma warning( disable : 4244 ) +#pragma warning( disable : 4305 ) +#endif + +/* ------------------------ prepend ----------------------------- */ + +static t_class *prepend_class; + + +typedef struct _prepend +{ + t_object x_obj; + t_symbol* x_s; +} t_prepend; + + +void prepend_anything(t_prepend *x,t_symbol* s,t_int argc,t_atom* argv) +{ + int i = argc; + t_symbol* cur; + t_atom a_out[256]; + int c_out = 0; + t_atom* a = a_out; + + if (argv->a_type == A_SYMBOL) { + SETSYMBOL(a,s); + a++; + c_out++; + } + + while (i--) { + switch( argv->a_type) { + case A_FLOAT: + SETFLOAT(a,atom_getfloat(argv)); + a++; + c_out++; + break; + case A_SYMBOL: + SETSYMBOL(a,atom_getsymbol(argv)); + a++; + c_out++; + break; + default: + post("unknown type"); + } + argv++; + } + outlet_anything(x->x_obj.ob_outlet,x->x_s,c_out,(t_atom*)&a_out); +} + +static void *prepend_new(t_symbol* s) +{ + t_prepend *x = (t_prepend *)pd_new(prepend_class); + outlet_new(&x->x_obj, &s_float); + if (s != &s_) + x->x_s = s; + else { + x->x_s = gensym("prepend"); + error("prepend needs symbol argument"); + } + return (x); +} + +void prepend_setup(void) +{ + prepend_class = class_new(gensym("prepend"), (t_newmethod)prepend_new, 0, + sizeof(t_prepend), 0,A_DEFSYM,NULL); + class_addanything(prepend_class,prepend_anything); +} + + -- cgit v1.2.1