[Gridflow-dev] [patch] fix bug in adding Pd paths when paths were empty

Claude Heiland-Allen claudiusmaximus at goto10.org
Sat Sep 22 13:10:46 EDT 2007


$ cd ~/src/gridflow && pd -lib gridflow
opening examples/doodle.pd can't create [#mouse]
$ cd ~ && pd -path src/gridflow -lib gridflow
opening examples/doodle.pd can create [#mouse]
$ cd ~/src/gridflow && pd -path nonsense -lib gridflow
opening examples/doodle.pd can create [#mouse]

I made some changes to fix the case of no -path, see below.  With this fix:

$ cd ~/src/gridflow && pd -lib gridflow
opening examples/doodle.pd can create [#mouse]

Thanks,

Claude


--- bridge/puredata.c.orig      2007-09-22 17:47:28.000000000 +0100
+++ bridge/puredata.c   2007-09-22 17:59:46.000000000 +0100
@@ -850,13 +850,13 @@

  struct t_namelist;
  extern t_namelist *sys_searchpath, *sys_helppath;
-extern "C" void namelist_append_files(t_namelist *, char *);
+extern "C" t_namelist *namelist_append_files(t_namelist *, char *);
  static void add_to_path(char *dir) {
         char bof[1024];
         sprintf(bof,"%s/pd_abstractions",dir);
-       namelist_append_files(sys_searchpath,bof);
+       sys_searchpath = namelist_append_files(sys_searchpath,bof);
         sprintf(bof,"%s/doc/flow_classes",dir);
-       namelist_append_files(sys_helppath,bof);
+       sys_helppath = namelist_append_files(sys_helppath,bof);
  }

  static void boo (int boo) {



More information about the Gridflow-dev mailing list