diff --git a/scconfig/src/gui/find_gtk4.h b/scconfig/src/gui/find_gtk4.h index bed84b0c..a4ad70d4 100644 --- a/scconfig/src/gui/find_gtk4.h +++ b/scconfig/src/gui/find_gtk4.h @@ -1,6 +1,6 @@ int find_gtk4(const char *name, int logdepth, int fatal); int find_gtk4_modversion(const char *name, int logdepth, int fatal); -int find_epoxy(const char *name, int logdepth, int fatal, const char *call, const char *arg); +int find_epoxy(const char *name, int logdepth, int fatal); diff --git a/src/callback.c b/src/callback.c index ae2f8951..a7263cfe 100644 --- a/src/callback.c +++ b/src/callback.c @@ -141,6 +141,7 @@ void start_wire(double mx, double my) int callback(const char *winpath, int event, int mx, int my, KeySym key, int button, int aux, int state) { + static char old_winpath[PATH_MAX] = ""; /* previous focused window, used to do context switch */ char str[PATH_MAX + 100]; struct stat buf; int redraw_only; diff --git a/src/globals.c b/src/globals.c index 8ff0f7e3..5d3a61c6 100644 --- a/src/globals.c +++ b/src/globals.c @@ -136,7 +136,7 @@ int debug_var=-10; /* will be set to 0 in xinit.c */ /* These variables are NOT mirrored in tcl code */ /* -------------------------------------------- */ int help=0; /* help option set to global scope, printing help is deferred */ - /* when configuration ~/.schem has been read 20140406 */ + /* when configuration xschemrc has been read 20140406 */ FILE *errfp = NULL; int no_readline=0; char *filename=NULL; /* filename given on cmdline */ @@ -162,15 +162,13 @@ int do_simulation=0; int do_waves=0; int do_print=0; int quit=0; /* set from process_options (ex netlist from cmdline and quit) */ -int batch_mode = 0; /* no tcl console if set; batch mode */ +int detach = 0; /* no tcl console if set; batch mode */ #ifndef __unix__ char win_temp_dir[PATH_MAX]=""; const char fopen_read_mode[] = "rb"; #else const char fopen_read_mode[] = "r"; #endif -/* previous focused schematic window (used to switch context in callback()) */ -char old_winpath[PATH_MAX] = ".drw"; /* ---------------------------------------------------------- */ /* Cmdline options (used at xinit, and then not used anymore) */ diff --git a/src/hspice_backannotate.tcl b/src/hspice_backannotate.tcl index fc5e5125..b0abe20f 100644 --- a/src/hspice_backannotate.tcl +++ b/src/hspice_backannotate.tcl @@ -101,7 +101,7 @@ proc annotate {} { xschem set no_undo 1 xschem set no_draw 1 - read_hspice_log [xschem get netlist_dir]/hspice.out + read_hspice_log $::netlist_dir/hspice.out set lastinst [xschem get instances] for { set i 0 } { $i < $lastinst } {incr i } { set name [xschem getprop instance $i name] diff --git a/src/main.c b/src/main.c index 59be8fd4..333348a2 100644 --- a/src/main.c +++ b/src/main.c @@ -86,7 +86,7 @@ int main(int argc, char **argv) /* detach from console (fork a child and close std file descriptors) */ #ifdef __unix__ - if(batch_mode) { + if(detach) { pid_t pid = fork(); if(pid < 0) { fprintf(errfp, "main(): fork() failed\n"); diff --git a/src/ngspice_backannotate.tcl b/src/ngspice_backannotate.tcl index 7cf67bea..7f2a0de2 100644 --- a/src/ngspice_backannotate.tcl +++ b/src/ngspice_backannotate.tcl @@ -165,7 +165,7 @@ proc ngspice::resetdata {} { proc ngspice::annotate {} { upvar ::ngspice::ngspice_data arr - set rawfile "[xschem get netlist_dir]/[file rootname [file tail [xschem get schname 0]]].raw" + set rawfile "$::netlist_dir/[file rootname [file tail [xschem get schname 0]]].raw" if { ![file exists $rawfile] } { puts "no raw file found: $rawfile" return diff --git a/src/options.c b/src/options.c index d8a5ca7a..ef8918e5 100644 --- a/src/options.c +++ b/src/options.c @@ -125,7 +125,7 @@ void check_opt(char *opt, char *optval, int type) cli_opt_netlist_type=CAD_VERILOG_NETLIST; } else if( (type == SHORT && *opt == 'b') || (type == LONG && !strcmp("detach", opt)) ) { - batch_mode = 1; + detach = 1; } else if( (type == SHORT && *opt == 'v') || (type == LONG && !strcmp("version", opt)) ) { print_version(); diff --git a/src/xinit.c b/src/xinit.c index 1131bdaa..2728e408 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -910,7 +910,6 @@ void new_schematic(const char *what, const char *top_path, const char *tk_win_pa int close = 0; dbg(1, "new_schematic() destroy\n"); /* reset old focused window so callback() will force repaint on expose events */ - my_strncpy(old_winpath, "", S(old_winpath)); if(xctx->modified && has_x) { tcleval("tk_messageBox -type okcancel -message \"" "[get_cell [xschem get schname] 0]" @@ -1838,7 +1837,7 @@ int Tcl_AppInit(Tcl_Interp *inter) if( #ifdef __unix__ - !batch_mode && + !detach && #endif !no_readline) { tcleval( "if {![catch {package require tclreadline}]} " diff --git a/src/xschem.h b/src/xschem.h index 00d7c98e..f02a2cf9 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -858,9 +858,8 @@ extern int do_netlist; extern int do_simulation; extern int do_waves; extern int quit; -extern int batch_mode; /* no TCL console */ +extern int detach; /* no TCL console */ extern const char fopen_read_mode[]; /* "r" on unix, "rb" on windows */ -extern char old_winpath[PATH_MAX]; /* previous focused schematic window (used to switch context) */ /*********** Cmdline options (used at xinit, and then not used anymore) ***********/ extern int cli_opt_netlist_type;