diff --git a/src/save.c b/src/save.c index 247a06f6..098a33af 100644 --- a/src/save.c +++ b/src/save.c @@ -100,6 +100,7 @@ int filter_data(const char *din, const size_t ilen, int ac; #endif /* child */ + debug_var = 0; /* do not log child allocations, see below */ close(p1[1]); /* only read from p1 */ close(p2[0]); /* only write to p2 */ close(0); /* dup2(p1[0],0); */ /* connect read side of read pipe to stdin */ @@ -111,7 +112,10 @@ int filter_data(const char *din, const size_t ilen, #if 1 av = parse_cmd_string(cmd, &ac); - parse_cmd_string(NULL, NULL); /* clear data */ + /* ATTENTION: above parse_cmd_string() 'cmd_copy' allocated string is not (can not be) freed + * since av[] points into it, * so it may appear as leaked memory. This is the reason I set + * debug_var=0 in child. (avoid false warnings). + * Following execvp() clears all process data, nothing is leaked. */ if(execvp(av[0], av) == -1) { #endif diff --git a/src/xschem.tcl b/src/xschem.tcl index e8a0b07c..d6887e27 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -2057,7 +2057,7 @@ proc graph_edit_properties {n} { } } - bind .graphdialog.center.right.list { + bind .graphdialog.center.right.list { xschem setprop rect 2 $graph_selected sim_type [.graphdialog.center.right.list get] fast if {[file exists [subst [.graphdialog.center.right.rawentry get]]]} { graph_fill_listbox @@ -2067,7 +2067,7 @@ proc graph_edit_properties {n} { label .graphdialog.center.right.rawlab -text { Raw file: } entry .graphdialog.center.right.rawentry -width 30 - bind .graphdialog.center.right.rawentry { + bind .graphdialog.center.right.rawentry { xschem setprop rect 2 $graph_selected rawfile [.graphdialog.center.right.rawentry get] fast if {[file exists [subst [.graphdialog.center.right.rawentry get]]]} { graph_fill_listbox @@ -2166,19 +2166,19 @@ proc graph_edit_properties {n} { label .graphdialog.top2.labdivx -text { X div.} entry .graphdialog.top2.divx -width 2 - bind .graphdialog.top2.divx { + bind .graphdialog.top2.divx { graph_update_div $graph_selected divx } label .graphdialog.top2.labdivy -text { Y div.} entry .graphdialog.top2.divy -width 2 - bind .graphdialog.top2.divy { + bind .graphdialog.top2.divy { graph_update_div $graph_selected divy } label .graphdialog.top2.labsubdivx -text { X subdiv.} entry .graphdialog.top2.subdivx -width 2 - bind .graphdialog.top2.subdivx { + bind .graphdialog.top2.subdivx { graph_push_undo xschem setprop rect 2 $graph_selected subdivx [.graphdialog.top2.subdivx get] xschem draw_graph $graph_selected @@ -2186,7 +2186,7 @@ proc graph_edit_properties {n} { label .graphdialog.top2.labsubdivy -text { Y subdiv.} entry .graphdialog.top2.subdivy -width 2 - bind .graphdialog.top2.subdivy { + bind .graphdialog.top2.subdivy { graph_push_undo xschem setprop rect 2 $graph_selected subdivy [.graphdialog.top2.subdivy get] xschem draw_graph $graph_selected @@ -2194,7 +2194,7 @@ proc graph_edit_properties {n} { label .graphdialog.top2.labdset -text { Dataset} entry .graphdialog.top2.dset -width 4 - bind .graphdialog.top2.dset { + bind .graphdialog.top2.dset { graph_push_undo xschem setprop rect 2 $graph_selected dataset [.graphdialog.top2.dset get] xschem draw_graph $graph_selected @@ -2210,7 +2210,7 @@ proc graph_edit_properties {n} { # xschem draw_graph $graph_selected # } - bind .graphdialog.top2.sweep { + bind .graphdialog.top2.sweep { graph_push_undo xschem setprop rect 2 $graph_selected sweep [.graphdialog.top2.sweep get] xschem draw_graph $graph_selected @@ -2263,7 +2263,7 @@ proc graph_edit_properties {n} { } label .graphdialog.top.lw -text " Line width:" entry .graphdialog.top.lwe -width 4 - bind .graphdialog.top.lwe { + bind .graphdialog.top.lwe { graph_set_linewidth $graph_selected xschem draw_graph $graph_selected } @@ -2284,14 +2284,14 @@ proc graph_edit_properties {n} { } label .graphdialog.top3.xlabmin -text { X min:} entry .graphdialog.top3.xmin -width 7 - bind .graphdialog.top3.xmin { + bind .graphdialog.top3.xmin { graph_push_undo xschem setprop rect 2 $graph_selected x1 [.graphdialog.top3.xmin get] xschem draw_graph $graph_selected } label .graphdialog.top3.xlabmax -text { X max:} entry .graphdialog.top3.xmax -width 7 - bind .graphdialog.top3.xmax { + bind .graphdialog.top3.xmax { graph_push_undo xschem setprop rect 2 $graph_selected x2 [.graphdialog.top3.xmax get] xschem draw_graph $graph_selected @@ -2300,7 +2300,7 @@ proc graph_edit_properties {n} { label .graphdialog.top3.ylabmin -text { Y min:} entry .graphdialog.top3.ymin -width 7 - bind .graphdialog.top3.ymin { + bind .graphdialog.top3.ymin { graph_push_undo xschem setprop rect 2 $graph_selected y1 [.graphdialog.top3.ymin get] xschem draw_graph $graph_selected @@ -2308,7 +2308,7 @@ proc graph_edit_properties {n} { label .graphdialog.top3.ylabmax -text { Y max:} entry .graphdialog.top3.ymax -width 7 - bind .graphdialog.top3.ymax { + bind .graphdialog.top3.ymax { graph_push_undo xschem setprop rect 2 $graph_selected y2 [.graphdialog.top3.ymax get] xschem draw_graph $graph_selected @@ -2316,7 +2316,7 @@ proc graph_edit_properties {n} { label .graphdialog.top3.xlabmag -text { X/Y lab mag:} entry .graphdialog.top3.xmag -width 4 - bind .graphdialog.top3.xmag { + bind .graphdialog.top3.xmag { graph_push_undo xschem setprop rect 2 $graph_selected xlabmag [.graphdialog.top3.xmag get] xschem draw_graph $graph_selected @@ -2324,7 +2324,7 @@ proc graph_edit_properties {n} { label .graphdialog.top3.ylabmag -text { } entry .graphdialog.top3.ymag -width 4 - bind .graphdialog.top3.ymag { + bind .graphdialog.top3.ymag { graph_push_undo xschem setprop rect 2 $graph_selected ylabmag [.graphdialog.top3.ymag get] xschem draw_graph $graph_selected @@ -2404,7 +2404,7 @@ proc graph_edit_properties {n} { .graphdialog.top3.xlabmag .graphdialog.top3.xmag .graphdialog.top3.ylabmag .graphdialog.top3.ymag \ -fill x -expand yes -side left # binding - bind .graphdialog.top.search { + bind .graphdialog.top.search { graph_fill_listbox } bind .graphdialog.center.left.list1 { @@ -2414,7 +2414,7 @@ proc graph_edit_properties {n} { } } - bind .graphdialog.center.right.text1 { + bind .graphdialog.center.right.text1 { if { [xschem get schname] eq $graph_schname } { graph_update_node [string trim [.graphdialog.center.right.text1 get 1.0 {end - 1 chars}] " \n"] }