[PD] Cross platform path for externals ?

Jonathan Wilkes via Pd-list pd-list at lists.iem.at
Sun Jun 29 20:29:14 CEST 2014

On 06/29/2014 11:18 AM, Charles Z Henry via Pd-list wrote:
> On Fri, Jun 27, 2014 at 8:57 PM, Jaime E Oliver via Pd-list
> <pd-list at lists.iem.at> wrote:
>> Hi Everyone,
>> I'm trying to get my head around this problem, and I am not sure the subject describes it well…:
>> In an external, I'm writing into a file with:
>> FILE *fp1;
>> fp1 = fopen(x->globalpath, "w");
>> I provide the external with x->globalpath through a message such as "open /home/user/filename.txt", but I am trying to find a path that would work on both os x and linux, so that it at least works in two platforms and my help file isn't platform specific.

I think you might want to check out canvas_open inside g_canvas.c. It 
looks like it will hand you back a file descriptor.

If you use that same interface, then in your help file you can just tell 
the user it searches the path the same as the rest of Pd.

But I may be misunderstanding what it is you're trying to do.


More information about the Pd-list mailing list