fixed execution order bug that was causing the first two frame numbers to output...
[puredata.git] / packages / patches / made_print_post_all_arguments-0.40.3.patch
blob5abec468e1312ebdbe464eb126cda68e56ac4462
1 --- x_interface.c 2007/11/25 03:31:05 1.3.6.1
2 +++ x_interface.c 2007/12/04 21:54:46 1.3.6.3
3 @@ -17,12 +17,22 @@
5 static void *print_new(t_symbol *s, int argc, t_atom *argv)
7 + int bufsize;
8 + char *buf;
9 t_print *x = (t_print *)pd_new(print_class);
10 - x->x_sym = atom_getsymbolarg(0,argc,argv);
11 - if (x->x_sym == &s_)
12 - x->x_sym = atom_getfloatarg(0,argc,argv);
13 - if (*s->s_name) x->x_sym = s;
14 - else x->x_sym = gensym("print");
15 + if (argc)
16 + {
17 + t_binbuf *bb = binbuf_new();
18 + binbuf_add(bb, argc, argv);
19 + binbuf_gettext(bb, &buf, &bufsize);
20 + buf[bufsize] = 0;
21 + x->x_sym = gensym(buf);
22 + binbuf_free(bb);
23 + }
24 + else
25 + {
26 + x->x_sym = gensym("print");
27 + }
28 return (x);