add "postinit_commands" variable that can be set in xschemrc file, this variable may contain commands that will be executed after completing startup. Example: set postinit_commands {xschem set format xyce_format}

This commit is contained in:
stefan schippers 2023-08-16 08:45:41 +02:00
parent dd71d533ce
commit c05c177885
2 changed files with 10 additions and 0 deletions

View File

@ -2818,6 +2818,9 @@ int Tcl_AppInit(Tcl_Interp *inter)
tcleval(cli_opt_tcl_post_command);
}
/* Execute tcl commands given in tcl variable postinit_commands if existing */
tcleval("eval_postinit_commands");
if(cli_opt_quit) {
tcleval("exit");
}

View File

@ -6477,6 +6477,13 @@ proc source_user_tcl_files {} {
}
}
proc eval_postinit_commands {} {
global postinit_commands
if {[info exists postinit_commands]} {
catch {eval $postinit_commands}
}
}
proc setup_tcp_xschem { {port_number {}} } {
global xschem_listen_port xschem_server_getdata