<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Apr 23, 2009, at 3:40 PM, &lt;<a href="mailto:martin.peach@sympatico.ca">martin.peach@sympatico.ca</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">IOhannes wrote:<br>> Martin Peach wrote:<br>> ><span class="Apple-converted-space">&nbsp;</span><br>> > Have a look at the source for [mrpeach/which] in svn. I took some code<span class="Apple-converted-space">&nbsp;</span><br>> > from Pd internals and it calls some more, but maybe not _way_ too much.<br>> ><span class="Apple-converted-space">&nbsp;</span><br>><span class="Apple-converted-space">&nbsp;</span><br>> thanks for the hints, but this is even more "ugly" (no harm intended)<span class="Apple-converted-space">&nbsp;</span><br>> than what i already have. i really want to be agnostic about which<span class="Apple-converted-space">&nbsp;</span><br>> extension the library has (just image miller adds a new extension; or<span class="Apple-converted-space">&nbsp;</span><br>> hans removes .l_i386 from PdX and i will actually find the wrong binary)<br>><span class="Apple-converted-space">&nbsp;</span><br><br>Well it's the same 'ugly' code that Pd itself uses. I simply copied the extension list from Pd source. I guess you could just access the list directly and then not worry about it changing in the future. The code for [which] tries all possible extensions for the current OS and opens the first one that exists. Pd does the same thing, or at least the version in svn does. Probably if the relevant functions were exposed in m_pd.h they could all be used in situ.</div></span></blockquote><div><br></div><div>Just an FYI, I tried using [which] on Mac OS X and got this:</div><div><div><br></div><div>/Users/hans/code/pure-data/trunk/externals/mrpeach/which/which.pd_darwin: dlopen(/Users/hans/code/pure-data/trunk/externals/mrpeach/which/which.pd_darwin, 10): Symbol not found: _filelength</div><div><br></div><div>_filelength() looks like a Microsoft function.</div><div><br></div><div><br></div><div>.hc</div></div><div><br></div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "><br><br>Martin<br>_______________________________________________<br>Pd-dev mailing list<br><a href="mailto:Pd-dev@iem.at">Pd-dev@iem.at</a><br><a href="http://lists.puredata.info/listinfo/pd-dev">http://lists.puredata.info/listinfo/pd-dev</a><br></div></span></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><br class="Apple-interchange-newline"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><br></div><div>----------------------------------------------------------------------------</div><div><br></div><div>The arc of history bends towards justice. &nbsp; &nbsp; - Dr. Martin Luther King, Jr.</div><br class="Apple-interchange-newline"></span></span> </div><br></body></html>