Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30545
Modified Files: Tag: desiredata makefile.in x_misc.c desire.c Removed Files: Tag: desiredata x_interface.c Log Message: merged x_interface.c into x_misc.c
Index: makefile.in =================================================================== RCS file: /cvsroot/pure-data/pd/src/makefile.in,v retrieving revision 1.4.4.2.2.21.2.4 retrieving revision 1.4.4.2.2.21.2.5 diff -C2 -d -r1.4.4.2.2.21.2.4 -r1.4.4.2.2.21.2.5 *** makefile.in 2 Dec 2006 03:42:38 -0000 1.4.4.2.2.21.2.4 --- makefile.in 2 Dec 2006 03:53:56 -0000 1.4.4.2.2.21.2.5 *************** *** 22,26 **** d_math.c d_fft.c d_mayer_fft.c d_fftroutine.c d_array.c d_global.c \ d_delay.c d_resample.c \ ! x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \ x_time.c x_acoustics.c x_net.c x_qlist.c x_gui.c x_list.c d_soundfile.c
--- 22,26 ---- d_math.c d_fft.c d_mayer_fft.c d_fftroutine.c d_array.c d_global.c \ d_delay.c d_resample.c \ ! x_arithmetic.c x_connective.c x_midi.c x_misc.c \ x_time.c x_acoustics.c x_net.c x_qlist.c x_gui.c x_list.c d_soundfile.c
--- x_interface.c DELETED ---
Index: x_misc.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/x_misc.c,v retrieving revision 1.2.8.1 retrieving revision 1.2.8.1.2.1 diff -C2 -d -r1.2.8.1 -r1.2.8.1.2.1 *** x_misc.c 12 Jul 2005 15:11:13 -0000 1.2.8.1 --- x_misc.c 2 Dec 2006 03:53:56 -0000 1.2.8.1.2.1 *************** *** 311,314 **** --- 311,380 ---- }
+ /* -------------------------- print ------------------------------ */ + static t_class *print_class; + + typedef struct _print + { + t_object x_obj; + t_symbol *x_sym; + } t_print; + + static void *print_new(t_symbol *s) + { + t_print *x = (t_print *)pd_new(print_class); + if (*s->s_name) x->x_sym = s; + else x->x_sym = gensym("print"); + fprintf(stderr,"%s\n",__PRETTY_FUNCTION__); + return (x); + } + + static void print_bang(t_print *x) + { + post("%s: bang", x->x_sym->s_name); + } + + static void print_pointer(t_print *x, t_gpointer *gp) + { + post("%s: (gpointer)", x->x_sym->s_name); + } + + static void print_float(t_print *x, t_float f) + { + post("%s: %g", x->x_sym->s_name, f); + } + + static void print_list(t_print *x, t_symbol *s, int argc, t_atom *argv) + { + int i; + char buf[80]; + if (argc && argv->a_type != A_SYMBOL) startpost("%s:", x->x_sym->s_name); + else startpost("%s: %s", x->x_sym->s_name, + (argc > 1 ? s_list.s_name : (argc == 1 ? s_symbol.s_name : + s_bang.s_name))); + postatom(argc, argv); + endpost(); + } + + static void print_anything(t_print *x, t_symbol *s, int argc, t_atom *argv) + { + int i; + char buf[80]; + startpost("%s: %s", x->x_sym->s_name, s->s_name); + postatom(argc, argv); + endpost(); + } + + static void print_setup(void) + { + print_class = class_new(gensym("print"), (t_newmethod)print_new, 0, + sizeof(t_print), 0, A_DEFSYM, 0); + class_addbang(print_class, print_bang); + class_addfloat(print_class, print_float); + class_addpointer(print_class, print_pointer); + class_addlist(print_class, print_list); + class_addanything(print_class, print_anything); + } + + void x_misc_setup(void) { *************** *** 319,321 **** --- 385,388 ---- cputime_setup(); realtime_setup(); + print_setup(); }
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.7 retrieving revision 1.1.2.217.2.8 diff -C2 -d -r1.1.2.217.2.7 -r1.1.2.217.2.8 *** desire.c 2 Dec 2006 03:42:38 -0000 1.1.2.217.2.7 --- desire.c 2 Dec 2006 03:53:56 -0000 1.1.2.217.2.8 *************** *** 8028,8032 **** extern "C" { void conf_init(void) { ! S(hash) S(m_obj) S(m_pd) S(x_acoustics) S(x_interface) S(x_connective) S(x_time) S(x_arithmetic) S(x_midi) S(x_misc) S(x_net) S(x_qlist) S(x_gui) S(x_list) S(d_arithmetic) S(d_array) S(d_ctl) S(d_dac) --- 8028,8032 ---- extern "C" { void conf_init(void) { ! S(hash) S(m_obj) S(m_pd) S(x_acoustics) S(x_connective) S(x_time) S(x_arithmetic) S(x_midi) S(x_misc) S(x_net) S(x_qlist) S(x_gui) S(x_list) S(d_arithmetic) S(d_array) S(d_ctl) S(d_dac)