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.
In Linux, I call Pd from the console with "pd" and I send several relative paths like "filename.txt" , "~/filename.txt", or "./filename.txt" work.
In OS X, If I call Pd from the Terminal, I can also use these relative paths. By relative i mean relative to the Pd executable (bin).
However, in OS X, when I double click on the Pd Icon, these same paths are not valid. I am trying to figure how textfile's write message does it, but I cannot locate the point in source where this is done.
Anybody has any pointers?
best,
J