spice.awk: do not join user code lines

This commit is contained in:
stefan schippers 2023-12-03 21:33:03 +01:00
parent 6648652ae5
commit 28ed1351f1
3 changed files with 13 additions and 5 deletions

View File

@ -25,7 +25,7 @@
BEGIN{ quote=0 }
/^\*\*\*\* begin user architecture code/ { user_code = 1 }
/^\*\*\*\* begin user (architecture|header) code/ { user_code = 1 }
{
pos=0
@ -75,4 +75,4 @@ BEGIN{ quote=0 }
}
}
/^\*\*\*\* end user architecture code/ { user_code = 0 }
/^\*\*\*\* end user (architecture|header) code/ { user_code = 0 }

View File

@ -38,7 +38,11 @@ BEGIN{
# join split lines
{
if($0 ~ /^[+]/) {
if($0 ~ /^\*\*\*\* begin user (architecture|header) code/) {
user_code = 1
}
if($0 ~ /^[+]/ && !user_code) {
yy = yy " " substr($0,2)
next
}
@ -52,9 +56,13 @@ BEGIN{
}
line[lines++] = $0
}
if($0 ~ /^\*\*\*\* end user (architecture|header) code/) {
user_code = 0
}
}
END{
user_code = 0
$0=yy
line[lines++] = $0

View File

@ -194,12 +194,12 @@ proc netlist_test {} {
greycnt.sch verilog 3032956185
autozero_comp.sch spice 751826850
test_generators.sch spice 49312823
inst_sch_select.sch spice 2432089114
inst_sch_select.sch spice 2240134366
test_bus_tap.sch spice 188702715
loading.sch vhdl 2975204502
mos_power_ampli.sch spice 125840804
hierarchical_tedax.sch tedax 998070173
LCC_instances.sch spice 1646579002
LCC_instances.sch spice 1888015492
pcb_test1.sch tedax 1925087189
test_doublepin.sch spice 4159808692
simulate_ff.sch spice 574849766