From 28fe7d993aa663844af560d0c0dce4e00d25fc74 Mon Sep 17 00:00:00 2001 From: Stefan Schippers Date: Tue, 13 Oct 2020 18:10:05 +0200 Subject: [PATCH] removed xschem samefile command as there is "file stat" for that --- src/actions.c | 8 ++++---- src/scheduler.c | 7 ------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/actions.c b/src/actions.c index 3b699a94..0347a99d 100644 --- a/src/actions.c +++ b/src/actions.c @@ -467,9 +467,9 @@ int save(int confirm) /* 20171006 add confirm */ if(confirm) { tcleval("ask_save"); if(!strcmp(tclresult(), "") ) cancel=1; - if(!strcmp(tclresult(), "yes") ) save_ok = save_schematic(abs_sym_path(xctx.sch[xctx.currsch],"")); + if(!strcmp(tclresult(), "yes") ) save_ok = save_schematic(xctx.sch[xctx.currsch]); } else { - save_ok = save_schematic(abs_sym_path(xctx.sch[xctx.currsch],"")); + save_ok = save_schematic(xctx.sch[xctx.currsch]); } } if(save_ok==-1) return 1; @@ -483,7 +483,7 @@ void saveas(const char *f, int type) /* changed name from ask_save_file to save char res[PATH_MAX]; char *p; if(!f && has_x) { - my_strncpy(filename , abs_sym_path(xctx.sch[xctx.currsch], ""), S(filename)); + my_strncpy(filename , xctx.sch[xctx.currsch], S(filename)); if(type == SYMBOL) { if( (p = strrchr(filename, '.')) && !strcmp(p, ".sch") ) { my_strncpy(filename, add_ext(filename, ".sym"), S(filename)); @@ -1242,7 +1242,7 @@ void go_back(int confirm) /* 20171006 add confirm */ save_modified = modified; /* we propagate modified flag (cleared by load_schematic */ /* by default) to parent schematic if going back from embedded symbol */ - my_strncpy(filename, abs_sym_path(xctx.sch[xctx.currsch], ""), S(filename)); + my_strncpy(filename, xctx.sch[xctx.currsch], S(filename)); load_schematic(1, filename, 1); if(from_embedded_sym) modified=save_modified; /* to force ask save embedded sym in parent schematic */ diff --git a/src/scheduler.c b/src/scheduler.c index d7987a32..420d7556 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1110,13 +1110,6 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg } } - else if(!strcmp(argv[1], "samefile") && argc == 4) { - int r; - r = samefile(argv[2], argv[3]); - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, r ? "1" : "0" , NULL); - } - else if(!strcmp(argv[1],"create_plot_cmd") ) { if(argc>2) { if(!strcmp(argv[2], "gaw")) {