int libpd_getdollarzero(void *x) { sys_lock(); pd_pushsym((t_pd *)x); int dzero = canvas_getdollarzero(); pd_popsym((t_pd *)x); sys_unlock(); return dzero; }
/* LATER find a better way */ int hammerfile_ispasting(t_hammerfile *f) { int result = 0; t_canvas *cv = f->f_canvas; if (!cv->gl_loading) { t_pd *z = s__X.s_thing; if (z == (t_pd *)cv) { pd_popsym(z); if (s__X.s_thing == (t_pd *)cv) result = 1; pd_pushsym(z); } else if (z) result = 1; } #if 0 if (result) post("pasting"); #endif return (result); }