Hi,
Here is another version of the patch, this one applies cleanly against version 0.39-2 (The other one was against the HEAD version of pd CVS).
Günter
PS: For those who wonder, these are not pd patches, but source code patches. They are meant for developers.