Here's a vanilla approach using the .n sprintf function of makefilename. Not completely tested...
Matt
Great!!!!!!!!!!!!!
I tried to find a way of doing it in Vanilla but I couldn't!! I didn't think about this approach!
By the way one question: Does [makefilename] support _exactly_ _everything_ that "sprintf" in C supports?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Matteo Sisti Sette wrote:
By the way one question: Does [makefilename] support _exactly_ _everything_ that "sprintf" in C supports?
unfortunately not. in order to make [makefilename] not crash on almost everything you feed it, the format-string has to be parsed. this is done in a rather incomplete way. (most if not all format modifiers won't work)
fgmasdr IOhannes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
IOhannes m zmölnig wrote:
Matteo Sisti Sette wrote:
By the way one question: Does [makefilename] support _exactly_ _everything_ that "sprintf" in C supports?
unfortunately not. in order to make [makefilename] not crash on almost everything you feed it, the format-string has to be parsed. this is done in a rather incomplete way. (most if not all format modifiers won't work)
actually, it probabably does work most of the time.
i stand corrected.
fgamsdr IOhannes
On Mon, 16 Nov 2009, IOhannes m zmölnig wrote:
unfortunately not. in order to make [makefilename] not crash on almost everything you feed it, the format-string has to be parsed. this is done in a rather incomplete way. (most if not all format modifiers won't work)
actually, it probabably does work most of the time. i stand corrected.
It works all of the time that you avoid the things that don't work, and it works none of the time that you try to use the things that don't work. (What do you mean by «most of the time» ?)
For example, [makefilename %*d] crashes pd.
But then, even [makefilename %f_%s] crashes pd.
And then, [makefilename %ld] fails in 64-bit mode, in the same way that [makefilename %lld] fails all of the time.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801