Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10867
Modified Files: Tag: impd_0_37 t_tkcmd.c Log Message: improving tk error messages at startup
Index: t_tkcmd.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/t_tkcmd.c,v retrieving revision 1.1.1.4.4.2 retrieving revision 1.1.1.4.4.3 diff -C2 -d -r1.1.1.4.4.2 -r1.1.1.4.4.3 *** t_tkcmd.c 13 Mar 2004 07:18:18 -0000 1.1.1.4.4.2 --- t_tkcmd.c 14 Mar 2004 23:01:20 -0000 1.1.1.4.4.3 *************** *** 92,96 **** static void pd_readsocket(ClientData cd, int mask) { - int ngot; fd_set readset, writeset, exceptset; struct timeval timout; --- 92,95 ---- *************** *** 325,340 **** 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]; ! sprintf(buf2, "puts [concat tcl: %s: can't open script]\n", ! buf); ! tcl_mess(buf2); ! tcl_mess("puts stderr {tcl: should not get here}"); ! } }
--- 324,330 ---- sprintf(buf, "set pd_guidir "%s"\n", pdgui_path); tcl_mess(buf); ! sprintf(buf, "source %s/bin/%s",pdgui_path,s); if (Tcl_Eval(interp, buf) != TCL_OK) ! Tcl_Eval(tk_myinterp, "global errorInfo; puts stderr "Tcl Error: $errorInfo""); }