[PD-cvs] pd/src t_tkcmd.c,1.1.1.4,1.1.1.4.4.1
matju at users.sourceforge.net
matju at users.sourceforge.net
Mon Feb 23 03:46:55 CET 2004
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27265
Modified Files:
Tag: impd_0_37
t_tkcmd.c
Log Message:
better reporting of Tcl errors
Index: t_tkcmd.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/t_tkcmd.c,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.4.4.1
diff -C2 -d -r1.1.1.4 -r1.1.1.4.4.1
*** t_tkcmd.c 9 May 2003 16:03:44 -0000 1.1.1.4
--- t_tkcmd.c 23 Feb 2004 02:46:52 -0000 1.1.1.4.4.1
***************
*** 320,327 ****
sprintf(buf, "set pd_guidir \"%s\"\n", pdgui_path);
tcl_mess(buf);
! strcpy(buf, pdgui_path);
! strcat(buf, "/bin/");
! strcat(buf, s);
! if (Tcl_EvalFile(interp, buf) != TCL_OK)
{
char buf2[1000];
--- 320,328 ----
sprintf(buf, "set pd_guidir \"%s\"\n", pdgui_path);
tcl_mess(buf);
! sprintf(buf, "set script {%s/bin/%s}\n"
! "if {[catch {source $script} err]} "
! "{puts stderr \"tcl: ERROR loading $script: $err\"}",pdgui_path,s);
! /* is there a way to do a Tcl [catch] from C ? */
! if (Tcl_Eval(interp, buf) != TCL_OK)
{
char buf2[1000];
***************
*** 329,332 ****
--- 330,334 ----
buf);
tcl_mess(buf2);
+ tcl_mess("puts stderr {tcl: should not get here}");
}
}
More information about the Pd-cvs
mailing list