aboutsummaryrefslogtreecommitdiff
path: root/packages/patches/made_print_post_all_arguments-0.40.3.patch
blob: 5abec468e1312ebdbe464eb126cda68e56ac4462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- x_interface.c	2007/11/25 03:31:05	1.3.6.1
+++ x_interface.c	2007/12/04 21:54:46	1.3.6.3
@@ -17,12 +17,22 @@
 
 static void *print_new(t_symbol *s, int argc, t_atom *argv)
 {
+    int bufsize;
+    char *buf;
     t_print *x = (t_print *)pd_new(print_class);
-    x->x_sym = atom_getsymbolarg(0,argc,argv);
-    if (x->x_sym == &s_)
-        x->x_sym = atom_getfloatarg(0,argc,argv);
-    if (*s->s_name) x->x_sym = s;
-    else x->x_sym = gensym("print");
+    if (argc)
+    {
+        t_binbuf *bb = binbuf_new();
+        binbuf_add(bb, argc, argv);
+        binbuf_gettext(bb, &buf, &bufsize);
+        buf[bufsize] = 0;
+        x->x_sym = gensym(buf);
+        binbuf_free(bb);
+    }
+    else 
+    {
+        x->x_sym = gensym("print");
+    }
     return (x);
 }