[PD-cvs] externals/unauthorized/playlist playlist.c,1.11,1.12

Yves Degoyon sevyves at users.sourceforge.net
Sat Jun 24 14:45:51 CEST 2006


Update of /cvsroot/pure-data/externals/unauthorized/playlist
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6045

Modified Files:
	playlist.c 
Log Message:
fixed memory leak

Index: playlist.c
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/playlist/playlist.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** playlist.c	18 Dec 2005 18:55:09 -0000	1.11
--- playlist.c	24 Jun 2006 12:45:49 -0000	1.12
***************
*** 30,35 ****
  /* ---------------------------------------------------------------------------- */  
  
- #ifndef _WIN32 /* this object doesn't compile on Windows because of alphasort() */
- 
  #include <stdlib.h>
  #include <string.h>
--- 30,33 ----
***************
*** 45,57 ****
  #include "t_tk.h"
  
! #ifdef _WIN32
  #include <io.h>
- #include <pthread.h>
  #else
  #include <unistd.h>
  #include <sys/types.h>
- #endif
- 
- #ifndef _MSC_VER
  #include <dirent.h>
  #endif
--- 43,51 ----
  #include "t_tk.h"
  
! #ifdef NT
  #include <io.h>
  #else
  #include <unistd.h>
  #include <sys/types.h>
  #include <dirent.h>
  #endif
***************
*** 270,273 ****
--- 264,268 ----
         outlet_symbol( x->x_file, gensym( x->x_dentries[x->x_itemselected] ) );
         outlet_symbol( x->x_fullpath, gensym( tmpstring ) );
+        freebytes( tmpstring, strlen( x->x_curdir ) + strlen( x->x_dentries[x->x_itemselected]) + 2 ); 
      }
  }             
***************
*** 292,296 ****
         return;
      }
!     sprintf( x->x_font, "{%s %d %s}", fname->s_name, (t_int)fsize, fcase->s_name );
      x->x_charheight = (t_int)fsize;
      x->x_charwidth = (2*x->x_charheight)/3;
--- 287,291 ----
         return;
      }
!     sprintf( x->x_font, "{%s %d %s}", fname->s_name, (int)fsize, fcase->s_name );
      x->x_charheight = (t_int)fsize;
      x->x_charwidth = (2*x->x_charheight)/3;
***************
*** 663,667 ****
  
     sprintf(buf, "pdtk_playlist_dialog %%s %s %d %d %s %s %s %s %s\n",
!             x->x_extension, x->x_width, x->x_height, 
              x->x_font, x->x_bgcolor, x->x_sbcolor,
              x->x_fgcolor, x->x_secolor );
--- 658,662 ----
  
     sprintf(buf, "pdtk_playlist_dialog %%s %s %d %d %s %s %s %s %s\n",
!             x->x_extension, (int)x->x_width, (int)x->x_height, 
              x->x_font, x->x_bgcolor, x->x_sbcolor,
              x->x_fgcolor, x->x_secolor );
***************
*** 692,696 ****
     x->x_height = (int)argv[2].a_w.w_float;
     sprintf( x->x_font, "{%s %d %s}", argv[3].a_w.w_symbol->s_name, 
!                        (t_int)argv[4].a_w.w_float, argv[5].a_w.w_symbol->s_name );
     x->x_charheight = (t_int)argv[4].a_w.w_float;
     strcpy( x->x_bgcolor, argv[6].a_w.w_symbol->s_name );
--- 687,691 ----
     x->x_height = (int)argv[2].a_w.w_float;
     sprintf( x->x_font, "{%s %d %s}", argv[3].a_w.w_symbol->s_name, 
!                        (int)argv[4].a_w.w_float, argv[5].a_w.w_symbol->s_name );
     x->x_charheight = (t_int)argv[4].a_w.w_float;
     strcpy( x->x_bgcolor, argv[6].a_w.w_symbol->s_name );
***************
*** 800,804 ****
          x->x_charheight = (t_int)argv[4].a_w.w_float;
          sprintf( x->x_font, "%s %d %s", argv[3].a_w.w_symbol->s_name, 
!                            x->x_charheight, argv[5].a_w.w_symbol->s_name );
          argoffset=0;
        }
--- 795,799 ----
          x->x_charheight = (t_int)argv[4].a_w.w_float;
          sprintf( x->x_font, "%s %d %s", argv[3].a_w.w_symbol->s_name, 
!                            (int)x->x_charheight, argv[5].a_w.w_symbol->s_name );
          argoffset=0;
        }
***************
*** 1024,1027 ****
      class_sethelpsymbol(playlist_class, gensym("playlist.pd"));
  }
- 
- #endif /* not _WIN32 */
--- 1019,1020 ----





More information about the Pd-cvs mailing list