Merge branch 'StefanSchippers:master' into master
This commit is contained in:
commit
e2b3a58540
|
|
@ -473,10 +473,11 @@ double atof_spice(const char *s)
|
|||
} else if(n == 1) {
|
||||
mul = 1.0;
|
||||
} else {
|
||||
p = strpbrk(suffix, "tgmkunpfa");
|
||||
p = strpbrk(suffix, "tgmxkunpfa");
|
||||
if(p != suffix ) mul = 1.0;
|
||||
else if(*p == 't') mul=1e12;
|
||||
else if(*p == 'g') mul=1e9;
|
||||
else if(*p == 'x') mul=1e6; /* Xyce extension */
|
||||
else if(*p == 'm') {
|
||||
if(strstr(p, "meg") == p) mul=1e6;
|
||||
else if(strstr(p, "mil") == p) mul=25.4e-6;
|
||||
|
|
@ -495,12 +496,13 @@ double atof_spice(const char *s)
|
|||
}
|
||||
|
||||
|
||||
/* same as atof_spice, but recognizes 'M' ae Mega, and 'm' as Milli */
|
||||
/* same as atof_spice, but recognizes 'M' as Mega, and 'm' as Milli
|
||||
* as long as not 'MEG' or 'meg' which is always Mega */
|
||||
double atof_eng(const char *s)
|
||||
{
|
||||
int n;
|
||||
double a = 0.0, mul=1.0;
|
||||
char suffix[100]={0};
|
||||
char suffix[100]={0, 0, 0, 0, 0};
|
||||
const char *p;
|
||||
|
||||
if(!s) return 0.0;
|
||||
|
|
@ -510,10 +512,12 @@ double atof_eng(const char *s)
|
|||
} else if(n == 1) {
|
||||
mul = 1.0;
|
||||
} else {
|
||||
p = strpbrk(suffix, "TGMKUNPFAtgmkunpfa");
|
||||
p = strpbrk(suffix, "TGMXKUNPFAtgmxkunpfa");
|
||||
if(p != suffix ) mul = 1.0;
|
||||
else if(tolower(*p) == 't') mul=1e12;
|
||||
else if(tolower(*p) == 'g') mul=1e9;
|
||||
else if(tolower(*p) == 'x') mul=1e6; /* Xyce extension */
|
||||
else if(tolower(p[0]) == 'm' && tolower(p[1]) == 'e' && tolower(p[2]) == 'g') mul=1e6;
|
||||
else if(*p == 'M') mul=1e6;
|
||||
else if(*p == 'm') mul=1e-3;
|
||||
else if(tolower(*p) == 'k') mul=1e3;
|
||||
|
|
|
|||
36
src/move.c
36
src/move.c
|
|
@ -1063,10 +1063,11 @@ static void place_moved_wire(int n, int orthogonal_wiring)
|
|||
wire[n].x2 = xctx->rx1;
|
||||
wire[n].y2 = xctx->ry2;
|
||||
order_wire_points(n);
|
||||
storeobject(-1, xctx->rx1,xctx->ry2,xctx->rx2,xctx->ry2,WIRE,0,0,NULL);
|
||||
last = xctx->wires-1;
|
||||
order_wire_points(last);
|
||||
/* drawline(WIRELAYER,NOW, wire[last].x1, wire[last].y1, wire[last].x2, wire[last].y2, 0, NULL); */
|
||||
if( xctx->rx1 != xctx->rx2) {
|
||||
storeobject(-1, xctx->rx1,xctx->ry2,xctx->rx2,xctx->ry2,WIRE,0,0,NULL);
|
||||
last = xctx->wires-1;
|
||||
order_wire_points(last);
|
||||
}
|
||||
}
|
||||
|
||||
/* wire x2,y2 point was moved
|
||||
|
|
@ -1087,10 +1088,11 @@ static void place_moved_wire(int n, int orthogonal_wiring)
|
|||
wire[n].x2 = xctx->rx2;
|
||||
wire[n].y2 = xctx->ry2;
|
||||
order_wire_points(n);
|
||||
storeobject(-1, xctx->rx1,xctx->ry1,xctx->rx2,xctx->ry1,WIRE,0,0,NULL);
|
||||
last = xctx->wires-1;
|
||||
order_wire_points(last);
|
||||
/* drawline(WIRELAYER,NOW, wire[last].x1, wire[last].y1, wire[last].x2, wire[last].y2, 0, NULL); */
|
||||
if( xctx->rx1 != xctx->rx2) {
|
||||
storeobject(-1, xctx->rx1,xctx->ry1,xctx->rx2,xctx->ry1,WIRE,0,0,NULL);
|
||||
last = xctx->wires-1;
|
||||
order_wire_points(last);
|
||||
}
|
||||
}
|
||||
|
||||
/* wire x1,y1 point was moved
|
||||
|
|
@ -1111,10 +1113,11 @@ static void place_moved_wire(int n, int orthogonal_wiring)
|
|||
wire[n].x2 = xctx->rx2;
|
||||
wire[n].y2 = xctx->ry1;
|
||||
order_wire_points(n);
|
||||
storeobject(-1, xctx->rx2,xctx->ry1,xctx->rx2,xctx->ry2,WIRE,0,0,NULL);
|
||||
last = xctx->wires-1;
|
||||
order_wire_points(last);
|
||||
/* drawline(WIRELAYER,NOW, wire[last].x1, wire[last].y1, wire[last].x2, wire[last].y2, 0, NULL); */
|
||||
if( xctx->ry1 != xctx->ry2) {
|
||||
storeobject(-1, xctx->rx2,xctx->ry1,xctx->rx2,xctx->ry2,WIRE,0,0,NULL);
|
||||
last = xctx->wires-1;
|
||||
order_wire_points(last);
|
||||
}
|
||||
}
|
||||
|
||||
/* wire x2,y2 point was moved
|
||||
|
|
@ -1135,10 +1138,11 @@ static void place_moved_wire(int n, int orthogonal_wiring)
|
|||
wire[n].x2 = xctx->rx2;
|
||||
wire[n].y2 = xctx->ry2;
|
||||
order_wire_points(n);
|
||||
storeobject(-1, xctx->rx1,xctx->ry1,xctx->rx1,xctx->ry2,WIRE,0,0,NULL);
|
||||
last = xctx->wires-1;
|
||||
order_wire_points(last);
|
||||
/* drawline(WIRELAYER,NOW, wire[last].x1, wire[last].y1, wire[last].x2, wire[last].y2, 0, NULL); */
|
||||
if( xctx->ry1 != xctx->ry2) {
|
||||
storeobject(-1, xctx->rx1,xctx->ry1,xctx->rx1,xctx->ry2,WIRE,0,0,NULL);
|
||||
last = xctx->wires-1;
|
||||
order_wire_points(last);
|
||||
}
|
||||
}
|
||||
|
||||
else /* no manhattan or traslation since both line points moved */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -499,13 +499,21 @@ proc view_process_status {lb} {
|
|||
after 1000 "update_process_status $lb"
|
||||
}
|
||||
|
||||
proc list_running_cmds_title {} {
|
||||
if {[winfo exists .processlist]} {
|
||||
wm title .processlist "List of running commands - [xschem get current_name]"
|
||||
after 1000 "list_running_cmds_title"
|
||||
}
|
||||
}
|
||||
|
||||
# top level dialog displaying running sub-processes
|
||||
proc list_running_cmds {} {
|
||||
global has_x
|
||||
set top .processlist
|
||||
if {![info exists has_x]} {return}
|
||||
if {[winfo exists $top]} {return}
|
||||
if {[winfo exists $top]} {raise $top; return}
|
||||
toplevel $top -class Dialog
|
||||
list_running_cmds_title
|
||||
# wm transient $top [xschem get topwindow]
|
||||
set frame1 $top.f1
|
||||
set frame2 $top.f2
|
||||
|
|
@ -617,6 +625,7 @@ proc from_eng {i} {
|
|||
u { expr {1e-6}}
|
||||
m { expr {1e-3}}
|
||||
k { expr {1e3}}
|
||||
x { expr {1e6}} ;# Xyce extension
|
||||
meg { expr {1e6}}
|
||||
g { expr {1e9}}
|
||||
t { expr {1e12}}
|
||||
|
|
@ -4806,6 +4815,7 @@ proc load_file_dialog {{msg {}} {ext {}} {global_initdir {INITIALINSTDIR}}
|
|||
# 'levels' is set to the number of levels to descend into.
|
||||
# 'level' is used internally by the function and should not be set.
|
||||
proc get_list_of_dirs_with_symbols {{paths {}} {levels -1} {ext {\.(sch|sym)$}} {level -1}} {
|
||||
# puts "get_list_of_dirs_with_symbols paths=$paths"
|
||||
global pathlist
|
||||
set dir_with_symbols {}
|
||||
if {$level == -1} { set level 0}
|
||||
|
|
@ -4896,6 +4906,7 @@ proc insert_symbol_select_preview {} {
|
|||
}
|
||||
|
||||
proc insert_symbol_update_dirs {paths {maxdepth -1}} {
|
||||
# puts insert_symbol_update_dirs
|
||||
global insert_symbol new_symbol_browser_ext
|
||||
# regenerate list of dirs
|
||||
set insert_symbol(dirs) [get_list_of_dirs_with_symbols $paths $maxdepth $new_symbol_browser_ext]
|
||||
|
|
@ -4930,14 +4941,13 @@ proc insert_symbol_filelist {paths {maxdepth -1}} {
|
|||
.ins.center.leftdir.l selection set active
|
||||
}
|
||||
set insert_symbol(dirindex) $sel
|
||||
# puts "set dirindex=$paths"
|
||||
set paths [lindex $insert_symbol(dirs) $sel]
|
||||
# puts "insert_symbol_filelist: paths=$paths"
|
||||
.ins.top2.dir_e configure -state normal
|
||||
.ins.top2.dir_e delete 0 end
|
||||
.ins.top2.dir_e insert 0 $paths
|
||||
.ins.top2.dir_e configure -state readonly
|
||||
#check if regex is valid
|
||||
# check if regex is valid
|
||||
set err [catch {regexp $insert_symbol(regex) {12345}} res]
|
||||
if {$err} {return}
|
||||
set f [match_file $insert_symbol(regex) $paths 0]
|
||||
|
|
@ -5110,6 +5120,7 @@ proc insert_symbol {{paths {}} {maxdepth -1} {ext {.*}}} {
|
|||
.ins.center.left.l selection set $insert_symbol(fileindex)
|
||||
.ins.center.left.l see $insert_symbol(fileindex)
|
||||
}
|
||||
insert_symbol_filelist $paths $maxdepth
|
||||
return {}
|
||||
}
|
||||
#######################################################################
|
||||
|
|
@ -7439,7 +7450,8 @@ proc context_menu { } {
|
|||
|
||||
set retval 0
|
||||
if {[info tclversion] >= 8.5} {
|
||||
set font {Sans 8 bold}
|
||||
set font TkDefaultFont
|
||||
# set font {Sans 8 bold}
|
||||
} else {
|
||||
set font fixed
|
||||
}
|
||||
|
|
@ -7806,6 +7818,7 @@ proc tab_context_menu {tab_but} {
|
|||
#
|
||||
proc setup_toolbar {} {
|
||||
global toolbar_visible toolbar_horiz toolbar_list XSCHEM_SHAREDIR dark_gui_colorscheme
|
||||
global toolbar_icon_zoom ctxmenu_icon_zoom
|
||||
set_ne toolbar_visible 1
|
||||
set_ne toolbar_horiz 1
|
||||
set_ne toolbar_list {
|
||||
|
|
@ -7857,8 +7870,9 @@ proc setup_toolbar {} {
|
|||
# Create a tool button which may be displayed
|
||||
#
|
||||
proc toolbar_add {name cmd { help "" } {topwin {} } } {
|
||||
global dark_gui_colorscheme
|
||||
global dark_gui_colorscheme toolbar_icon_zoom
|
||||
|
||||
set toolbar_icon_size [expr {$toolbar_icon_zoom * 24}]
|
||||
if { $dark_gui_colorscheme ==1} {
|
||||
set bg black
|
||||
} else {
|
||||
|
|
@ -7868,8 +7882,8 @@ proc toolbar_add {name cmd { help "" } {topwin {} } } {
|
|||
frame $topwin.toolbar -relief raised -bd 0 -background $bg
|
||||
}
|
||||
if { ![winfo exists $topwin.toolbar.b$name]} {
|
||||
button $topwin.toolbar.b$name -image img$name -relief flat -bd 0 -background $bg -fg $bg -height 24 \
|
||||
-padx 0 -pady 0 -command $cmd
|
||||
button $topwin.toolbar.b$name -image img$name -relief flat -bd 0 \
|
||||
-background $bg -fg $bg -height $toolbar_icon_size -padx 0 -pady 0 -command $cmd
|
||||
if { $help == "" } { balloon $topwin.toolbar.b$name $name } else { balloon $topwin.toolbar.b$name $help }
|
||||
}
|
||||
}
|
||||
|
|
@ -9831,6 +9845,15 @@ set_ne new_symbol_browser_ext {\.(sch|sym|tcl)$} ;# file extensions (a regex) to
|
|||
|
||||
set_ne file_dialog_ext {*}
|
||||
|
||||
#### toolbar icons are bitmaps. Their size is 24x24. This can be changed to
|
||||
#### accommodate UHD displays.
|
||||
#### the zoom factor is an integer that can be used to enlarge these icons
|
||||
#### Default value: 1
|
||||
set_ne toolbar_icon_zoom 1
|
||||
#### context menu icons are 16 x 16. they can be enlarged by the following integer
|
||||
#### default value: 1
|
||||
set_ne ctxmenu_icon_zoom 1
|
||||
|
||||
## remember edit_prop widget size
|
||||
set_ne edit_prop_size 80x12
|
||||
set_ne text_line_default_geometry {}
|
||||
|
|
|
|||
|
|
@ -245,6 +245,15 @@
|
|||
#### default: unset (tk uses its default) > 1.0 ==> bigger
|
||||
# set tk_scaling 1.7
|
||||
|
||||
#### toolbar icons are bitmaps. Their size is 24x24. This can be changed to
|
||||
#### accommodate UHD displays.
|
||||
#### the zoom factor is an integer that can be used to enlarge these icons
|
||||
#### Default value: 1
|
||||
# set toolbar_icon_zoom 2
|
||||
#### context menu icons are 16 x 16. they can be enlarged by the following
|
||||
#### integer. default value: 1
|
||||
# set ctxmenu_icon_zoom 2
|
||||
|
||||
#### use the tclreadline package if available , Default: 1 (enabled).
|
||||
# set use_tclreadline 1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue