get rid of `sim_type=tablefile`, use `table` (scheduler.c, extra_rawfile()) for reding tables

This commit is contained in:
stefan schippers 2024-02-27 11:27:29 +01:00
parent 1e3ac96085
commit 95fc6377d4
2 changed files with 3 additions and 3 deletions

View File

@ -1041,9 +1041,10 @@ int extra_rawfile(int what, const char *file, const char *type, double sweep1, d
xctx->extra_raw_n++;
}
/* **************** table_read ************* */
if(what == 1 && xctx->extra_raw_n < MAX_RAW_N && file && !strcmp(type, "tablefile")) {
if(what == 1 && xctx->extra_raw_n < MAX_RAW_N && file && !strcmp(type, "table")) {
tclvareval("subst {", file, "}", NULL);
my_strncpy(f, tclresult(), S(f));
dbg(1, "extra_rawfile: table_read: f=%s\n", f);
for(i = 0; i < xctx->extra_raw_n; i++) {
if( !strcmp(xctx->extra_raw_arr[i]->rawfile, f)) break;
}
@ -1266,7 +1267,6 @@ int table_read(const char *f)
char *line = NULL, *line_ptr, *line_save;
const char *line_tok;
Raw *raw;
if(xctx->raw) {
dbg(0, "table_read(): must clear current data file before loading new\n");
return 0;

View File

@ -3525,7 +3525,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
Tcl_ResetResult(interp);
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
if(argc > 3 && !strcmp(argv[2], "table_read")) {
ret = extra_rawfile(1, argv[3], "tablefile", sweep1, sweep2);
ret = extra_rawfile(1, argv[3], "table", sweep1, sweep2);
Tcl_SetResult(interp, my_itoa(ret), TCL_VOLATILE);
} else if(argc > 3 && !strcmp(argv[2], "read")) {
if(argc > 6) {