diff --git a/src/node_hash.c b/src/node_hash.c index 2c6badee..cb975d95 100644 --- a/src/node_hash.c +++ b/src/node_hash.c @@ -29,7 +29,6 @@ static Node_hashentry *node_hash_lookup(const char *token, const char *dir,int w * if already present just return entry address * and update in/out fields sum up port field * return NULL otherwise - * "whatever" "in"/"out" 0,XINSERT_NOREPLACE same as XINSERT but do not replace existing value * * "whatever" whatever 2,XDELETE delete entry if found return NULL * "whatever" whatever 1,XLOOKUP only look up element, dont insert */ @@ -57,7 +56,7 @@ static Node_hashentry *node_hash_lookup(const char *token, const char *dir,int w { if( !entry ) /* empty slot */ { - if( what==XINSERT || what==XINSERT_NOREPLACE) /* insert data */ + if( what==XINSERT ) /* insert data */ { s=sizeof( Node_hashentry ); entry=(Node_hashentry *)my_malloc(281, s); diff --git a/src/save.c b/src/save.c index 0c1aba0d..da933371 100644 --- a/src/save.c +++ b/src/save.c @@ -3164,6 +3164,7 @@ int load_sym_def(const char *name, FILE *embed_fd) if( /* add here symbol types not to consider when loading schematic-as-symbol instances */ !strcmp(symtype, "logo") || !strcmp(symtype, "netlist_commands") || + !strcmp(symtype, "netlist_options") || !strcmp(symtype, "arch_declarations") || !strcmp(symtype, "architecture") || !strcmp(symtype, "attributes") || diff --git a/src/token.c b/src/token.c index 73f36767..36f90648 100644 --- a/src/token.c +++ b/src/token.c @@ -2657,7 +2657,7 @@ void print_verilog_element(FILE *fd, int inst) if(!extra_token) break; val = get_tok_value(xctx->inst[inst].prop_ptr, extra_token, 0); - if(!val[0]) val = get_tok_value( (xctx->inst[inst].ptr + xctx->sym)->prop_ptr, extra_token, 0); + if(!val[0]) val = get_tok_value(template, extra_token, 0); if(tmp) fprintf(fd,"\n"); fprintf(fd, " ?%d %s %s ", 1, extra_token, val); tmp = 1; diff --git a/src/xschem.tcl b/src/xschem.tcl index 47655b35..b7114d0a 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -2619,19 +2619,19 @@ proc load_file_dialog {{msg {}} {ext {}} {global_initdir {INITIALINSTDIR}} # .load.l paneconfigure .load.l.paneright -stretch always frame .load.buttons frame .load.buttons_bot - button .load.buttons_bot.ok -width 5 -text OK -command { - set myload_retval [.load.buttons_bot.entry get] + button .load.buttons_bot.ok -width 5 -text OK -command " + set myload_retval \[.load.buttons_bot.entry get\] destroy .load xschem preview_window destroy {} {} - set initdir "$myload_dir1" - } - button .load.buttons_bot.cancel -width 5 -text Cancel -command { + set $global_initdir \"\$myload_dir1\" + " + button .load.buttons_bot.cancel -width 5 -text Cancel -command " set myload_retval {} destroy .load - if {$myload_loadfile == 2} {xschem abort_operation} + if {\$myload_loadfile == 2} {xschem abort_operation} xschem preview_window destroy {} {} - set initdir "$myload_dir1" - } + set $global_initdir \"\$myload_dir1\" + " button .load.buttons.home -width 5 -text {Home} -command { bind .load.l.paneright.draw {} .load.l.paneright.draw configure -background white @@ -2695,32 +2695,32 @@ proc load_file_dialog {{msg {}} {ext {}} {global_initdir {INITIALINSTDIR}} } myload_set_home $initdir if { $loadfile != 2} { - bind .load { - set myload_retval [.load.buttons_bot.entry get] - if {$myload_retval ne {} } { + bind .load " + set myload_retval \[.load.buttons_bot.entry get\] + if {\$myload_retval ne {} } { destroy .load xschem preview_window destroy {} {} - set initdir "$myload_dir1" + set $global_initdir \"\$myload_dir1\" } - } - bind .load.l.paneright.list { - set myload_retval [.load.buttons_bot.entry get] - if {$myload_retval ne {} && - ![file isdirectory "$myload_dir1/[.load.l.paneright.list get $myload_sel]"]} { + " + bind .load.l.paneright.list " + set myload_retval \[.load.buttons_bot.entry get\] + if {\$myload_retval ne {} && + !\[file isdirectory \"\$myload_dir1/\[.load.l.paneright.list get \$myload_sel\]\"\]} { bind .load.l.paneright.draw {} destroy .load xschem preview_window destroy {} {} - set initdir "$myload_dir1" + set $global_initdir \"\$myload_dir1\" } - } + " } - bind .load { + bind .load " set myload_retval {} destroy .load - if {$myload_loadfile == 2} {xschem abort_operation} + if {\$myload_loadfile == 2} {xschem abort_operation} xschem preview_window destroy {} {} - set initdir "$myload_dir1" - } + set $global_initdir \"\$myload_dir1\" + " ### update if { [ info exists myload_sash_pos] } {