From 5da8f777b2a5c5bb722ddeb6a7da4347dd313fad Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Tue, 30 Aug 2022 15:54:18 +0200 Subject: [PATCH] monospaced font in code_shown.sym --- scconfig/src/default/str.c | 4 +++- scconfig/src/util/arg_auto_menu.c | 1 + xschem_library/devices/code_shown.sym | 4 ++-- xschem_library/examples/test_ac.sch | 1 - xschem_library/ngspice/solar_panel.sch | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/scconfig/src/default/str.c b/scconfig/src/default/str.c index b02a2cfc..22b011bf 100644 --- a/scconfig/src/default/str.c +++ b/scconfig/src/default/str.c @@ -131,8 +131,10 @@ char *str_concat(const char *sep, ...) } /* first string is NULL; return a new allocation that is a simple \0, empty string to avoid a nasty corner case */ - if (sum == 0) + if (sum == 0) { + va_end(ap); return calloc(1, 1); + } sl = strlen(sep); sum += (v-1) * sl + 1; /* + a sep between each two strings and a terminator at the end */ diff --git a/scconfig/src/util/arg_auto_menu.c b/scconfig/src/util/arg_auto_menu.c index a142a78b..16fbe315 100644 --- a/scconfig/src/util/arg_auto_menu.c +++ b/scconfig/src/util/arg_auto_menu.c @@ -21,6 +21,7 @@ static const char *get_entry_val(const arg_auto_set_t *as) free(path); return res; } + return "unknown"; } #define next_word(curr, next) \ diff --git a/xschem_library/devices/code_shown.sym b/xschem_library/devices/code_shown.sym index 498ebb01..eb6ccc81 100644 --- a/xschem_library/devices/code_shown.sym +++ b/xschem_library/devices/code_shown.sym @@ -1,4 +1,4 @@ -v {xschem version=2.9.9 file_version=1.2 } +v {xschem version=3.1.0 file_version=1.2 } G {} K {type=netlist_commands template="name=s1 only_toplevel=false value=blabla" @@ -11,4 +11,4 @@ E {} L 4 0 -10 70 -10 {} L 4 0 -10 0 10 {} T {@name} 5 -30 0 0 0.3 0.3 {} -T {@value} 15 -5 0 0 0.3 0.3 {} +T {@value} 15 -5 0 0 0.3 0.3 {font=Monospace} diff --git a/xschem_library/examples/test_ac.sch b/xschem_library/examples/test_ac.sch index 05fc1481..50480b14 100644 --- a/xschem_library/examples/test_ac.sch +++ b/xschem_library/examples/test_ac.sch @@ -847,7 +847,6 @@ m=1 value=1 footprint=1206 device="ceramic capacitor"} -C {nmos4.sym} 540 -250 0 1 {name=m2 model=cmosn w=10u l=1u m=1 net_name=true} C {launcher.sym} 1210 -70 0 0 {name=h3 descr="Graph Manual page" url="https://xschem.sourceforge.io/stefan/xschem_man/graphs.html"} diff --git a/xschem_library/ngspice/solar_panel.sch b/xschem_library/ngspice/solar_panel.sch index 6657236e..e5efcb67 100644 --- a/xschem_library/ngspice/solar_panel.sch +++ b/xschem_library/ngspice/solar_panel.sch @@ -1,4 +1,4 @@ -v {xschem version=3.0.0 file_version=1.2 } +v {xschem version=3.1.0 file_version=1.2 } G {} K {} V {} @@ -126,7 +126,7 @@ lab=CTRL1} N 800 -870 800 -690 { lab=CTRL1} C {title.sym} 160 -40 0 0 {name=l1 author="Stefan Schippers" net_name=true} -C {code_shown.sym} 250 -250 0 0 {name=CONTROL value=".control +C {code_shown.sym} 190 -240 0 0 {name=CONTROL value=".control save v(panel) v(sw) v(led) i(vpanel) tran 1u 600u uic write solar_panel.raw