avoid using "string is list" if tclversion <= 8.4

This commit is contained in:
stefan schippers 2023-06-28 00:32:56 +02:00
parent 34f3176e26
commit 8399106ed4
6 changed files with 395 additions and 347 deletions

View File

@ -135,6 +135,9 @@
<Component Id="CMPADDCUSTOMMENU">
<File Id="ADDCUSTOMMENU" KeyPath="yes" Source="../../src/add_custom_menu.tcl" />
</Component>
<Component Id="CMPMOUSEBINDINGS">
<File Id="MOUSEBINDINGS" KeyPath="yes" Source="../../src/mouse_bindings.tcl" />
</Component>
<Component Id="CMPKEYSHELP">
<File Id="KEYSHELP" KeyPath="yes" Source="../../src/keys.help" />
</Component>
@ -330,7 +333,8 @@
<ComponentRef Id="CMPGSCHEMTOXSCHEMAWK" />
<ComponentRef Id="CMPHSPICEBACKANNOTATE" />
<ComponentRef Id="CMPADDCUSTOMMENU" />
<ComponentRef Id="CMPHERCULESTOSPICEAWK" />
<ComponentRef Id="CMPMOUSEBINDINGS" />
<ComponentRef Id="CMPHERCULESTOSPICEAWK" />
<ComponentRef Id="CMPIMPORTOPUSSYMBOLSAWK" />
<ComponentRef Id="CMPLABELCOMPACTORAWK" />
<ComponentRef Id="CMPMAKEEDITAWK" />

View File

@ -111,6 +111,15 @@
<Component Id="cmp6D354145B37A6C2A69DE69A16C8651A8" Guid="{5E8BA266-622D-4800-A7D3-DC1C10A35074}">
<File Id="fil68C4E6BD7190A06AEBA8E05EA1E02BDA" KeyPath="yes" Source="$(var.docSrcDir)\xschem_man\busses3.png" />
</Component>
<Component Id="cmp15AB585898B739D28C38577333DE6664" Guid="{14A66845-6B67-4D22-B5A2-46C8A56A9FA0}">
<File Id="fil8CA9E97720B6AEE7E044ADE67044D376" KeyPath="yes" Source="$(var.docSrcDir)\xschem_man\busses4.png" />
</Component>
<Component Id="cmp39F0981B2376C8DD273D8C5A1B4A56FC" Guid="{08368DBE-9D93-4182-8CC3-C55FF0570679}">
<File Id="fil82E84138D42BBED4CF981F391A942D99" KeyPath="yes" Source="$(var.docSrcDir)\xschem_man\busses5.png" />
</Component>
<Component Id="cmpE3D43CAAD367DC5DC13E04524A89C888" Guid="{0CEC7ECC-5920-4803-B00A-B3CBD5CF894C}">
<File Id="fil37526641F7755DFEAA6D2C58DB0ED07B" KeyPath="yes" Source="$(var.docSrcDir)\xschem_man\busses6.png" />
</Component>
<Component Id="cmpA6AB78B04BBC707FE694C5FD48F835BB" Guid="{CAB4FECD-75C2-42F4-A613-0E4D96C2FC23}">
<File Id="filCC1A2B64517E9CA43452D1BA34093ACC" KeyPath="yes" Source="$(var.docSrcDir)\xschem_man\commands.html" />
</Component>
@ -1056,6 +1065,9 @@
<ComponentRef Id="cmp5EBD402900C682E1450A66E4E517B871" />
<ComponentRef Id="cmpA8F006A1010B7C3BA88B9E4849C82340" />
<ComponentRef Id="cmp6D354145B37A6C2A69DE69A16C8651A8" />
<ComponentRef Id="cmp15AB585898B739D28C38577333DE6664" />
<ComponentRef Id="cmp39F0981B2376C8DD273D8C5A1B4A56FC" />
<ComponentRef Id="cmpE3D43CAAD367DC5DC13E04524A89C888" />
<ComponentRef Id="cmpA6AB78B04BBC707FE694C5FD48F835BB" />
<ComponentRef Id="cmp5F2A45E78EBD02CB7779C16BF4C03932" />
<ComponentRef Id="cmp35239CC60E8A28DF0814C1E2C8AED814" />

File diff suppressed because it is too large Load Diff

View File

@ -61,7 +61,7 @@ p{padding: 15px 30px 10px;}
The <kbd>nc</kbd> (netcat) utility is used to pipe the commands to the tcp socket.<br>
When starting xschem a fixed initial port number is always used (2021 by default), so it is always possible to
remotely communicate with xschem using this TCP port. Then the following comands can be sent to setup a new port number
for further communications, freeing the initial (2021) potr number. If another xschem process is started it will
for further communications, freeing the initial (2021) port number. If another xschem process is started it will
again use the initial port number, so no port number collisions occur.
</p>
<pre class="code">

View File

@ -1388,7 +1388,7 @@ static void switch_window(int *window_count, const char *win_path, int tcl_ctx)
{
int n;
char my_win_path[80];
Tk_Window tkwin;
Tk_Window tkwin=NULL;
if(!win_path) {
dbg(0, "switch_window(): no filename or window path given\n");
return;
@ -1651,7 +1651,7 @@ static void destroy_window(int *window_count, const char *win_path)
{
int i, n;
Xschem_ctx *savectx;
Tk_Window tkwin;
Tk_Window tkwin=NULL;
savectx = xctx;
if(*window_count) {
int close = 0;
@ -1777,7 +1777,7 @@ static void destroy_all_windows(int *window_count, int force)
{
int i;
Xschem_ctx *savectx;
Tk_Window tkwin;
Tk_Window tkwin=NULL;
savectx = xctx;
if(*window_count) {
int close;

View File

@ -912,10 +912,20 @@ proc sim_is_xyce {} {
# usually as a result of malformed input strings
proc list_tokens {s} {
set res [xschem list_tokens $s 0]
if {[string is list $res]} {
return $res
if { [info tclversion] > 8.4 } {
if { [string is list $res]} {
return $res
} else {
return [split $res]
}
} else {
return [split $res]
if {![catch {llength $res}]} {
return $res
} else {
return [split $res]
}
}
}
@ -923,10 +933,20 @@ proc list_tokens {s} {
proc tolist {s} {
set s [string trim $s]
regsub -all {[\t\n ]+} $s { } s
if {[string is list $s] } {
return $s
if { [info tclversion] > 8.4 } {
if { [string is list $s]} {
return $s
} else {
return [split $s]
}
} else {
return [split $s]
if {![catch {llength $s}]} {
return $s
} else {
return [split $s]
}
}
}