From 1f35fdf05cfa9ecdeb466eaf6e0e59f9dd553b9e Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 22 Jan 2024 01:19:27 +0100 Subject: [PATCH] add `spectrum` type analysis in graph dialog sim type combobox. Make sp and spectrum aliases of ac in read_dataset() and extra_rawfile() --- src/save.c | 6 ++++++ src/xschem.tcl | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/save.c b/src/save.c index 3cb5a34e..7533ef54 100644 --- a/src/save.c +++ b/src/save.c @@ -515,6 +515,10 @@ static int read_dataset(FILE *fd, Raw **rawptr, const char *type) return 0; } dbg(1, "read_dataset(): type=%s\n", type ? type : ""); + if(type) { + if(!my_strcasecmp(type, "spectrum")) type = "ac"; + if(!my_strcasecmp(type, "sp")) type = "ac"; + } while((line = my_fgets(fd, NULL))) { my_strdup2(_ALLOC_ID_, &lowerline, line); strtolower(lowerline); @@ -897,6 +901,8 @@ int extra_rawfile(int what, const char *file, const char *type, double sweep1, d if(what == 1 && xctx->extra_raw_n < MAX_RAW_N && file && type) { tclvareval("subst {", file, "}", NULL); my_strncpy(f, tclresult(), S(f)); + if(!my_strcasecmp(type, "spectrum")) type = "ac"; + if(!my_strcasecmp(type, "sp")) type = "ac"; for(i = 0; i < xctx->extra_raw_n; i++) { if(xctx->extra_raw_arr[i]->sim_type && !strcmp(xctx->extra_raw_arr[i]->rawfile, f) && diff --git a/src/xschem.tcl b/src/xschem.tcl index e7ecd693..23bbfb22 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -2517,7 +2517,7 @@ proc graph_edit_properties {n} { # center right frame label .graphdialog.center.right.lab1 -text { Signals in graph } if { [info tclversion] > 8.4} { - ttk::combobox .graphdialog.center.right.list -values {dc ac tran op sp noise} -width 4 + ttk::combobox .graphdialog.center.right.list -values {dc ac tran op sp spectrum noise} -width 4 } else { entry .graphdialog.center.right.list -width 4 }