complete previous `xschem load_symbol` command
This commit is contained in:
parent
279d24288d
commit
cefd320ef6
|
|
@ -1029,7 +1029,10 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
||||||
if 'f' is not given and a file log is open, close log
|
if 'f' is not given and a file log is open, close log
|
||||||
file and resume logging to stderr </pre>
|
file and resume logging to stderr </pre>
|
||||||
<li><kbd> load_symbol [symbol_file]</kbd></li><pre>
|
<li><kbd> load_symbol [symbol_file]</kbd></li><pre>
|
||||||
Load specified symbol_file </pre>
|
Load specified symbol_file
|
||||||
|
Returns:
|
||||||
|
>= 0: symbol is already loaded or has been loaded
|
||||||
|
< 0: symbol was not loaded</pre>
|
||||||
<li><kbd> log_write text</kbd></li><pre>
|
<li><kbd> log_write text</kbd></li><pre>
|
||||||
write given string to log file, so tcl can write messages on the log file</pre>
|
write given string to log file, so tcl can write messages on the log file</pre>
|
||||||
<li><kbd> logic_get_net net_name</kbd></li><pre>
|
<li><kbd> logic_get_net net_name</kbd></li><pre>
|
||||||
|
|
|
||||||
|
|
@ -3025,10 +3025,14 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
||||||
}
|
}
|
||||||
|
|
||||||
/* load_symbol [symbol_file]
|
/* load_symbol [symbol_file]
|
||||||
* Load specified symbol_file */
|
* Load specified symbol_file
|
||||||
|
* Returns:
|
||||||
|
* >= 0: symbol is already loaded or has been loaded
|
||||||
|
* < 0: symbol was not loaded
|
||||||
|
*/
|
||||||
else if(!strcmp(argv[1], "load_symbol") )
|
else if(!strcmp(argv[1], "load_symbol") )
|
||||||
{
|
{
|
||||||
int res = -1;
|
int res = -2;
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
|
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
|
||||||
if(argc > 2) {
|
if(argc > 2) {
|
||||||
|
|
@ -3036,7 +3040,12 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
||||||
if(i < 0 ) {
|
if(i < 0 ) {
|
||||||
if(!stat(argv[2], &buf)) { /* file exists */
|
if(!stat(argv[2], &buf)) { /* file exists */
|
||||||
res = load_sym_def(rel_sym_path(argv[2]), NULL);
|
res = load_sym_def(rel_sym_path(argv[2]), NULL);
|
||||||
|
if(res == 0) res = -1;
|
||||||
|
} else {
|
||||||
|
res = -3;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
res = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Tcl_SetResult(interp, my_itoa(res), TCL_VOLATILE);
|
Tcl_SetResult(interp, my_itoa(res), TCL_VOLATILE);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue