Update of /cvsroot/pure-data/externals/sprinkler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4379
Modified Files: Changes README.pod configure.in sprinkler-help.pd.in sprinkler.c Log Message: sprinkler v0.05 + added pass-through outlet for unbound destination symbols + added hack to prevent 'bang's being sprinkled as 'normal' symbols
Index: Changes =================================================================== RCS file: /cvsroot/pure-data/externals/sprinkler/Changes,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Changes 17 Aug 2003 11:26:57 -0000 1.2 --- Changes 23 Feb 2004 00:32:33 -0000 1.3 *************** *** 1,7 **** Change log for PD external 'sprinkler' (formerly 'forward')
! v0.04 Sun, 17 Aug 2003 13:23:54 +0200 ! + removed stale "VERSION" file ! + tested with gcc-2.95.4 and pd-0.37-test8
v0.03 Sun Sep 8 00:56:33 CEST 2002 --- 1,11 ---- Change log for PD external 'sprinkler' (formerly 'forward')
! v0.05 Mon, 23 Feb 2004 01:14:08 +0100 ! + added pass-through outlet for unbound destination symbols ! + added hack to prevent 'bang's being sprinkled as 'normal' symbols ! ! v0.04 Thu, 29 Jan 2004 16:26:00 +0100 ! + added error() call for missing destinations ! + todo: add pass-through outlet for missing destinations
v0.03 Sun Sep 8 00:56:33 CEST 2002
Index: README.pod =================================================================== RCS file: /cvsroot/pure-data/externals/sprinkler/README.pod,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README.pod 17 Aug 2003 11:26:57 -0000 1.2 --- README.pod 23 Feb 2004 00:32:33 -0000 1.3 *************** *** 3,8 **** README for pd external 'sprinkler' (formerly 'forward')
- Last updated for sprinkler v0.04 - =head1 DESCRIPTION
--- 3,6 ----
Index: configure.in =================================================================== RCS file: /cvsroot/pure-data/externals/sprinkler/configure.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** configure.in 17 Aug 2003 11:26:57 -0000 1.2 --- configure.in 23 Feb 2004 00:32:33 -0000 1.3 *************** *** 2,6 **** dnl -- adapted from 'configure.in' in ggee distribution by Guenter Geiger AC_PREREQ(2.5) ! AC_INIT(sprinkler, [0.04], [moocow@ling.uni-potsdam.de])
dnl --- 2,6 ---- dnl -- adapted from 'configure.in' in ggee distribution by Guenter Geiger AC_PREREQ(2.5) ! AC_INIT(sprinkler, [0.05], [moocow@ling.uni-potsdam.de])
dnl *************** *** 90,101 **** DFLAGS="$DFLAGS -DNON_MAX_FORWARD" SPRINKLER_COMPAT_TEXT=["(with MAX-incompatible [forward] alias)"] ! SPRINKLER_ALIAS_1="#X obj 102 327 forward;" ! SPRINKLER_ALIAS_2="#X obj 102 352 fw;" else AC_MSG_RESULT(no) NON_MAX_FORWARD="no" SPRINKLER_COMPAT_TEXT=["(formerly MAX-incompatible [forward])"] ! SPRINKLER_ALIAS_1="#X text 102 327 none;" ! SPRINKLER_ALIAS_2="#X text 102 352 (disabled);" fi AC_SUBST(NON_MAX_FORWARD) --- 90,101 ---- DFLAGS="$DFLAGS -DNON_MAX_FORWARD" SPRINKLER_COMPAT_TEXT=["(with MAX-incompatible [forward] alias)"] ! SPRINKLER_ALIAS_1="#X obj 102 407 forward;" ! SPRINKLER_ALIAS_2="#X obj 102 432 fw;" else AC_MSG_RESULT(no) NON_MAX_FORWARD="no" SPRINKLER_COMPAT_TEXT=["(formerly MAX-incompatible [forward])"] ! SPRINKLER_ALIAS_1="#X text 102 407 none;" ! SPRINKLER_ALIAS_2="#X text 102 432 (disabled);" fi AC_SUBST(NON_MAX_FORWARD)
Index: sprinkler-help.pd.in =================================================================== RCS file: /cvsroot/pure-data/externals/sprinkler/sprinkler-help.pd.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** sprinkler-help.pd.in 8 Sep 2002 00:15:23 -0000 1.1.1.1 --- sprinkler-help.pd.in 23 Feb 2004 00:32:33 -0000 1.2 *************** *** 1,21 **** ! #N canvas 186 52 500 508 10; ! #X floatatom 26 36 5 0 0; ! #X symbolatom 36 100 10 0 0; ! #X text 25 309 ARGUMENTS: none; ! #X text 183 307 INLETS:; ! #X text 183 343 OUTLETS: none; #X text 217 161 forward lists; #X text 161 45 forward single floats; #X text 169 107 forward single symbols; ! #X text 41 379 NOTES:; ! #X text 185 321 1 - list or message of the form DST MSG; ! #X text 165 477 Bryan Jurish moocow@ling.uni-potsdam.de; ! #X floatatom 118 254 5 0 0; ! #X obj 54 254 pack s 0; ! #X text 175 219 dynamic destination; #X msg 45 153 420; ! #X obj 26 284 sprinkler; #X text 53 3 sprinkler : dynamic control-message dissemination; ! #X text 41 393 When a [sprinkler] object gets an input message of the form "DST MSG" at its inlet , the message MSG is sent to the [receive] object(s) named by DST. 'sprinkler' is really only useful if you don't --- 1,21 ---- ! #N canvas 193 23 510 596 10; ! #X floatatom 26 36 5 0 0 0 - - -; ! #X symbolatom 36 100 10 0 0 0 - - -; ! #X text 25 389 ARGUMENTS: none; ! #X text 183 387 INLETS:; ! #X text 183 423 OUTLETS: none; #X text 217 161 forward lists; #X text 161 45 forward single floats; #X text 169 107 forward single symbols; ! #X text 41 469 NOTES:; ! #X text 185 401 1 - list or message of the form DST MSG; ! #X text 165 567 Bryan Jurish moocow@ling.uni-potsdam.de; ! #X floatatom 117 257 5 0 0 0 - - -; ! #X obj 53 257 pack s 0; ! #X text 178 224 dynamic destination; #X msg 45 153 420; ! #X obj 25 326 sprinkler; #X text 53 3 sprinkler : dynamic control-message dissemination; ! #X text 41 483 When a [sprinkler] object gets an input message of the form "DST MSG" at its inlet , the message MSG is sent to the [receive] object(s) named by DST. 'sprinkler' is really only useful if you don't *************** *** 25,35 **** #X msg 35 121 sprinkler-help2 $1; #X msg 45 177 sprinkler-help1 $1 24 7; ! #X msg 55 209 sprinkler-help1; ! #X msg 61 231 sprinkler-help2; #X obj 340 42 r sprinkler-help1; #X obj 340 64 print sprinkler-help1; #X obj 340 110 r sprinkler-help2; #X obj 340 132 print sprinkler-help2; ! #X text 39 327 ALIASES:; @SPRINKLER_ALIAS_1@ @SPRINKLER_ALIAS_2@ --- 25,38 ---- #X msg 35 121 sprinkler-help2 $1; #X msg 45 177 sprinkler-help1 $1 24 7; ! #X msg 54 212 sprinkler-help1; ! #X msg 60 234 sprinkler-help2; #X obj 340 42 r sprinkler-help1; #X obj 340 64 print sprinkler-help1; #X obj 340 110 r sprinkler-help2; #X obj 340 132 print sprinkler-help2; ! #X obj 25 350 print sprinkler-thru; ! #X text 257 298 this gets passed through; ! #X msg 53 297 illusory-receive-name uh oh; ! #X text 39 407 ALIASES:; @SPRINKLER_ALIAS_1@ @SPRINKLER_ALIAS_2@ *************** *** 40,43 **** --- 43,47 ---- #X connect 12 0 15 0; #X connect 14 0 20 0; + #X connect 15 0 27 0; #X connect 18 0 15 0; #X connect 19 0 15 0; *************** *** 47,48 **** --- 51,53 ---- #X connect 23 0 24 0; #X connect 25 0 26 0; + #X connect 29 0 15 0;
Index: sprinkler.c =================================================================== RCS file: /cvsroot/pure-data/externals/sprinkler/sprinkler.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sprinkler.c 9 Mar 2003 11:10:53 -0000 1.2 --- sprinkler.c 23 Feb 2004 00:32:33 -0000 1.3 *************** *** 59,63 **** *=====================================================================*/
! static char *sprinkler_version = "\nsprinkler version 0.03 by Bryan Jurish : dynamic message dissemination";
static t_class *sprinkler_class; --- 59,63 ---- *=====================================================================*/
! static char *sprinkler_banner = "\nsprinkler version %s by Bryan Jurish : dynamic message dissemination";
static t_class *sprinkler_class; *************** *** 65,69 **** typedef struct _sprinkler { ! t_object x_obj; } t_sprinkler;
--- 65,70 ---- typedef struct _sprinkler { ! t_object x_obj; ! t_outlet *x_thru; //-- pass-through outlet } t_sprinkler;
*************** *** 99,103 **** return; case A_SYMBOL: ! pd_typedmess(dst->s_thing,&s_symbol,argc,argv); return; case A_POINTER: --- 100,109 ---- return; case A_SYMBOL: ! //-- special handling for 'bang' ! if (argv->a_w.w_symbol == &s_bang) { ! pd_typedmess(dst->s_thing,&s_bang,0,0); ! } else { ! pd_typedmess(dst->s_thing,&s_symbol,argc,argv); ! } return; case A_POINTER: *************** *** 115,125 **** case A_CANT: default: ! // just fall though ! ; // empty statement to keep VC++ happy } } // default -- sprinkler anything else with 'pd_forwardmess' pd_forwardmess(dst->s_thing,argc,argv); } }
--- 121,135 ---- case A_CANT: default: ! // just fall though } } // default -- sprinkler anything else with 'pd_forwardmess' pd_forwardmess(dst->s_thing,argc,argv); + return; } + + //post("sprinkler: no destination for `%s'", dst ? dst->s_name : "(null)"); + //-- pass through + outlet_anything(x->x_thru, dst, argc, argv); }
*************** *** 132,141 **** --- 142,160 ---- }
+ + /*-------------------------------------------------------------------- + * newmethod, freemethod + */ void *sprinkler_new(t_symbol *s) { t_sprinkler *x = (t_sprinkler *)pd_new(sprinkler_class); + x->x_thru = outlet_new(&x->x_obj, &s_anything); return (x); }
+ void sprinkler_free(t_sprinkler *x) { + outlet_free(x->x_thru); + } + /*-------------------------------------------------------------------- * setup *************** *** 143,148 **** void sprinkler_setup(void) { ! post(sprinkler_version); ! sprinkler_class = class_new(gensym("sprinkler"), (t_newmethod)sprinkler_new, 0, sizeof(t_sprinkler), 0, 0);
#ifdef NON_MAX_FORWARD --- 162,171 ---- void sprinkler_setup(void) { ! post(sprinkler_banner, PACKAGE_VERSION); ! sprinkler_class = class_new(gensym("sprinkler"), ! (t_newmethod)sprinkler_new, ! (t_method)sprinkler_free, ! sizeof(t_sprinkler), ! 0, 0);
#ifdef NON_MAX_FORWARD