[PD-dev] [ pure-data-Patches-1405137 ] multiple $arg-expansion

SourceForge.net noreply at sourceforge.net
Mon Jun 26 17:56:05 CEST 2006


Patches item #1405137, was opened at 2006-01-13 20:33
Message generated for change (Comment added) made by zmoelnig
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1405137&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: wishlist
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: IOhannes m zmölnig (zmoelnig)
Assigned to: Miller Puckette (millerpuckette)
Summary: multiple $arg-expansion

Initial Comment:
currently $args can only be at the beginning of a
A_DOLLARSYM.

this patch allows to have multiple $args within 1
A_DOLLARSYM.
e.g. with "foo bar me" the symbol "$1-bla-$3/$2" will
expand to "foo-bla-me/bar"

the patch only modifies binbuf_realizedollsym() in
m_binbuf.c (and adds another non-exported helper
function binbuf_expanddollsym())

the patch is straightforward, but probably i
misunderstood the meaning of "tonew" and implemented it
in a wrong way (so you should check that)

caveat: the A_DOLLARSYM still has to start with
"$[0-9]". this is the way, pd determines whether a
given symbol should be $-expanded or not. furthermore,
the leading $ is usually stripped by pd.
e.g. if you type [$1-bar-$2], the symbol "1-bar-$2" is
stored as A_DOLLARSYM. this means that the beginning of
the dollarsymbol always has to be expanded.
furthermore,  [bar-$2] will _never_ be expanded (since
pd thinks it is an ordinary symbol).

i didn't dare to change this behaviour since
SETDOLLARSYM() and binbuf_realizedollsym() are exposed
in m_pd.h and probably used in externals which would
then break.
however, whenever this might change,
binbuf_expanddollsym() is prepared (just need to "#if 1")



----------------------------------------------------------------------

>Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2006-06-26 17:56

Message:
Logged In: YES 
user_id=564396

accepted into pd-0.40

----------------------------------------------------------------------

Comment By: Miller Puckette (millerpuckette)
Date: 2006-06-03 21:03

Message:
Logged In: YES 
user_id=313747

I think it's worth changing binbuf_realizedollsym() behavior;
I doubt many people will use it in a way that would break
things.  So I took everything for 0.40 as of "test 02".


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1405137&group_id=55736




More information about the Pd-dev mailing list