[PD-cvs] packages/patches made_print_post_all_arguments-0.40.3.patch, 1.1, 1.2

Hans-Christoph Steiner eighthave at users.sourceforge.net
Tue Dec 4 22:57:38 CET 2007


Update of /cvsroot/pure-data/packages/patches
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24799

Modified Files:
	made_print_post_all_arguments-0.40.3.patch 
Log Message:
fixed two bugs, time for a new patch

Index: made_print_post_all_arguments-0.40.3.patch
===================================================================
RCS file: /cvsroot/pure-data/packages/patches/made_print_post_all_arguments-0.40.3.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** made_print_post_all_arguments-0.40.3.patch	26 Nov 2007 06:02:36 -0000	1.1
--- made_print_post_all_arguments-0.40.3.patch	4 Dec 2007 21:57:36 -0000	1.2
***************
*** 1,21 ****
! --- x_interface.c	2006/08/11 20:09:07	1.3
! +++ x_interface.c	2007/11/26 05:53:29	1.3.6.2
! @@ -15,11 +15,23 @@
!      t_symbol *x_sym;
!  } t_print;
   
! -static void *print_new(t_symbol *s)
! +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);
  -    if (*s->s_name) x->x_sym = s;
  -    else x->x_sym = gensym("print");
! +    if (*s->s_name)
  +    {
  +        t_binbuf *bb = binbuf_new();
  +        binbuf_add(bb, argc, argv);
  +        binbuf_gettext(bb, &buf, &bufsize);
  +        x->x_sym = gensym(buf);
  +        binbuf_free(bb);
--- 1,22 ----
! --- 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);
***************
*** 28,38 ****
   }
   
- @@ -60,7 +72,7 @@
-  static void print_setup(void)
-  {
-      print_class = class_new(gensym("print"), (t_newmethod)print_new, 0,
- -        sizeof(t_print), 0, A_DEFSYM, 0);
- +        sizeof(t_print), 0, A_GIMME, 0);
-      class_addbang(print_class, print_bang);
-      class_addfloat(print_class, print_float);
-      class_addpointer(print_class, print_pointer);
--- 29,30 ----





More information about the Pd-cvs mailing list