[PD] [declare -stdpath] relative to what?

Roman Haefeli reduzierer at yahoo.de
Sun Aug 12 00:59:22 CEST 2007


hi again

from the help-file i got an idea, how about it is supposed to work, but
i can't get it work. can you make me a working example? did you test
this feature?

here a real-world example (from my first post in this thread):

location of pd:
/usr/local/bin/pd

and i wanted to load [bp2~] from 'iemabs':
/usr/local/lib/pd/extra/iemabs/

therefore i tried:
[declare -stdpath iemabs] (assuming 'extra' is the standard location)
[declare -stdpath ../lib/pd/extra/iemabs] (relative to the pd binary)
[declare -stdpath extra/iemabs]


for each example, i first saved the patch with the [declared] and
reloaded it and tried to instantiate [bp2~], but it always failed. i
can't imagine, what argument i am supposed to give to [declare
-stdpath].

here is what i get from verbose output:

- [declare -stdpath extra/iemabs]

tried /home/roman/netpd/extra/iemabs/bp2~.l_i386 and failed
tried /home/roman/netpd/abs/bp2~.l_i386 and failed
tried /home/roman/netpd/doc/bp2~.l_i386 and failed
tried /home/roman/netpd/bp2~.l_i386 and failed
tried /usr/local/lib/pd/extra/bp2~.l_i386 and failed
tried /home/roman/netpd/extra/iemabs/bp2~.pd_linux and failed
tried /home/roman/netpd/abs/bp2~.pd_linux and failed
tried /home/roman/netpd/doc/bp2~.pd_linux and failed
tried /home/roman/netpd/bp2~.pd_linux and failed
tried /usr/local/lib/pd/extra/bp2~.pd_linux and failed
tried /home/roman/netpd/extra/iemabs/bp2~/bp2~.l_i386 and failed
tried /home/roman/netpd/abs/bp2~/bp2~.l_i386 and failed
tried /home/roman/netpd/doc/bp2~/bp2~.l_i386 and failed
tried /home/roman/netpd/bp2~/bp2~.l_i386 and failed
tried /usr/local/lib/pd/extra/bp2~/bp2~.l_i386 and failed
tried /home/roman/netpd/extra/iemabs/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/abs/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/doc/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/bp2~/bp2~.pd_linux and failed
tried /usr/local/lib/pd/extra/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/extra/iemabs/bp2~.pd and failed
tried /home/roman/netpd/abs/bp2~.pd and failed
tried /home/roman/netpd/doc/bp2~.pd and failed
tried /home/roman/netpd/bp2~.pd and failed
tried /usr/local/lib/pd/extra/bp2~.pd and failed
tried /home/roman/netpd/extra/iemabs/bp2~.pat and failed
tried /home/roman/netpd/abs/bp2~.pat and failed
tried /home/roman/netpd/doc/bp2~.pat and failed
tried /home/roman/netpd/bp2~.pat and failed
tried /usr/local/lib/pd/extra/bp2~.pat and failed
 bp2~
... couldn't create


- [declare -stdpath iemabs]

tried /home/roman/netpd/iemabs/bp2~.l_i386 and failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~.l_i386 and
failed
tried /home/roman/netpd/abs/bp2~.l_i386 and failed
tried /home/roman/netpd/doc/bp2~.l_i386 and failed
tried /home/roman/netpd/bp2~.l_i386 and failed
tried /usr/local/lib/pd/extra/bp2~.l_i386 and failed
tried /home/roman/netpd/iemabs/bp2~.pd_linux and failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~.pd_linux and
failed
tried /home/roman/netpd/abs/bp2~.pd_linux and failed
tried /home/roman/netpd/doc/bp2~.pd_linux and failed
tried /home/roman/netpd/bp2~.pd_linux and failed
tried /usr/local/lib/pd/extra/bp2~.pd_linux and failed
tried /home/roman/netpd/iemabs/bp2~/bp2~.l_i386 and failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~/bp2~.l_i386
and failed
tried /home/roman/netpd/abs/bp2~/bp2~.l_i386 and failed
tried /home/roman/netpd/doc/bp2~/bp2~.l_i386 and failed
tried /home/roman/netpd/bp2~/bp2~.l_i386 and failed
tried /usr/local/lib/pd/extra/bp2~/bp2~.l_i386 and failed
tried /home/roman/netpd/iemabs/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/abs/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/doc/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/bp2~/bp2~.pd_linux and failed
tried /usr/local/lib/pd/extra/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/iemabs/bp2~.pd and failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~.pd and
failed
tried /home/roman/netpd/abs/bp2~.pd and failed
tried /home/roman/netpd/doc/bp2~.pd and failed
tried /home/roman/netpd/bp2~.pd and failed
tried /usr/local/lib/pd/extra/bp2~.pd and failed
tried /home/roman/netpd/iemabs/bp2~.pat and failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~.pat and
failed
tried /home/roman/netpd/abs/bp2~.pat and failed
tried /home/roman/netpd/doc/bp2~.pat and failed
tried /home/roman/netpd/bp2~.pat and failed
tried /usr/local/lib/pd/extra/bp2~.pat and failed
 bp2~
... couldn't create


- [declare -stdpath ../lib/pd/extra/iemabs]

tried /home/roman/netpd/../lib/pd/extra/iemabs/bp2~.l_i386 and failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~.l_i386 and
failed
tried /home/roman/netpd/abs/bp2~.l_i386 and failed
tried /home/roman/netpd/doc/bp2~.l_i386 and failed
tried /home/roman/netpd/bp2~.l_i386 and failed
tried /usr/local/lib/pd/extra/bp2~.l_i386 and failed
tried /home/roman/netpd/../lib/pd/extra/iemabs/bp2~.pd_linux and failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~.pd_linux and
failed
tried /home/roman/netpd/abs/bp2~.pd_linux and failed
tried /home/roman/netpd/doc/bp2~.pd_linux and failed
tried /home/roman/netpd/bp2~.pd_linux and failed
tried /usr/local/lib/pd/extra/bp2~.pd_linux and failed
tried /home/roman/netpd/../lib/pd/extra/iemabs/bp2~/bp2~.l_i386 and
failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~/bp2~.l_i386
and failed
tried /home/roman/netpd/abs/bp2~/bp2~.l_i386 and failed
tried /home/roman/netpd/doc/bp2~/bp2~.l_i386 and failed
tried /home/roman/netpd/bp2~/bp2~.l_i386 and failed
tried /usr/local/lib/pd/extra/bp2~/bp2~.l_i386 and failed
tried /home/roman/netpd/../lib/pd/extra/iemabs/bp2~/bp2~.pd_linux and
failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/abs/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/doc/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/bp2~/bp2~.pd_linux and failed
tried /usr/local/lib/pd/extra/bp2~/bp2~.pd_linux and failed
tried /home/roman/netpd/../lib/pd/extra/iemabs/bp2~.pd and failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~.pd and
failed
tried /home/roman/netpd/abs/bp2~.pd and failed
tried /home/roman/netpd/doc/bp2~.pd and failed
tried /home/roman/netpd/bp2~.pd and failed
tried /usr/local/lib/pd/extra/bp2~.pd and failed
tried /home/roman/netpd/../lib/pd/extra/iemabs/bp2~.pat and failed
tried /home/roman/netpd/doc/5.reference/help-iemmatrix/bp2~.pat and
failed
tried /home/roman/netpd/abs/bp2~.pat and failed
tried /home/roman/netpd/doc/bp2~.pat and failed
tried /home/roman/netpd/bp2~.pat and failed
tried /usr/local/lib/pd/extra/bp2~.pat and failed
 bp2~
... couldn't create


(sorry for this huge post)

i noticed, that it never tries a combination of the prefix
'/usr/local/<whatever>' and the argument i give, wich means, that it
just doesn't try 'standard' locations, as the help-files mentions. it
only tries either  '/usr/local/<whatever>/<classname>.<suffix>' or
'/<path_of_the_patch>/<argument_i_give_to_declare>.

roman


On Sat, 2007-08-11 at 15:06 -0700, Miller Puckette wrote:
> Oops, my mistake.
> 
> In "declare" systax, "-stdpath" does take an argument... if you give it
> foo/bar, for example, the directory searched is .../pd/foo/bar.
> 
> My bad for naming it the same as the command-line argument, which does
> something different.
> 
> cheers
> Miller
> 
> On Sat, Aug 11, 2007 at 04:38:31PM -0400, Mathieu Bouchard wrote:
> > On Sat, 11 Aug 2007, Miller Puckette wrote:
> > >On Sat, Aug 11, 2007 at 07:26:05PM +0200, Roman Haefeli wrote:
> > >>i just figured out, that i don't know how to use [declare -stdpath]. the
> > >In vanilla at least, -stdpath and -nostdpath simpl turn on and off 
> > >searching
> > >in the "extra" directory of Pd.  It takes no argument.
> > 
> > Roman is not even talking about that feature. He's talking about the other 
> > feature of the same name. It's in a class named [declare]. You added 
> > [declare] in 0.40. It is implemented by canvas_declare, a function that 
> > you wrote for 0.40. That feature takes an argument, as you wrote in the 
> > code:
> > 
> >         else if ((argc > i+1) && !strcmp(flag, "-stdpath"))
> >         {
> >             strncpy(strbuf, sys_libdir->s_name, MAXPDSTRING-3);
> >             strbuf[MAXPDSTRING-4] = 0;
> >             strcat(strbuf, "/");
> >             strncpy(strbuf, atom_getsymbolarg(i+1, argc, argv)->s_name,
> >                 MAXPDSTRING-strlen(strbuf));
> >             strbuf[MAXPDSTRING-1] = 0;
> >             e->ce_path = namelist_append(e->ce_path, strbuf, 0);
> >             i++;
> >         }
> > 
> > Because atom_getsymbolarg takes an argument, and i++ augments the counter 
> > so that it points to the beginning of the next option, which is after that 
> > argument. This is what you wrote.
> > 
> >  _ _ __ ___ _____ ________ _____________ _____________________ ...
> > | Mathieu Bouchard - t?l:+1.514.383.3801, Montr?al QC Canada
> 
> > _______________________________________________
> > PD-list at iem.at mailing list
> > UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
> 
> 
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list


		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de





More information about the Pd-list mailing list