[PD-cvs] externals/tb/detach detach.c,1.1.1.1,1.2 makefile,1.1.1.1,1.2

Tim Blechmann timblech at users.sourceforge.net
Thu Jan 6 18:00:47 CET 2005


Update of /cvsroot/pure-data/externals/tb/detach
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16500

Modified Files:
	detach.c makefile 
Log Message:
fixed spelling mistake

Index: detach.c
===================================================================
RCS file: /cvsroot/pure-data/externals/tb/detach/detach.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** detach.c	3 Jan 2005 18:00:59 -0000	1.1.1.1
--- detach.c	6 Jan 2005 17:00:45 -0000	1.2
***************
*** 1,5 ****
  /* 
  * 
! * detatch
  * Copyright (C) 2005  Tim Blechmann
  * 
--- 1,5 ----
  /* 
  * 
! * detach
  * Copyright (C) 2005  Tim Blechmann
  * 
***************
*** 26,34 ****
  
  
! static t_class *detatch_class;
  
  typedef t_fifo fifo_t; /* for emacs syntax highlighting */
  
! typedef struct _detatch
  {
      t_object x_obj;
--- 26,34 ----
  
  
! static t_class *detach_class;
  
  typedef t_fifo fifo_t; /* for emacs syntax highlighting */
  
! typedef struct _detach
  {
      t_object x_obj;
***************
*** 42,48 ****
  	fifo_t * x_fifo;
  
! } detatch_t;
  
! typedef struct _detatch_content
  {
  	enum { BANG, 
--- 42,48 ----
  	fifo_t * x_fifo;
  
! } detach_t;
  
! typedef struct _detach_content
  {
  	enum { BANG, 
***************
*** 55,69 ****
  	int argc;
  	t_atom * argv;
! } detatch_content_t;
  
  
! static void detatch_thread(detatch_t* x)
  {
! 	detatch_content_t * me;
  	while(1)
  	{
  		pthread_cond_wait(&x->x_cond, &x->x_mutex);
  		
! 		me = (detatch_content_t*) fifo_get(x->x_fifo);
  		
  		while (me != NULL)
--- 55,69 ----
  	int argc;
  	t_atom * argv;
! } detach_content_t;
  
  
! static void detach_thread(detach_t* x)
  {
! 	detach_content_t * me;
  	while(1)
  	{
  		pthread_cond_wait(&x->x_cond, &x->x_mutex);
  		
! 		me = (detach_content_t*) fifo_get(x->x_fifo);
  		
  		while (me != NULL)
***************
*** 97,103 ****
  			if (me->argc)
  				freebytes(me->argv, me->argc * sizeof (t_atom));
! 			freebytes (me, sizeof(detatch_content_t));
  			
! 			me = (detatch_content_t*) fifo_get(x->x_fifo);
  		}
  	}
--- 97,103 ----
  			if (me->argc)
  				freebytes(me->argv, me->argc * sizeof (t_atom));
! 			freebytes (me, sizeof(detach_content_t));
  			
! 			me = (detach_content_t*) fifo_get(x->x_fifo);
  		}
  	}
***************
*** 109,115 ****
  		if (me->argc)
  			freebytes(me->argv, me->argc * sizeof (t_atom));
! 		freebytes (me, sizeof(detatch_content_t));
  	}
! 	while (me = (detatch_content_t*) fifo_get(x->x_fifo));
  
  	fifo_destroy(x->x_fifo);
--- 109,115 ----
  		if (me->argc)
  			freebytes(me->argv, me->argc * sizeof (t_atom));
! 		freebytes (me, sizeof(detach_content_t));
  	}
! 	while (me = (detach_content_t*) fifo_get(x->x_fifo));
  
  	fifo_destroy(x->x_fifo);
***************
*** 118,124 ****
  
  /* todo: take argument for thread priority */
! static detatch_t * detatch_new(void)
  {
! 	detatch_t *x = (detatch_t*) pd_new(detatch_class);
  	pthread_attr_t thread_attr;
  	struct sched_param thread_sched;
--- 118,124 ----
  
  /* todo: take argument for thread priority */
! static detach_t * detach_new(void)
  {
! 	detach_t *x = (detach_t*) pd_new(detach_class);
  	pthread_attr_t thread_attr;
  	struct sched_param thread_sched;
***************
*** 139,147 ****
  #endif
  	status = pthread_create(&x->x_thread, &thread_attr,
! 							(void*)detatch_thread, x);
  
  #if 1
  	if (status == 0)
! 		post("detatching thread");
  #endif
  	return x;
--- 139,147 ----
  #endif
  	status = pthread_create(&x->x_thread, &thread_attr,
! 							(void*)detach_thread, x);
  
  #if 1
  	if (status == 0)
! 		post("detaching thread");
  #endif
  	return x;
***************
*** 149,155 ****
  
  
! static void detatch_free(detatch_t * x)
  {
! 	detatch_content_t * me = getbytes(sizeof(detatch_content_t));
  	
  	me->type = CANCEL;
--- 149,155 ----
  
  
! static void detach_free(detach_t * x)
  {
! 	detach_content_t * me = getbytes(sizeof(detach_content_t));
  	
  	me->type = CANCEL;
***************
*** 160,166 ****
  
  
! static void detatch_bang(detatch_t * x)
  {
! 	detatch_content_t * me = getbytes(sizeof(detatch_content_t));
  	
  	me->type = BANG;
--- 160,166 ----
  
  
! static void detach_bang(detach_t * x)
  {
! 	detach_content_t * me = getbytes(sizeof(detach_content_t));
  	
  	me->type = BANG;
***************
*** 172,178 ****
  
  
! static void detatch_float(detatch_t * x, t_float f)
  {
! 	detatch_content_t * me = getbytes(sizeof(detatch_content_t));
  	
  	me->type = FLOAT;
--- 172,178 ----
  
  
! static void detach_float(detach_t * x, t_float f)
  {
! 	detach_content_t * me = getbytes(sizeof(detach_content_t));
  	
  	me->type = FLOAT;
***************
*** 185,191 ****
  }
  
! static void detatch_pointer(detatch_t * x, t_gpointer* gp)
  {
! 	detatch_content_t * me = getbytes(sizeof(detatch_content_t));
  	
  	me->type = POINTER;
--- 185,191 ----
  }
  
! static void detach_pointer(detach_t * x, t_gpointer* gp)
  {
! 	detach_content_t * me = getbytes(sizeof(detach_content_t));
  	
  	me->type = POINTER;
***************
*** 198,204 ****
  }
  
! static void detatch_symbol(detatch_t * x, t_symbol * s)
  {
! 	detatch_content_t * me = getbytes(sizeof(detatch_content_t));
  	
  	me->type = SYMBOL;
--- 198,204 ----
  }
  
! static void detach_symbol(detach_t * x, t_symbol * s)
  {
! 	detach_content_t * me = getbytes(sizeof(detach_content_t));
  	
  	me->type = SYMBOL;
***************
*** 212,219 ****
  
  
! static void detatch_list(detatch_t * x, t_symbol * s, 
  						 int argc, t_atom* argv)
  {
! 	detatch_content_t * me = getbytes(sizeof(detatch_content_t));
  	
  	me->type = LIST;
--- 212,219 ----
  
  
! static void detach_list(detach_t * x, t_symbol * s, 
  						 int argc, t_atom* argv)
  {
! 	detach_content_t * me = getbytes(sizeof(detach_content_t));
  	
  	me->type = LIST;
***************
*** 225,232 ****
  }
  
! static void detatch_anything(detatch_t * x, t_symbol * s, 
  							 int argc, t_atom* argv)
  {
! 	detatch_content_t * me = getbytes(sizeof(detatch_content_t));
  	
  	me->type = ANYTHING;
--- 225,232 ----
  }
  
! static void detach_anything(detach_t * x, t_symbol * s, 
  							 int argc, t_atom* argv)
  {
! 	detach_content_t * me = getbytes(sizeof(detach_content_t));
  	
  	me->type = ANYTHING;
***************
*** 239,252 ****
  
  
! void detatch_setup(void)
  {
! 	detatch_class = class_new(gensym("detatch"), (t_newmethod)detatch_new,
! 							  (t_method)detatch_free, sizeof(detatch_t),
  							  CLASS_DEFAULT, 0);
! 	class_addbang(detatch_class, detatch_bang);
!     class_addfloat(detatch_class, detatch_float);
!     class_addpointer(detatch_class, detatch_pointer);
!     class_addsymbol(detatch_class, detatch_symbol);
!     class_addlist(detatch_class, detatch_list);
!     class_addanything(detatch_class, detatch_anything);
  }
--- 239,252 ----
  
  
! void detach_setup(void)
  {
! 	detach_class = class_new(gensym("detach"), (t_newmethod)detach_new,
! 							  (t_method)detach_free, sizeof(detach_t),
  							  CLASS_DEFAULT, 0);
! 	class_addbang(detach_class, detach_bang);
!     class_addfloat(detach_class, detach_float);
!     class_addpointer(detach_class, detach_pointer);
!     class_addsymbol(detach_class, detach_symbol);
!     class_addlist(detach_class, detach_list);
!     class_addanything(detach_class, detach_anything);
  }

Index: makefile
===================================================================
RCS file: /cvsroot/pure-data/externals/tb/detach/makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** makefile	3 Jan 2005 18:00:59 -0000	1.1.1.1
--- makefile	6 Jan 2005 17:00:45 -0000	1.2
***************
*** 1,4 ****
! NAME=detatch
! CSYM=detatch
  
  current: pd_linux
--- 1,4 ----
! NAME=detach
! CSYM=detach
  
  current: pd_linux





More information about the Pd-cvs mailing list