<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV>If you would like to be added as a developer on the pure-data CVS, just send an email to pd-dev introducing yourself and a brief explanation of what you are working on and why you want to be added as a developer.  I think no one will object.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>.hc</DIV><BR><DIV><DIV>On Aug 29, 2007, at 6:17 PM, Thomas O Fredericks wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Oh yeah, attached is the source code and compiled versions for linux and window. I do not have cvs access. Could someone please include it in the cvs and adapt the makefile accordingly? Also could someone compile it for OS X intel and PPC and send me the binary? <BR><BR>Tom<BR><BR><DIV><SPAN class="gmail_quote">On 8/29/07, <B class="gmail_sendername">Thomas O Fredericks</B> &lt;<A href="mailto:tof@danslchamp.org">tof@danslchamp.org</A>&gt; wrote:</SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> getdollarzero can get the dollar zero of any parent.<BR>For example, lets say a patch called "top" contains the abstraction 1. <BR>The abstraction 1 contains the abstraction 2. <BR>The abstraction 2 contains the abstraction 3. <BR>Well, with getdollarzero, abstraction 1 through 3 can know the dollar zero of the patch "top". <BR>The patch "top" becomes the "root" patch. <BR>All the abstractions 1 through 3 have in common this "root" patch. <BR><BR>This is what I needed it for: <BR>1) I am currently developing a state saving system that does not require the "$0" arguments (of Memento for example). The state of all elements that have the same "root" patch are saved together. <BR>2) I am also creating a timing architecture for PD and I wanted all elements in the same "root" to be synchronized together.<BR><BR>Tom<DIV><SPAN class="e" id="q_114b3afbbc7029a5_1"><BR><BR><BR><BR><DIV><SPAN class="gmail_quote"> On 8/29/07, <B class="gmail_sendername"> Hans-Christoph Steiner</B> &lt;<A href="mailto:hans@eds.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">hans@eds.org</A>&gt; wrote:</SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <DIV><DIV><BR></DIV><DIV>Hey,</DIV><DIV><BR></DIV><DIV>I think Günter didn't want to depend on non-public headers like g_canvas.h, so included the glist struct from that header.  Personally, I think makes more sense to include the g_canvas.h header. </DIV><DIV><BR></DIV><DIV>[parentdollarzero] like a useful object, I am not usre what [getdollarzero] does beyond [float $0] or [$0].  Anyway, hopefully they make into Pd-extended.</DIV><DIV><BR></DIV><DIV>.hc</DIV><DIV> <BR> </DIV><BR><DIV><DIV><SPAN><DIV>On Aug 27, 2007, at 4:43 PM, Thomas O Fredericks wrote:</DIV><BR></SPAN></DIV><BLOCKQUOTE type="cite"><DIV><SPAN>Thanks to Han's help page ( <A href="http://puredata.info/docs/developer/mingw" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://puredata.info/docs/developer/mingw</A>) I was able to compile a test external on windows with mingw. <BR><BR>I then started making a new external called getdollarzero based on getdir (from ggee) and parentdollarzero (from iemlib2). I compiled it and it works but I had to: <BR>1) remove Guenter's hack from getdir's source code <BR>2) and therefore include g_canvas.h<BR><BR>My question is the following: why is there a hack in the first place? If I do not use it will my code crash PD in some way (I compiled against PD 0.4 and worked fine during testing)? <BR><BR>As a reference, here is my code with the hack commented out :<BR><BR><BR>--------- getdollarzero  --------<BR clear="all"><BR>#include "m_pd.h"<BR>#include "g_canvas.h" //needed to include g_canvas.h once the hack was commented out <BR><BR><BR>/* HACK<BR>struct _glist<BR>{<BR>    t_object gl_obj;            // header in case we're a glist<BR>    t_gobj *gl_list;            // the actual data<BR>    struct _gstub *gl_stub;     // safe pointer handler <BR>    int gl_valid;               // incremented when pointers might be stale<BR>    struct _glist *gl_owner;    // parent glist, supercanvas, or 0 if none<BR>};<BR><BR>END HACK<BR>*/<BR><BR>typedef struct getdollarzero <BR>{<BR>    t_object x_ob;<BR>    t_canvas * x_canvas;<BR>    t_outlet* x_outlet;<BR>    int x_level;<BR>} t_getdollarzero;<BR><BR><BR><BR><BR>static void getdollarzero_bang(t_getdollarzero *x)<BR>{<BR>    int i = x-&gt;x_level; <BR>    t_canvas* last = x-&gt;x_canvas;<BR><BR>    while (i&gt;0) {<BR>        i--;<BR>        if (last-&gt;gl_owner) last = last-&gt;gl_owner;<BR>    }<BR>    // code example taken from iemlib2's parentdollarzero:<BR>      // x-&gt;s_parent_unique = canvas_realizedollar((t_canvas *)this_canvas-&gt;gl_owner, gensym("$0")); <BR>    // original get dir function:<BR>    //outlet_symbol(x-&gt;x_outlet,canvas_getdir(last));<BR><BR>     outlet_symbol(x-&gt;x_outlet,canvas_realizedollar(last, gensym("$0"))); <BR>}<BR><BR>t_class *getdollarzero_class;<BR><BR>static void *getdollarzero_new(t_floatarg level)<BR>{<BR>    t_getdollarzero *x = (t_getdollarzero *)pd_new(getdollarzero_class); <BR>    x-&gt;x_canvas =  canvas_getcurrent(); <BR>    x-&gt;x_outlet =  outlet_new(&amp;x-&gt;x_ob, &amp;s_);<BR>    x-&gt;x_level  =  level;<BR>    return (void *)x;<BR>}<BR><BR>void getdollarzero_setup(void)<BR>{<BR>    getdollarzero_class = class_new(gensym("getdollarzero"), (t_newmethod)getdollarzero_new, 0, <BR>        sizeof(t_getdollarzero), 0, A_DEFFLOAT,0);<BR>    class_addbang(getdollarzero_class, getdollarzero_bang);<BR>}<BR><BR>--------- getdollarzero  end --------<BR clear="all"><BR>-- <BR>thomas ouellet fredericks, <A href="mailto:tof@danslchamp.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">tof@danslchamp.org</A>, montreal, canada</SPAN></DIV><DIV style="margin: 0px;">_______________________________________________ </DIV><DIV style="margin: 0px;"><A href="mailto:PD-list@iem.at" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">PD-list@iem.at</A> mailing list</DIV><DIV style="margin: 0px;">UNSUBSCRIBE and account-management -&gt; <A href="http://lists.puredata.info/listinfo/pd-list" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.puredata.info/listinfo/pd-list</A></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN style="border-collapse: separate; border-spacing: 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-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"> <BR><DIV><BR></DIV><DIV>----------------------------------------------------------------------------</DIV><DIV><BR></DIV><DIV>Computer science is no more related to the computer than astronomy is related to the telescope.      -Edsger Dykstra </DIV><BR></SPAN> </DIV><BR></DIV></BLOCKQUOTE></DIV><BR><BR clear="all"><BR>-- <BR>thomas ouellet fredericks, <A href="mailto:tof@danslchamp.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">tof@danslchamp.org </A>, montreal, canada </SPAN></DIV></BLOCKQUOTE></DIV><BR><BR clear="all"><BR>-- <BR>thomas ouellet fredericks, <A href="mailto:tof@danslchamp.org">tof@danslchamp.org</A>, montreal, canada<SPAN><DIV>&lt;getdollarzero.zip&gt;</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; "><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><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR></DIV><DIV>----------------------------------------------------------------------------<BR></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>"It is convenient to imagine a power beyond us because that means we don't have to examine our own lives.", from "The Idols of Environmentalism", by Curtis White</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>