diff --git a/src/save.c b/src/save.c index c7598d3a..aeac8c91 100644 --- a/src/save.c +++ b/src/save.c @@ -1281,7 +1281,7 @@ void get_sym_type(const char *symname, char **type, struct int_hashentry **pinta else fd=fopen(name,fopen_read_mode); if(fd==NULL) { - dbg(1, "get_sym_type(): xSymbol not found: %s\n",name); + dbg(1, "get_sym_type(): Symbol not found: %s\n",name); my_strdup2(1162, type, ""); } else { char *globalprop=NULL; @@ -1559,7 +1559,7 @@ int load_sym_def(const char *name, FILE *embed_fd) if(!embed_fd) { if((lcc[level].fd=fopen(sympath,fopen_read_mode))==NULL) { - if(recursion_counter == 1) dbg(0, "l_s_d(): xSymbol not found: %s\n",sympath); + if(recursion_counter == 1) dbg(0, "l_s_d(): Symbol not found: %s\n",sympath); my_snprintf(sympath, S(sympath), "%s/%s.sym", tclgetvar("XSCHEM_SHAREDIR"), "systemlib/missing"); if((lcc[level].fd=fopen(sympath, fopen_read_mode))==NULL) { diff --git a/src/spice.awk b/src/spice.awk old mode 100755 new mode 100644 index e4e40290..c255ceb4 --- a/src/spice.awk +++ b/src/spice.awk @@ -169,8 +169,8 @@ function process( i, iprefix) sub("#" iprefix "#", iprefix,$i) gsub(/,/, "," iprefix,$i) ## 20160301 add '?1' if missing in format string - if(i>1 && ( $(i-1) !~/^?/) ) { - $i = "@1 " $i + if(i>1 && ( $(i-1) !~/^\?/) ) { + $i = "?1 " $i } $0 = $0 # reparse input line } @@ -212,7 +212,7 @@ function process( i, iprefix) # .probe tran v( ?1 DL[3],DL[2],DL[1],DL[0] , ?1 WL[3],WL{2],WL[1],WL[0] ) - if($1 ==".probe" && $4 ~/^?/ && $7 ~/^?/ && NF==9) { + if($1 ==".probe" && $4 ~/^\?[0-9]+$/ && $7 ~/^\?[0-9]+$/ && NF==9) { num1=split($5,name,",") num2=split($8,name2,",") @@ -222,7 +222,7 @@ function process( i, iprefix) } # .save v( ?1 DL[3],DL[2],DL[1],DL[0] , ?1 WL[3],WL{2],WL[1],WL[0] ) - } else if($1 ==".save" && $3 ~/^?/ && $6 ~/^?/ && NF==8) { + } else if($1 ==".save" && $3 ~/^\?[0-9]+$/ && $6 ~/^\?[0-9]+$/ && NF==8) { num1=split($4,name,",") num2=split($7,name2,",") @@ -233,13 +233,13 @@ function process( i, iprefix) # .probe tran v( ?1 LDY1_B[1],LDY1_B[0] ) - } else if($1 ==".probe" && $4 ~/^?/ && NF==6) { + } else if($1 ==".probe" && $4 ~/^\?[0-9]+$/ && NF==6) { num=split($5,name,",") for(i=1;i<=num;i++) { print $1 " " $2 " " $3 " " name[i] " " $6 } # .save v( ?1 LDY1_B[1],LDY1_B[0] ) - } else if($1 ==".save" && $3 ~/^?/ && NF==5) { + } else if($1 ==".save" && $3 ~/^\?[0-9]+$/ && NF==5) { num=split($4,name,",") for(i=1;i<=num;i++) { print $1 " " $2 " " name[i] " " $5 @@ -277,7 +277,7 @@ function process( i, iprefix) for(j=2;j<=NF;j+=1) # start from 2 not from 3 20070221 { - if($j ~/^?/) continue # handle the case that $2 not pinlist 20070221 + if($j ~/^\?[0-9]+$/) continue # handle the case that $2 not pinlist 20070221 arg_num[j]=split($j,tmp,",") for(k=1;k<=arg_num[j]; k++) { arg_name[j,k]=tmp[k] @@ -289,14 +289,14 @@ function process( i, iprefix) for(j=2;j<=NF;j++) { - if($j !~ /^?/) + if($j !~ /^\?[0-9]+$/) { printf "%s ", $j # if not a node just print it } else { nmult=$(j++) - sub(/?/,"",nmult) + sub(/\?/,"",nmult) if(nmult+0==-1) nmult=arg_num[j] for(l=0;l7) {printf ","} - if($j !~ /^?/) + if($j !~ /^\?[0-9]+$/) { pin=pin $j # if not a node just print it } @@ -253,7 +253,7 @@ begin_module && $1 ~/^\);$/ { { nmult=$(j++);j++ - sub(/?/,"",nmult) + sub(/\?/,"",nmult) nmult=nmult+0 if(nmult==-1) nmult=arg_num[j] for(l=0;l