diff --git a/src/draw.c b/src/draw.c index 3b07591e..2ed63992 100644 --- a/src/draw.c +++ b/src/draw.c @@ -55,12 +55,12 @@ void print_image() if(!has_x) return ; if(!lastdir[0]) my_strncpy(lastdir, pwd_dir, S(lastdir)); if(!xctx->plotfile[0]) { - Tcl_VarEval(interp, "tk_getSaveFile -title {Select destination file} -initialfile ", - get_cell(xctx->sch[xctx->currsch], 0) , ".png -initialdir ", lastdir, NULL); + Tcl_VarEval(interp, "tk_getSaveFile -title {Select destination file} -initialfile {", + get_cell(xctx->sch[xctx->currsch], 0) , ".png} -initialdir {", lastdir, "}", NULL); r = tclresult(); if(r[0]) { my_strncpy(xctx->plotfile, r, S(xctx->plotfile)); - Tcl_VarEval(interp, "file dirname ", xctx->plotfile, NULL); + Tcl_VarEval(interp, "file dirname {", xctx->plotfile, "}", NULL); my_strncpy(lastdir, tclresult(), S(lastdir)); } else return; diff --git a/src/psprint.c b/src/psprint.c index dc88738e..e546553d 100644 --- a/src/psprint.c +++ b/src/psprint.c @@ -887,12 +887,12 @@ int ps_draw(int what) if(what & 1) { /* prolog */ if(!lastdir[0]) my_strncpy(lastdir, pwd_dir, S(lastdir)); if(!xctx->plotfile[0]) { - Tcl_VarEval(interp, "tk_getSaveFile -title {Select destination file} -initialfile ", - get_cell(xctx->sch[xctx->currsch], 0) , ".pdf -initialdir ", lastdir, NULL); + Tcl_VarEval(interp, "tk_getSaveFile -title {Select destination file} -initialfile {", + get_cell(xctx->sch[xctx->currsch], 0) , ".pdf} -initialdir {", lastdir, "}", NULL); r = tclresult(); if(r[0]) { my_strncpy(xctx->plotfile, r, S(xctx->plotfile)); - Tcl_VarEval(interp, "file dirname ", xctx->plotfile, NULL); + Tcl_VarEval(interp, "file dirname {", xctx->plotfile, "}", NULL); my_strncpy(lastdir, tclresult(), S(lastdir)); } else return 0; diff --git a/src/save.c b/src/save.c index 87e9a75d..60b80bfe 100644 --- a/src/save.c +++ b/src/save.c @@ -1102,7 +1102,7 @@ void load_schematic(int load_symbols, const char *filename, int reset_undo) /* 2 dbg(2, "load_schematic(): loaded file:wire=%d inst=%d\n",xctx->wires , xctx->instances); if(load_symbols) link_symbols_to_instances(-1); if(reset_undo) { - Tcl_VarEval(interp, "is_xschem_file ", xctx->sch[xctx->currsch], NULL); + Tcl_VarEval(interp, "is_xschem_file {", xctx->sch[xctx->currsch], "}", NULL); if(!strcmp(tclresult(), "SYMBOL")) { xctx->save_netlist_type = xctx->netlist_type; xctx->netlist_type = CAD_SYMBOL_ATTRS; diff --git a/src/scheduler.c b/src/scheduler.c index d5c3c5c0..4cae4ff4 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1768,7 +1768,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg return TCL_ERROR; } if(argc >= 4) { - Tcl_VarEval(interp, "file normalize \"", argv[3], "\"", NULL); + Tcl_VarEval(interp, "file normalize {", argv[3], "}", NULL); my_strncpy(xctx->plotfile, Tcl_GetStringResult(interp), S(xctx->plotfile)); } diff --git a/src/svgdraw.c b/src/svgdraw.c index dad4d6e1..536d15ad 100644 --- a/src/svgdraw.c +++ b/src/svgdraw.c @@ -564,12 +564,12 @@ void svg_draw(void) if(!lastdir[0]) my_strncpy(lastdir, pwd_dir, S(lastdir)); if(!xctx->plotfile[0]) { - Tcl_VarEval(interp, "tk_getSaveFile -title {Select destination file} -initialfile ", - get_cell(xctx->sch[xctx->currsch], 0) , ".svg -initialdir ", lastdir, NULL); + Tcl_VarEval(interp, "tk_getSaveFile -title {Select destination file} -initialfile {", + get_cell(xctx->sch[xctx->currsch], 0) , ".svg} -initialdir {", lastdir, "}", NULL); r = tclresult(); if(r[0]) { my_strncpy(xctx->plotfile, r, S(xctx->plotfile)); - Tcl_VarEval(interp, "file dirname ", xctx->plotfile, NULL); + Tcl_VarEval(interp, "file dirname {", xctx->plotfile, "}", NULL); my_strncpy(lastdir, tclresult(), S(lastdir)); } else return; diff --git a/src/xinit.c b/src/xinit.c index 0a19061c..c915b2fb 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -1910,7 +1910,7 @@ int Tcl_AppInit(Tcl_Interp *inter) /* source tcl file given on command line with --script */ if(tcl_script[0]) { - Tcl_VarEval(interp, "update; source ", tcl_script, NULL); + Tcl_VarEval(interp, "update; source {", tcl_script, "}", NULL); } if(quit) {