Update of /cvsroot/pure-data/externals/k_guile In directory sc8-pr-cvs1:/tmp/cvs-serv4949
Modified Files: k_guile.c help-k_guile.pd Log Message: eval message to evaluate scheme code in the global environment
Index: k_guile.c =================================================================== RCS file: /cvsroot/pure-data/externals/k_guile/k_guile.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** k_guile.c 8 Jan 2004 14:55:24 -0000 1.1 --- k_guile.c 12 Jan 2004 13:25:12 -0000 1.2 *************** *** 101,105 **** static SCM pd_backtrace_run3; static SCM pd_backtrace_run4; !
--- 101,105 ---- static SCM pd_backtrace_run3; static SCM pd_backtrace_run4; ! static SCM eval_string_func;
*************** *** 474,477 **** --- 474,479 ---- pd_backtrace_run4=EVAL("pd-backtrace-run4"); scm_permanent_object(pd_backtrace_run4); + + eval_string_func=EVAL("eval-string"); }
*************** *** 558,561 **** --- 560,569 ---- }
+ static void k_guile_eval(t_k_guile *x,t_symbol *s){ + scm_call_2(pd_backtrace_run1,eval_string_func,MAKE_STRING(s->s_name)); + } + + //static void k_guile_evalfile(t_k_guile *x,t_symbol *s){ + //}
*************** *** 574,577 **** --- 582,587 ---- class_addanything(k_guile_class, (t_method)k_guile_anything_first); class_addmethod(k_guile_class, (t_method)k_guile_reload, gensym("reload"), 0); + class_addmethod(k_guile_class, (t_method)k_guile_eval, gensym("eval"), A_DEFSYM, 0); + //class_addmethod(k_guile_class, (t_method)k_guile_evalfile, gensym("evalfile"), A_DEFSYM, 0); class_sethelpsymbol(k_guile_class, gensym("help-k_guile.pd"));
Index: help-k_guile.pd =================================================================== RCS file: /cvsroot/pure-data/externals/k_guile/help-k_guile.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** help-k_guile.pd 8 Jan 2004 14:55:24 -0000 1.1 --- help-k_guile.pd 12 Jan 2004 13:25:12 -0000 1.2 *************** *** 1,10 **** #N canvas 372 11 707 547 10; #X obj 101 135 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 93 256; #X obj 101 162 k_guile add.scm; #X obj 101 195 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 220 256; #X obj 201 137 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 127 256; #X msg 38 134 reload; #X obj 341 157 k_guile send_receive.scm; --- 1,10 ---- #N canvas 372 11 707 547 10; #X obj 101 135 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 0 256; #X obj 101 162 k_guile add.scm; #X obj 101 195 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 0 256; #X obj 201 137 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 0 256; #X msg 38 134 reload; #X obj 341 157 k_guile send_receive.scm; *************** *** 12,16 **** #X obj 483 130 s in; #X obj 512 97 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 6 256; #X obj 475 186 r out; #X msg 468 95 gakk; --- 12,16 ---- #X obj 483 130 s in; #X obj 512 97 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 0 256; #X obj 475 186 r out; #X msg 468 95 gakk; *************** *** 22,36 **** #X text 26 36 Kjetil S. Matheussen , 2004; #X obj 130 301 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 62 256; #X obj 255 300 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 82 256; #X obj 71 301 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 22 256; #X obj 71 388 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 95 256; #X obj 146 389 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 267 256; #X obj 213 390 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 428 256; #X msg 17 300 reload; #X obj 75 341 k_guile inout.scm; --- 22,36 ---- #X text 26 36 Kjetil S. Matheussen , 2004; #X obj 130 301 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 0 256; #X obj 255 300 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 0 256; #X obj 71 301 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 0 256; #X obj 71 388 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 0 256; #X obj 146 389 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 0 256; #X obj 213 390 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10 ! -262144 -1 -1 0 256; #X msg 17 300 reload; #X obj 75 341 k_guile inout.scm; *************** *** 38,45 **** #X msg 436 301 start; #X text 300 496 Note ; you can not change the number of inlets and ! outlets by sending "reload".; #X msg 316 299 testing; #X msg 190 299 testing; #X msg 409 95 we 3 2; #X connect 0 0 1 0; #X connect 1 0 2 0; --- 38,47 ---- #X msg 436 301 start; #X text 300 496 Note ; you can not change the number of inlets and ! outlets by sending reload .; #X msg 316 299 testing; #X msg 190 299 testing; #X msg 409 95 we 3 2; + #X msg 512 286 eval (newline); + #X msg 512 309 eval (display(environ)); #X connect 0 0 1 0; #X connect 1 0 2 0; *************** *** 63,64 **** --- 65,68 ---- #X connect 28 0 23 284; #X connect 29 0 7 0; + #X connect 30 0 24 0; + #X connect 31 0 24 0;