[PD-cvs] externals/unauthorized/sonogram~ sonogram~-joge.c, 1.6, 1.7 sonogram~-yves.c, 1.7, 1.8 sonogram~.c, 1.10, 1.11

Hans-Christoph Steiner eighthave at users.sourceforge.net
Sun Dec 18 19:55:14 CET 2005


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

Modified Files:
	sonogram~-joge.c sonogram~-yves.c sonogram~.c 
Log Message:
lots of MinGW fixes for RC6

Index: sonogram~-yves.c
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/sonogram~/sonogram~-yves.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** sonogram~-yves.c	19 Apr 2005 00:17:36 -0000	1.7
--- sonogram~-yves.c	18 Dec 2005 18:55:12 -0000	1.8
***************
*** 43,56 ****
  #include <ctype.h>
  #include <pthread.h>
! #ifdef UNIX
! #include <unistd.h>
! #endif
! #ifdef NT
  #define random rand
  #include <windows.h>
! static int usleep (unsigned int us) {
!   Sleep((long)(us/1000.));
!   return 0;
! }
  #endif
  #include <math.h>
--- 43,53 ----
  #include <ctype.h>
  #include <pthread.h>
! #ifdef WIN32
  #define random rand
+ #define usleep(a) _sleep(a/1000)
+ #include <io.h>
  #include <windows.h>
! #else
! #include <unistd.h>
  #endif
  #include <math.h>

Index: sonogram~.c
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/sonogram~/sonogram~.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** sonogram~.c	19 Apr 2005 00:17:36 -0000	1.10
--- sonogram~.c	18 Dec 2005 18:55:12 -0000	1.11
***************
*** 47,57 ****
  #include <ctype.h>
  #include <pthread.h>
! #ifdef UNIX
  #include <unistd.h>
  #endif
! #ifdef NT
  #define M_PI 3.14159265358979323846
  #endif
- #include <math.h>
  
  #include "m_pd.h"
--- 47,62 ----
  #include <ctype.h>
  #include <pthread.h>
! #ifdef _WIN32
! #include <io.h>
! #define random rand
! #define usleep(a) _sleep(a/1000)
! #else
  #include <unistd.h>
  #endif
! #include <math.h>
! 
! #ifndef M_PI
  #define M_PI 3.14159265358979323846
  #endif
  
  #include "m_pd.h"
***************
*** 327,331 ****
      for ( i=0; i<x->x_zoom; i++ )
      {
!         sprintf( x->x_guicommand, "SONIMAGE%x put {%s} -to %d 0\n", (unsigned int)x, x->x_gifdata, (bnumber*x->x_zoom)+i );
          sys_gui( x->x_guicommand );
      }
--- 332,336 ----
      for ( i=0; i<x->x_zoom; i++ )
      {
! 		 sprintf( x->x_guicommand, "SONIMAGE%x put {%s} -to %d 0\n", (unsigned int)x, x->x_gifdata, (int) ((bnumber*x->x_zoom)+i) );
          sys_gui( x->x_guicommand );
      }
***************
*** 347,351 ****
        for ( i=0; i<x->x_zoom; i++ )
        {
!         sprintf( x->x_guicommand, "FAZIMAGE%x put {%s} -to %d 0\n", (unsigned int)x, x->x_gifdata, (bnumber*x->x_zoom)+i );
          sys_gui( x->x_guicommand );
        }
--- 352,356 ----
        for ( i=0; i<x->x_zoom; i++ )
        {
! 			sprintf( x->x_guicommand, "FAZIMAGE%x put {%s} -to %d 0\n", (unsigned int)x, x->x_gifdata, (int) ((bnumber*x->x_zoom)+i) );
          sys_gui( x->x_guicommand );
        }
***************
*** 378,390 ****
  static void *sonogram_do_update_part(void *tdata)
  {
!  t_sonogram *x = (t_sonogram*) tdata;
!  t_int si;
!  t_int nbpoints = 0;
!  t_float percentage = 0, opercentage = 0;
!  t_canvas *canvas=glist_getcanvas(x->x_glist);
!  
! 
     // loose synchro
!    usleep( THREAD_SLEEP_TIME );
  
     // check boundaries
--- 383,395 ----
  static void *sonogram_do_update_part(void *tdata)
  {
! 	t_sonogram *x = (t_sonogram*) tdata;
! 	t_int si;
! 	t_int nbpoints = 0;
! 	t_float percentage = 0, opercentage = 0;
! 	t_canvas *canvas=glist_getcanvas(x->x_glist);
! 	
! 	
     // loose synchro
! 	usleep( THREAD_SLEEP_TIME );
  
     // check boundaries

Index: sonogram~-joge.c
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/sonogram~/sonogram~-joge.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** sonogram~-joge.c	19 Apr 2005 00:17:36 -0000	1.6
--- sonogram~-joge.c	18 Dec 2005 18:55:09 -0000	1.7
***************
*** 46,50 ****
  #include <pthread.h>
  #endif
! #ifdef NT
  #define M_PI 3.14159265358979323846
  #include "pthread.h"
--- 46,50 ----
  #include <pthread.h>
  #endif
! #ifdef _WIN32
  #define M_PI 3.14159265358979323846
  #include "pthread.h"





More information about the Pd-cvs mailing list