[PD-cvs] externals/OSCx/src OSCroute.c,1.4,1.5
Frank Barknecht
fbar at users.sourceforge.net
Tue Jun 28 20:38:01 CEST 2005
- Previous message: [PD-cvs] pd/portaudio/pablio README.txt, NONE, 1.2.2.2 pablio.c, NONE, 1.2.2.2 pablio.def, NONE, 1.2.2.2 pablio.h, NONE, 1.2.2.2 ringbuffer.c, NONE, 1.2.2.2 ringbuffer.h, NONE, 1.2.2.2 test_rw.c, NONE, 1.2.2.2 test_rw_echo.c, NONE, 1.2.2.2 test_w_saw.c, NONE, 1.2.2.2 test_w_saw8.c, NONE, 1.2.2.2
- Next message: [PD-cvs] externals/iemlib/src/iemlib2 receive2list.c,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/pure-data/externals/OSCx/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12620
Modified Files:
OSCroute.c
Log Message:
Added back a test against "/*" which will strip off the first element in a
OSC-message.
Index: OSCroute.c
===================================================================
RCS file: /cvsroot/pure-data/externals/OSCx/src/OSCroute.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** OSCroute.c 19 Aug 2004 22:01:38 -0000 1.4
--- OSCroute.c 28 Jun 2005 18:37:59 -0000 1.5
***************
*** 31,34 ****
--- 31,35 ----
Match a pattern against a pattern?
+ [Done: Only Slash-Star is allowed, see MyPatternMatch.]
Declare outlet types / distinguish leaf nodes from other children
More sophisticated (2-pass?) allmessages scheme
***************
*** 71,74 ****
--- 72,89 ----
*/
+ static Boolean MyPatternMatch (const char *pattern, const char *test)
+ {
+ // This allows the special case of "OSCroute /* " to be an outlet that
+ // matches anything; i.e., it always outputs the input with the first level
+ // of the address stripped off.
+
+ if (test[0] == '*' && test[1] == '\0') {
+ return 1;
+ } else {
+ return PatternMatch(pattern, test);
+ }
+ }
+
+
static t_class *OSCroute_class;
***************
*** 311,315 ****
for (i = 0; i < x->x_num; ++i) {
! if (PatternMatch(pattern+1, x->x_prefixes[i]+1)) {
++matchedAnything;
--- 326,330 ----
for (i = 0; i < x->x_num; ++i) {
! if (MyPatternMatch(pattern+1, x->x_prefixes[i]+1)) {
++matchedAnything;
***************
*** 352,356 ****
for (i = 0; i < x->x_num; ++i) {
! if (PatternMatch(patternBegin, x->x_prefixes[i]+1)) {
++matchedAnything;
if (restOfPattern == 0) {
--- 367,371 ----
for (i = 0; i < x->x_num; ++i) {
! if (MyPatternMatch(patternBegin, x->x_prefixes[i]+1)) {
++matchedAnything;
if (restOfPattern == 0) {
- Previous message: [PD-cvs] pd/portaudio/pablio README.txt, NONE, 1.2.2.2 pablio.c, NONE, 1.2.2.2 pablio.def, NONE, 1.2.2.2 pablio.h, NONE, 1.2.2.2 ringbuffer.c, NONE, 1.2.2.2 ringbuffer.h, NONE, 1.2.2.2 test_rw.c, NONE, 1.2.2.2 test_rw_echo.c, NONE, 1.2.2.2 test_w_saw.c, NONE, 1.2.2.2 test_w_saw8.c, NONE, 1.2.2.2
- Next message: [PD-cvs] externals/iemlib/src/iemlib2 receive2list.c,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Pd-cvs
mailing list