diff --git a/src/netlist.c b/src/netlist.c index 6ee40115..a1358dbd 100644 --- a/src/netlist.c +++ b/src/netlist.c @@ -1097,6 +1097,9 @@ int sym_vs_sch_pins() case 'G': load_ascii_string(&tmp, fd); break; + case '#': + read_line(fd, 1); + break; case 'L': case 'B': if(fscanf(fd, "%d",&tmpi)< 1) { diff --git a/src/paste.c b/src/paste.c index 7f7342dd..fdfa8fa2 100644 --- a/src/paste.c +++ b/src/paste.c @@ -373,6 +373,9 @@ void merge_file(int selection_load, const char ext[]) case 'v': load_ascii_string(&aux_ptr, fd); break; + case '#': + read_line(fd, 1); + break; case 'V': load_ascii_string(&aux_ptr, fd); break; diff --git a/src/save.c b/src/save.c index 479a5878..14d06cab 100644 --- a/src/save.c +++ b/src/save.c @@ -772,7 +772,7 @@ void read_xschem_file(FILE *fd) xctx->file_version[0] = '\0'; while(!endfile) { - if(fscanf(fd," %c",tag)==EOF) break; + if(fscanf(fd," %c",tag)==EOF) break; /* space before %c --> eat white space */ switch(tag[0]) { case 'v': @@ -783,6 +783,9 @@ void read_xschem_file(FILE *fd) } dbg(1, "read_xschem_file(): file_version=%s\n", xctx->file_version); break; + case '#': + read_line(fd, 1); + break; case 'E': load_ascii_string(&xctx->schtedaxprop,fd); break; @@ -1432,7 +1435,8 @@ static void get_sym_type(const char *symname, char **type, case 'B': fscan_ret = fscanf(fd, "%d",&c); if(fscan_ret != 1 || c <0 || c>=cadlayers) { - fprintf(errfp,"get_sym_type(): box layer wrong or missing or > defined cadlayers, ignoring, increase cadlayers\n"); + fprintf(errfp,"get_sym_type(): box layer wrong or missing or > defined cadlayers, " + "ignoring, increase cadlayers\n"); ungetc(tag[0], fd); read_record(tag[0], fd, 1); } @@ -1751,6 +1755,9 @@ int load_sym_def(const char *name, FILE *embed_fd) case 'v': load_ascii_string(&aux_ptr, lcc[level].fd); break; + case '#': + read_line(lcc[level].fd, 1); + break; case 'E': load_ascii_string(&aux_ptr, lcc[level].fd); break; diff --git a/xschem_library/examples/mos_power_ampli.sch b/xschem_library/examples/mos_power_ampli.sch index d145eacf..bc5bf2fb 100644 --- a/xschem_library/examples/mos_power_ampli.sch +++ b/xschem_library/examples/mos_power_ampli.sch @@ -23,15 +23,9 @@ unitx=m T {ANALOG AUDIO AMPLIFIER N-Channel only power stage} 430 -270 0 0 0.5 0.5 {layer=8} N 180 -500 180 -470 {lab=E9} -# -# comment -# N 260 -470 340 -470 {lab=E9} N 340 -500 340 -470 {lab=E9} N 1110 -700 1110 -670 {lab=SA} - - - N 840 -1020 840 -980 {lab=E4} N 1110 -590 1110 -570 {lab=OUTI} N 1110 -510 1110 -470 {lab=#net1} @@ -123,7 +117,7 @@ C {res.sym} 960 -410 0 1 {name=R7 m=1 value=190 net_name=true} C {nmos3.sym} 1090 -760 0 0 {name=xm1 model=irf540 m=1 program=evince url="https://www.vishay.com/docs/91021/91021.pdf" net_name=true} -C {res.sym} 960 -730 0 1 {name=R0 m=1 value=190 net_name=true} #comment +C {res.sym} 960 -730 0 1 {name=R0 m=1 value=190 net_name=true} C {lab_pin.sym} 1390 -590 0 1 {name=p14 lab=OUT} C {lab_pin.sym} 1110 -280 0 0 {name=p18 lab=VNN} C {lab_wire.sym} 920 -440 0 0 {name=l8 lab=GB}