From d6b088044e161a27d49df537bbb6d998a8d0e50d Mon Sep 17 00:00:00 2001 From: musil Date: Sat, 9 Dec 2006 02:00:52 +0000 Subject: // class_sethelpsymbol(); changed help-*.pd to *-help.pd chanded file structure to standard 1st step remove old svn path=/trunk/externals/iemlib/; revision=6756 --- iemlib2/src/unsymbol.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 iemlib2/src/unsymbol.c (limited to 'iemlib2/src/unsymbol.c') diff --git a/iemlib2/src/unsymbol.c b/iemlib2/src/unsymbol.c new file mode 100644 index 0000000..eaec6bf --- /dev/null +++ b/iemlib2/src/unsymbol.c @@ -0,0 +1,40 @@ +/* For information on usage and redistribution, and for a DISCLAIMER OF ALL +* WARRANTIES, see the file, "LICENSE.txt," in this distribution. + +iemlib2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ + +#include "m_pd.h" +#include "iemlib.h" + +/* ----------- unsymbol ------------------------- */ +/* -- converts a symbol to an anything message -- */ + +static t_class *unsymbol_class; + +typedef struct _unsymbol +{ + t_object x_obj; + t_atom x_at; +} t_unsymbol; + +static void unsymbol_symbol(t_unsymbol *x, t_symbol *s) +{ + outlet_anything(x->x_obj.ob_outlet, s, 0, &(x->x_at)); +} + +static void *unsymbol_new(void) +{ + t_unsymbol *x = (t_unsymbol *)pd_new(unsymbol_class); + + outlet_new(&x->x_obj, &s_list); + return (x); +} + +void unsymbol_setup(void) +{ + unsymbol_class = class_new(gensym("unsymbol"), (t_newmethod)unsymbol_new, + 0, sizeof(t_unsymbol), 0, 0); + class_addcreator((t_newmethod)unsymbol_new, gensym("unsym"), 0); + class_addsymbol(unsymbol_class, unsymbol_symbol); +// class_sethelpsymbol(unsymbol_class, gensym("iemhelp/help-unsymbol")); +} -- cgit v1.2.1