[PD] Fwd: A quick question for C dev - temp file on windows

Pierre Alexandre Tremblay tremblap at gmail.com
Fri Jun 24 09:49:58 CEST 2022


> Just for the record: i'm pretty sure this is technically incorrect: tcl will always accept the system path separator.

I have tried to double escape them but maybe that was my error - I couldn’t make it work.

> However, when sending the data from the core to the GUI, you must take extra care to escape any backslashes, as the backslash character is special and used as *the* escape character in virtually everything that involves string handling on code level.

Indeed that would be the case. I could try but now I use the native one, as I was pretty certain I wasn’t the only person trying to send paths to tcl :)

>> sys_bashfilename doesn’t convert the (adequately) created windows separator. So I’ll do a character substitutor.
> The m_pd.h file is notoriously undocumented.

It is. I presume one with the knowledge (deffo not yours truly :)) could put a comment per method.

> However, if you learn of a (to you) completely new function and it does not exactly what you want, you might want to check out the header for context and similar (sounding) functions.
> 
> Also note that often there is some documentation of a given function inhe corresponding C implementation of Pd. 

Oh good call, I’ll go read the source more often. It just strangely feels heavy, but I should just learn it.

Thanks for your help all. Alexandre, I might put a PR in Else with that call to sanitize the path.

p




More information about the Pd-list mailing list