From 331934afc674592b1d26a1f6c0e6f5202aada1f9 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Sun, 4 Jun 2023 20:44:36 +0200 Subject: [PATCH] added abs_sym_path() in file name resoluton in `xschem load_new_window` command --- src/save.c | 4 ++-- src/scheduler.c | 2 +- src/xschem.tcl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/save.c b/src/save.c index 8880a172..5cc93eb7 100644 --- a/src/save.c +++ b/src/save.c @@ -1387,7 +1387,7 @@ void read_record(int firstchar, FILE *fp, int dbg_level) if(c == '{') { ungetc(c, fp); load_ascii_string(&str, fp); - dbg(dbg_level, "{%s}", str); + dbg(dbg_level, "{%s}", str ? str : ""); } else { dbg(dbg_level, "%c", c); } @@ -3704,7 +3704,7 @@ int load_sym_def(const char *name, FILE *embed_fd) dbg(1, "l_s_d() component: level=%d, sym=%s, prop_ptr = %s\n", level, symname, prop_ptr); if(level + 1 >=CADMAXHIER) { fprintf(errfp, "l_s_d(): Symbol recursively instantiating symbol: max depth reached, skipping\n"); - if(has_x) tcleval("alert_ {xSymbol recursively instantiating symbol: max depth reached, skipping} {} 1"); + if(has_x) tcleval("alert_ {Symbol recursively instantiating symbol: max depth reached, skipping} {} 1"); endfile = 1; continue; } diff --git a/src/scheduler.c b/src/scheduler.c index 64101aa9..d71d35bf 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1985,7 +1985,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(argc > 2) { my_snprintf(f, S(f),"regsub {^~/} {%s} {%s/}", argv[2], home_dir); tcleval(f); - my_strncpy(f, tclresult(), S(f)); + my_strncpy(f, abs_sym_path(tclresult(), ""), S(f)); } else { tcleval("load_file_dialog {Load file} *.\\{sch,sym\\} INITIALLOADDIR"); if(tclresult()[0]) { diff --git a/src/xschem.tcl b/src/xschem.tcl index b9259b62..6b41fda3 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -4314,7 +4314,7 @@ proc text_line {txtlabel clear {preserve_disabled disabled} } { # (this works only if nowait is unset). proc alert_ {txtlabel {position +200+300} {nowait {0}} {yesno 0}} { global has_x rcode - set recode 1 + set rcode 1 if {![info exists has_x] } {return} toplevel .alert -class Dialog wm title .alert {Alert}