[PD-dev] pd 0.37 and help patches
Hans-Christoph Steiner
hans at eds.org
Mon Sep 15 17:47:27 CEST 2003
On Sunday, Sep 14, 2003, at 22:16 America/New_York, Yves Degoyon wrote:
> hi,
>
> it seems now, with 0.37, that pd cannot find usual help files
> because it systematically prepends "help-" to the searched file,
> mm, that's annoying for the tons of objects that
> register their own help files in separate directory like
> pidip/my-help-file.pd.
>
> from s_path.c :
> strcpy(realname, "help-");
>
> results into :
>
> > tried /usr/local/pd-0.37-test7/pidip/help-help_pdp_imgloader.pd and
> failed
> > tried
> /usr/local/pd-0.37-test7/doc/5.reference/help-help_pdp_imgloader.pd
> and failed
> > sorry, couldn't find help for "help_pdp_imgloader.pd"
>
> sorry, but the error message is even wrong.
> i'd rather this rule be removed
> if you don't mind.
>
The whole 'help-' thing is a bit of a mess right now since Pd is
automatically prepending help- to the name of the help file, even if it
was declared with a class_sethelpsymbol() with a help- already
prepended. So I see a couple options to remedy the situation:
1)
#if PD_MINOR_VERSION < 37 || !defined(PD_MINOR_VERSION)
class_sethelpsymbol(audience_class_tilde,
gensym("help-audience~.pd"));
#endif
(but that's a whooole lot of objects to edit, basically almost every
object in the CVS)
2)
/* strcpy(realname, "help-"); */
/* strncat(realname, name, MAXPDSTRING-5); */
strncat(realname, name, MAXPDSTRING);
...
post("sorry, couldn't find help for \"%s\"", realname);
(there is probably a better way to do this, but you get the idea)
3) writing code to only prepend 'help-' if it isn't already there.
#2 sounds like the easiest and most expedient option, but I don't know
entirely what the repercussions would be, if any. #3 sounds like the
best for the long haul. #1 sounds like a ton of menial work.
.hc
More information about the Pd-dev
mailing list