.probe: Add call to function inp_probe() which resides
in inpc_probe.c. Make function insert_new_line() non-static Enable detecting the number of nodes in x-lines (calls to subciruits) in function get_number_terminals()
This commit is contained in:
parent
2c3f2357de
commit
0a5d5bf0f1
|
|
@ -190,6 +190,7 @@ static char* eval_tc(char* line, char* tline);
|
||||||
|
|
||||||
static void rem_double_braces(struct card* card);
|
static void rem_double_braces(struct card* card);
|
||||||
|
|
||||||
|
extern void inp_probe(struct card* card);
|
||||||
#ifndef EXT_ASC
|
#ifndef EXT_ASC
|
||||||
static void utf8_syntax_check(struct card *deck);
|
static void utf8_syntax_check(struct card *deck);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -402,7 +403,7 @@ static int is_cider_model(char *buf)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* insert a new card, just behind the given card */
|
/* insert a new card, just behind the given card */
|
||||||
static struct card *insert_new_line(
|
struct card *insert_new_line(
|
||||||
struct card *card, char *line, int linenum, int linenum_orig)
|
struct card *card, char *line, int linenum, int linenum_orig)
|
||||||
{
|
{
|
||||||
struct card *x = TMALLOC(struct card, 1);
|
struct card *x = TMALLOC(struct card, 1);
|
||||||
|
|
@ -1024,6 +1025,8 @@ struct card *inp_readall(FILE *fp, const char *dir_name,
|
||||||
|
|
||||||
struct nscope *root = inp_add_levels(working);
|
struct nscope *root = inp_add_levels(working);
|
||||||
|
|
||||||
|
inp_probe(working);
|
||||||
|
|
||||||
inp_fix_for_numparam(subckt_w_params, working);
|
inp_fix_for_numparam(subckt_w_params, working);
|
||||||
|
|
||||||
inp_remove_excess_ws(working);
|
inp_remove_excess_ws(working);
|
||||||
|
|
@ -4583,6 +4586,19 @@ int get_number_terminals(char *c)
|
||||||
}
|
}
|
||||||
return i - 2;
|
return i - 2;
|
||||||
break;
|
break;
|
||||||
|
case 'x':
|
||||||
|
i = 0;
|
||||||
|
/* find the first token with "params:" or "=" in the line*/
|
||||||
|
while ((i < 100) && (*c != '\0')) {
|
||||||
|
char *inst = gettok_instance(&c);
|
||||||
|
strncpy(nam_buf, inst, sizeof(nam_buf) - 1);
|
||||||
|
txfree(inst);
|
||||||
|
if (strstr(nam_buf, "params") || strchr(nam_buf, '='))
|
||||||
|
break;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
return i - 2;
|
||||||
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
case 'j':
|
case 'j':
|
||||||
case 'w':
|
case 'w':
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue