diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 1369ddbb5..6eed9d112 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -51,9 +51,6 @@ Author: 1985 Wayne A. Christopher /* gtri - end - 12/12/90 */ #endif -#ifdef WITH_LOOPANA -int INP2gentype(char* line); -#endif /* SJB - Uncomment this line for debug tracing */ /*#define TRACE*/ @@ -4707,7 +4704,7 @@ static void inp_compat(struct card *card) continue; #ifdef WITH_LOOPANA - if (INP2gentype(curr_line)) + if (*curr_line == ':') continue; #endif @@ -5780,10 +5777,6 @@ static void inp_bsource_compat(struct card *card) else if (skip_control > 0) { continue; } -#ifdef WITH_LOOPANA - else if (INP2gentype(curr_line)) - continue; -#endif if (*curr_line == 'b') { /* remove white spaces of everything inside {}*/ @@ -8303,14 +8296,14 @@ static void inp_check_syntax(struct card *deck) if (*cut_line == '*' || *cut_line == '\0') continue; // check for unusable leading characters and change them to '*' - if (strchr("=[]?()&%$§\"!:,", *cut_line)) { + if (strchr("=[]?()&%$§\"!,", *cut_line)) { if (ft_stricterror) { fprintf(stderr, "Error: '%c' is not allowed as first character in line %s.\n", *cut_line, cut_line); controlled_exit(EXIT_BAD); } else { if (!check_ch) { - fprintf(stderr, "Warning: Unusal leading characters like '%c' or others out of '= [] ? () & %%$§\"!:,'\n", *cut_line); + fprintf(stderr, "Warning: Unusal leading characters like '%c' or others out of '= [] ? () & %%$§\"!,'\n", *cut_line); fprintf(stderr, " in netlist or included files, will be replaced with '*'\n"); check_ch = 1; /* just one warning */ } diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index 179e9abfb..a42aacea1 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -956,6 +956,21 @@ translate_inst_name(struct bxx_buffer *buffer, const char *scname, const char *n if (!name_e) name_e = strchr(name, '\0'); + #ifdef WITH_LOOPANA + if(*name==':') { + /* :devtype:instance -> :devtype:.x1.instname */ + /* skip to next : */ + while(namenumDevices; type++) { + if(ft_sim->devices[type]) + if(strlen(ft_sim->devices[type]->name)==(len-1)) + if(strncasecmp(line+1, ft_sim->devices[type]->name, len-1)==0) + break; + } + if(typenumDevices) + n = *(ft_sim->devices[type]->terms); + else + n = 0; + } else + #endif n = inp_numnodes(c); /* Added this code for variable number of nodes on certain devices. */ @@ -1948,6 +1982,8 @@ devmodtranslate(struct card *s, char *subname, wordlist * const orig_modnames) } +static int inp_numnode_fromdev(const char* line); + /*----------------------------------------------------------------------* * inp_numnodes returns the maximum number of nodes (netnames) attached * to the component. @@ -1968,7 +2004,7 @@ inp_numnodes(char c) case '*': case '$': return (0); - + case 'b': return (2); case 'c':