Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8098
Modified Files: Tag: desiredata kernel.c Log Message: cleanup; remove blank lines in console
Index: kernel.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v retrieving revision 1.1.2.78 retrieving revision 1.1.2.79 diff -C2 -d -r1.1.2.78 -r1.1.2.79 *** kernel.c 3 Aug 2007 00:18:54 -0000 1.1.2.78 --- kernel.c 3 Aug 2007 01:01:28 -0000 1.1.2.79 *************** *** 1048,1052 **** return; phooey: ! bug("class_addmethod: %s_%s: bad argument types\n", c->name->name, sel->name); }
--- 1048,1052 ---- return; phooey: ! bug("class_addmethod: %s_%s: bad argument types", c->name->name, sel->name); }
*************** *** 1250,1254 **** if (s__X.thing != current) canvas_popabstraction((t_canvas *)s__X.thing); canvas_setargs(0, 0); ! } else error("%s: can't load abstraction within itself\n", s->name); free(dirbuf); } else newest = 0; --- 1250,1254 ---- if (s__X.thing != current) canvas_popabstraction((t_canvas *)s__X.thing); canvas_setargs(0, 0); ! } else error("%s: can't load abstraction within itself", s->name); free(dirbuf); } else newest = 0; *************** *** 2034,2038 **** int readret = read(fd, buf, length); if (readret < length) { ! error("read (%d %ld) -> %d; %s: %s\n", fd, length, readret, namebuf, strerror(errno)); close(fd); free(namebuf); free(buf); return 1; --- 2034,2038 ---- int readret = read(fd, buf, length); if (readret < length) { ! error("read (%d %ld) -> %d; %s: %s", fd, length, readret, namebuf, strerror(errno)); close(fd); free(namebuf); free(buf); return 1; *************** *** 2331,2341 ****
void glob_evalfile(t_pd *ignore, t_symbol *name, t_symbol *dir) { ! t_pd *x = 0; ! /* even though binbuf_evalfile appears to take care of dspstate, ! we have to do it again here, because canvas_startdsp() assumes ! that all toplevel canvases are visible. ! LATER: check if this is still necessary -- probably not. */ int dspstate = canvas_suspend_dsp(); binbuf_evalfile(name, dir); while ((x != s__X.thing) && (x = s__X.thing)) vmess(x, gensym("pop"), "i", 1); if (lastpopped) pd_vmess(lastpopped, gensym("loadbang"), ""); --- 2331,2339 ----
void glob_evalfile(t_pd *ignore, t_symbol *name, t_symbol *dir) { ! /* even though binbuf_evalfile appears to take care of dspstate, we have to do it again here, because ! canvas_startdsp() assumes that all toplevel canvases are visible. LATER: check if this is still necessary (probably not) */ int dspstate = canvas_suspend_dsp(); binbuf_evalfile(name, dir); + t_pd *x = 0; while ((x != s__X.thing) && (x = s__X.thing)) vmess(x, gensym("pop"), "i", 1); if (lastpopped) pd_vmess(lastpopped, gensym("loadbang"), ""); *************** *** 2344,2347 **** --- 2342,2348 ---- }
+ //copied from m_pd.h + #define class_new2(NAME,NU,FREE,SIZE,FLAGS,SIG) class_new2(NAME,(t_newmethod)NU,(t_method)FREE,SIZE,FLAGS,SIG) + extern "C" { void conf_init(); *************** *** 2357,2372 **** class_addlist(bindlist_class, (t_method)bindlist_list); class_addanything(bindlist_class, (t_method)bindlist_anything); ! binbuf_class = class_new(gensym("__list"), (t_newmethod)binbuf_new, ! (t_method)binbuf_free2, sizeof(t_binbuf), CLASS_PD, A_GIMME, 0); ! wire_class = class_new(gensym("__wire"), (t_newmethod)wire_new, ! (t_method)wire_free, sizeof(t_wire), CLASS_GOBJ, A_GIMME, 0); class_setsavefn(wire_class,(t_savefn)wire_save); if (pd_objectmaker._class) bug("ARGH"); ! for (int i=0; i<sizeof(symlist)/sizeof(*symlist); i++) { symlist[i]->n = strlen(symlist[i]->name); dogensym(symlist[i]->name, symlist[i]->n, symlist[i]); /* why does this take three args? */ } ! pd_objectmaker._class = class_new(gensym("objectmaker"), 0, 0, sizeof(t_pd), CLASS_DEFAULT, A_NULL); ! pd_canvasmaker._class = class_new(gensym("canvasmaker"), 0, 0, sizeof(t_pd), CLASS_DEFAULT, A_NULL); pd_bind(&pd_canvasmaker, &s__N); class_addanything(pd_objectmaker._class, (t_method)new_anything); --- 2358,2371 ---- class_addlist(bindlist_class, (t_method)bindlist_list); class_addanything(bindlist_class, (t_method)bindlist_anything); ! binbuf_class = class_new2("__list", binbuf_new, binbuf_free2, sizeof(t_binbuf), CLASS_PD, "*"); ! wire_class = class_new2("__wire", wire_new, wire_free, sizeof(t_wire), CLASS_GOBJ, "*"); class_setsavefn(wire_class,(t_savefn)wire_save); if (pd_objectmaker._class) bug("ARGH"); ! for (size_t i=0; i<sizeof(symlist)/sizeof(*symlist); i++) { symlist[i]->n = strlen(symlist[i]->name); dogensym(symlist[i]->name, symlist[i]->n, symlist[i]); /* why does this take three args? */ } ! pd_objectmaker._class = class_new2("objectmaker", 0, 0, sizeof(t_pd), CLASS_DEFAULT, ""); ! pd_canvasmaker._class = class_new2("canvasmaker", 0, 0, sizeof(t_pd), CLASS_DEFAULT, ""); pd_bind(&pd_canvasmaker, &s__N); class_addanything(pd_objectmaker._class, (t_method)new_anything);