[PD-cvs] externals/miXed/cyclone/shadow Makefile.objects,1.5,1.6 cyclone.c,1.8,1.9 dummies.c,1.9,1.10 maxmode.c,1.2,1.3

Krzysztof Czaja krzyszcz at users.sourceforge.net
Thu Jan 27 15:42:50 CET 2005


Update of /cvsroot/pure-data/externals/miXed/cyclone/shadow
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23748/cyclone/shadow

Modified Files:
	Makefile.objects cyclone.c dummies.c maxmode.c 
Log Message:
cyclone alpha52 and toxy alpha15 (see notes.txt for cyclone, toxy and shared)

Index: dummies.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/shadow/dummies.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** dummies.c	11 Jan 2005 10:33:20 -0000	1.9
--- dummies.c	27 Jan 2005 14:42:47 -0000	1.10
***************
*** 149,152 ****
--- 149,153 ----
  }
  
+ #if 0
  static void *dummy_matrix_tilde_new(t_symbol *s, int ac, t_atom *av)
  {
***************
*** 169,172 ****
--- 170,174 ----
      return (x);
  }
+ #endif
  
  static void *dummy_rewire_tilde_new(t_symbol *s, int ac, t_atom *av)
***************
*** 407,411 ****
--- 409,415 ----
      { "led",             1, 1, 0, 0 },
      { "matrixctrl",      1, 1, 0, 0 },  /* CHECKME nins, nouts */
+ #if 0
      { "matrix~",        -1, -1, 0, (t_newmethod)dummy_matrix_tilde_new },
+ #endif
      { "menubar",         1, 4, 0, 0 },  /* LATER parse #Xs (additional outs) */
      { "meter~",          1, 1, 0, 0 },  /* LATER consider mapping to the vu */

Index: cyclone.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/shadow/cyclone.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** cyclone.c	11 Jan 2005 10:33:20 -0000	1.8
--- cyclone.c	27 Jan 2005 14:42:47 -0000	1.9
***************
*** 20,25 ****
  {
      t_object       x_ob;
-     t_symbol      *x_dir;
-     t_symbol      *x_canvasdir;
      t_hammerfile  *x_filehandle;
  } t_cyclone;
--- 20,23 ----
***************
*** 33,47 ****
  static void cyclone_readhook(t_pd *z, t_symbol *fn, int ac, t_atom *av)
  {
!     import_max(fn->s_name, "");
  }
  
! static void cyclone_doimport(t_cyclone *x, t_symbol *fn, t_symbol *dir)
  {
-     if (!dir || dir == &s_)
- 	dir = x->x_dir;
      if (fn && fn != &s_)
! 	import_max(fn->s_name, (dir && dir != &s_) ? dir->s_name : "");
!     else
! 	hammerpanel_open(x->x_filehandle, dir);
  }
  
--- 31,48 ----
  static void cyclone_readhook(t_pd *z, t_symbol *fn, int ac, t_atom *av)
  {
!     int result = import_max(fn->s_name, "");
!     outlet_float(((t_object *)z)->ob_outlet, (t_float)result);
  }
  
! static void cyclone_doimport(t_cyclone *x, t_symbol *fn)
  {
      if (fn && fn != &s_)
!     {
! 	t_symbol *dir = hammerpanel_getopendir(x->x_filehandle);
! 	int result =
! 	    import_max(fn->s_name, (dir && dir != &s_ ? dir->s_name : ""));
! 	outlet_float(((t_object *)x)->ob_outlet, (t_float)result);
!     }
!     else hammerpanel_open(x->x_filehandle, 0);
  }
  
***************
*** 49,69 ****
  			  t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
  {
!     cyclone_doimport(x, 0, 0);
  }
  
  static void cyclone_import(t_cyclone *x, t_symbol *fn)
  {
!     cyclone_doimport(x, fn, 0);
  }
  
  static void cyclone_cd(t_cyclone *x, t_symbol *dir)
  {
!     /* LATER hammerfile interface for relative jumps, etc. */
!     x->x_dir = (dir && dir != &s_ ? dir : x->x_canvasdir);
  }
  
! static void cyclone_pwd(t_cyclone *x)
  {
!     outlet_symbol(((t_object *)x)->ob_outlet, x->x_dir);
  }
  
--- 50,71 ----
  			  t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
  {
!     cyclone_doimport(x, 0);
  }
  
  static void cyclone_import(t_cyclone *x, t_symbol *fn)
  {
!     cyclone_doimport(x, fn);
  }
  
  static void cyclone_cd(t_cyclone *x, t_symbol *dir)
  {
!     hammerpanel_setopendir(x->x_filehandle, dir);
  }
  
! static void cyclone_pwd(t_cyclone *x, t_symbol *s)
  {
!     t_symbol *dir;
!     if (s && s->s_thing && (dir = hammerpanel_getopendir(x->x_filehandle)))
! 	pd_symbol(s->s_thing, dir);
  }
  
***************
*** 90,96 ****
      t_cyclone *x = (t_cyclone *)pd_new(cyclone_class);
      x->x_filehandle = hammerfile_new((t_pd *)x, 0, cyclone_readhook, 0, 0);
!     x->x_canvasdir = canvas_getdir(x->x_filehandle->f_canvas);
!     x->x_dir = x->x_canvasdir;
!     outlet_new((t_object *)x, &s_symbol);
      return (x);
  }
--- 92,96 ----
      t_cyclone *x = (t_cyclone *)pd_new(cyclone_class);
      x->x_filehandle = hammerfile_new((t_pd *)x, 0, cyclone_readhook, 0, 0);
!     outlet_new((t_object *)x, &s_float);
      return (x);
  }
***************
*** 115,119 ****
  		    gensym("cd"), A_DEFSYM, 0);
      class_addmethod(cyclone_class, (t_method)cyclone_pwd,
! 		    gensym("pwd"), 0);
      class_addmethod(cyclone_class, (t_method)cyclone_import,
  		    gensym("import"), A_DEFSYM, 0);
--- 115,119 ----
  		    gensym("cd"), A_DEFSYM, 0);
      class_addmethod(cyclone_class, (t_method)cyclone_pwd,
! 		    gensym("pwd"), A_SYMBOL, 0);
      class_addmethod(cyclone_class, (t_method)cyclone_import,
  		    gensym("import"), A_DEFSYM, 0);

Index: maxmode.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/shadow/maxmode.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** maxmode.c	11 Jan 2005 10:33:20 -0000	1.2
--- maxmode.c	27 Jan 2005 14:42:47 -0000	1.3
***************
*** 17,23 ****
  {
      t_object       x_ob;
-     t_symbol      *x_dir;
-     t_symbol      *x_canvasdir;
      t_hammerfile  *x_filehandle;
  } t_maxmode;
  
--- 17,22 ----
  {
      t_object       x_ob;
      t_hammerfile  *x_filehandle;
+     t_outlet      *x_modeout;
  } t_maxmode;
  
***************
*** 30,44 ****
  static void maxmode_readhook(t_pd *z, t_symbol *fn, int ac, t_atom *av)
  {
!     import_max(fn->s_name, "");
  }
  
! static void maxmode_doimport(t_maxmode *x, t_symbol *fn, t_symbol *dir)
  {
-     if (!dir || dir == &s_)
- 	dir = x->x_dir;
      if (fn && fn != &s_)
! 	import_max(fn->s_name, (dir && dir != &s_) ? dir->s_name : "");
!     else
! 	hammerpanel_open(x->x_filehandle, dir);
  }
  
--- 29,47 ----
  static void maxmode_readhook(t_pd *z, t_symbol *fn, int ac, t_atom *av)
  {
!     int result = import_max(fn->s_name, "");
!     outlet_float(((t_object *)z)->ob_outlet, (t_float)result);
  }
  
! static void maxmode_doimport(t_maxmode *x, t_symbol *fn)
  {
      if (fn && fn != &s_)
!     {
! 	t_symbol *dir = hammerpanel_getopendir(x->x_filehandle);
! 	int result =
! 	    import_max(fn->s_name, (dir && dir != &s_ ? dir->s_name : ""));
! 	outlet_float(((t_object *)x)->ob_outlet, (t_float)result);
!     }
!     else hammerpanel_open(x->x_filehandle, 0);
! 
  }
  
***************
*** 46,66 ****
  			  t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
  {
!     maxmode_doimport(x, 0, 0);
  }
  
  static void maxmode_import(t_maxmode *x, t_symbol *fn)
  {
!     maxmode_doimport(x, fn, 0);
  }
  
  static void maxmode_cd(t_maxmode *x, t_symbol *dir)
  {
!     /* LATER hammerfile interface for relative jumps, etc. */
!     x->x_dir = (dir && dir != &s_ ? dir : x->x_canvasdir);
  }
  
! static void maxmode_pwd(t_maxmode *x)
  {
!     outlet_symbol(((t_object *)x)->ob_outlet, x->x_dir);
  }
  
--- 49,85 ----
  			  t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
  {
!     maxmode_doimport(x, 0);
  }
  
  static void maxmode_import(t_maxmode *x, t_symbol *fn)
  {
!     maxmode_doimport(x, fn);
  }
  
  static void maxmode_cd(t_maxmode *x, t_symbol *dir)
  {
!     hammerpanel_setopendir(x->x_filehandle, dir);
  }
  
! static void maxmode_pwd(t_maxmode *x, t_symbol *s)
  {
!     t_symbol *dir;
!     if (s && s->s_thing && (dir = hammerpanel_getopendir(x->x_filehandle)))
! 	pd_symbol(s->s_thing, dir);
! }
! 
! static void maxmode_set(t_maxmode *x, t_symbol *s)
! {
!     if (!s || s == &s_)
! 	s = gensym("none");
!     if (s != fitter_getmode())
! 	fitter_setmode(s);
! }
! 
! static void maxmode_get(t_maxmode *x)
! {
!     t_symbol *mode;
!     if (mode = fitter_getmode())
! 	outlet_symbol(x->x_modeout, mode);
  }
  
***************
*** 80,83 ****
--- 99,103 ----
  static void maxmode_free(t_maxmode *x)
  {
+     /* FIXME cancel registration */
      hammerfile_free(x->x_filehandle);
  }
***************
*** 86,89 ****
--- 106,110 ----
  {
      t_maxmode *x = (t_maxmode *)pd_new(maxmode_class);
+     int selective = ac;
      if (maxmode_withbanner && !ac)
      {
***************
*** 94,116 ****
  	maxmode_withbanner = 0;
      }
!     if (!fittermax_get())
      {
! 	int selective = 0;
! 	if (ac)
  	{
! 	    while (ac--) if (av->a_type == A_SYMBOL)
! 	    {
! 		/* FIXME register into fitter for per-patch, selective
! 		   compatibility control */
! 		av++;
! 	    }
  	}
- 	if (!selective)
- 	    fittermax_set();
      }
      x->x_filehandle = hammerfile_new((t_pd *)x, 0, maxmode_readhook, 0, 0);
!     x->x_canvasdir = canvas_getdir(x->x_filehandle->f_canvas);
!     x->x_dir = x->x_canvasdir;
!     outlet_new((t_object *)x, &s_symbol);
      return (x);
  }
--- 115,134 ----
  	maxmode_withbanner = 0;
      }
!     if (selective)
      {
! 	/* a numeric argument is valid -- transparent object is created
! 	   (global mode is not set, nothing is registered) */
! 	while (ac--) if (av->a_type == A_SYMBOL)
  	{
! 	    /* FIXME register into fitter for per-patch-file, selective
! 	       compatibility control */
! 	    av++;
  	}
      }
+     else if (!fittermax_get())
+ 	fittermax_set();
      x->x_filehandle = hammerfile_new((t_pd *)x, 0, maxmode_readhook, 0, 0);
!     outlet_new((t_object *)x, &s_float);
!     x->x_modeout = outlet_new((t_object *)x, &s_symbol);
      return (x);
  }
***************
*** 129,136 ****
  			      sizeof(t_maxmode), 0, A_GIMME, 0);
      class_addbang(maxmode_class, maxmode_bang);
      class_addmethod(maxmode_class, (t_method)maxmode_cd,
  		    gensym("cd"), A_DEFSYM, 0);
      class_addmethod(maxmode_class, (t_method)maxmode_pwd,
! 		    gensym("pwd"), 0);
      class_addmethod(maxmode_class, (t_method)maxmode_import,
  		    gensym("import"), A_DEFSYM, 0);
--- 147,158 ----
  			      sizeof(t_maxmode), 0, A_GIMME, 0);
      class_addbang(maxmode_class, maxmode_bang);
+     class_addmethod(maxmode_class, (t_method)maxmode_set,
+ 		    gensym("set"), A_DEFSYM, 0);
+     class_addmethod(maxmode_class, (t_method)maxmode_get,
+ 		    gensym("get"), 0);
      class_addmethod(maxmode_class, (t_method)maxmode_cd,
  		    gensym("cd"), A_DEFSYM, 0);
      class_addmethod(maxmode_class, (t_method)maxmode_pwd,
! 		    gensym("pwd"), A_SYMBOL, 0);
      class_addmethod(maxmode_class, (t_method)maxmode_import,
  		    gensym("import"), A_DEFSYM, 0);
***************
*** 142,146 ****
      if (canvas_getcurrent())
      {
! 	fitter_setup(0, 0, 0);
  	if (!zgetfn(&pd_objectmaker, gensym("cyclone")))
  	    /* cycloneless maxmode -- banner is posted by the oldest
--- 164,168 ----
      if (canvas_getcurrent())
      {
! 	fitter_setup(0, 0);
  	if (!zgetfn(&pd_objectmaker, gensym("cyclone")))
  	    /* cycloneless maxmode -- banner is posted by the oldest

Index: Makefile.objects
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/cyclone/shadow/Makefile.objects,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Makefile.objects	11 Jan 2005 10:33:20 -0000	1.5
--- Makefile.objects	27 Jan 2005 14:42:47 -0000	1.6
***************
*** 2,5 ****
--- 2,6 ----
  common/loud.o \
  common/grow.o \
+ common/os.o \
  common/fitter.o \
  common/lex.o \





More information about the Pd-cvs mailing list