numparam, drop unused `srcfile'
This commit is contained in:
parent
4f8bef997d
commit
7b175dd1c4
|
|
@ -15,7 +15,7 @@ struct card;
|
|||
|
||||
extern char *nupa_copy(struct card *c);
|
||||
extern int nupa_eval(struct card *card);
|
||||
extern void nupa_signal(int sig, char *info);
|
||||
extern void nupa_signal(int sig);
|
||||
extern void nupa_scan(struct card *card, int is_subckt);
|
||||
extern void nupa_list_params(FILE *cp_out);
|
||||
extern double nupa_get_param(char *param_name, int *found);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ typedef struct entry_s {
|
|||
|
||||
|
||||
typedef struct { /* the input scanner data structure */
|
||||
SPICE_DSTRING srcfile; /* last piece of source file name */
|
||||
SPICE_DSTRING lookup_buf; /* useful temp buffer for quick symbol lookup */
|
||||
int srcline;
|
||||
int oldline;
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ putlogfile(char c, int num, char *t)
|
|||
|
||||
|
||||
static void
|
||||
nupa_init(char *srcfile)
|
||||
nupa_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -447,9 +447,6 @@ nupa_init(char *srcfile)
|
|||
dicoS->dynrefptr[i] = NULL;
|
||||
dicoS->dyncategory[i] = '?';
|
||||
}
|
||||
|
||||
if (srcfile != NULL)
|
||||
scopys(&dicoS->srcfile, srcfile);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -859,7 +856,7 @@ nupa_eval(struct card *card)
|
|||
|
||||
|
||||
void
|
||||
nupa_signal(int sig, char *info)
|
||||
nupa_signal(int sig)
|
||||
/* warning: deckcopy may come inside a recursion ! substart no! */
|
||||
/* info is context-dependent string data */
|
||||
{
|
||||
|
|
@ -867,7 +864,7 @@ nupa_signal(int sig, char *info)
|
|||
|
||||
if (sig == NUPADECKCOPY) {
|
||||
if (firstsignalS) {
|
||||
nupa_init(info);
|
||||
nupa_init();
|
||||
firstsignalS = 0;
|
||||
}
|
||||
} else if (sig == NUPASUBSTART) {
|
||||
|
|
|
|||
|
|
@ -216,11 +216,6 @@ message(dico_t *dico, const char *fmt, ...)
|
|||
{
|
||||
va_list ap;
|
||||
|
||||
char *srcfile = spice_dstring_value(&(dico->srcfile));
|
||||
|
||||
if (srcfile && *srcfile)
|
||||
fprintf(stderr, "%s:", srcfile);
|
||||
|
||||
if (dico->srcline >= 0)
|
||||
fprintf
|
||||
(stderr,
|
||||
|
|
@ -245,8 +240,6 @@ initdico(dico_t *dico)
|
|||
int asize = 10; /* default allocation depth of the synbol stack */
|
||||
COMPATMODE_T compat_mode;
|
||||
|
||||
spice_dstring_init(&(dico->srcfile));
|
||||
|
||||
dico->srcline = -1;
|
||||
dico->errcount = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ inp_subcktexpand(struct card *deck) {
|
|||
fprintf(stderr, "%3d:%s\n", c->linenum, c->line);
|
||||
#endif
|
||||
|
||||
nupa_signal(NUPADECKCOPY, NULL);
|
||||
nupa_signal(NUPADECKCOPY);
|
||||
/* get the subckt/model names from the deck */
|
||||
for (c = deck; c; c = c->nextcard) { /* first Numparam pass */
|
||||
if (ciprefix(".subckt", c->line))
|
||||
|
|
@ -358,13 +358,13 @@ inp_subcktexpand(struct card *deck) {
|
|||
if (ciprefix(invoke, c->line)) {
|
||||
fprintf(cp_err, "Error: unknown subckt: %s\n", c->line);
|
||||
if (use_numparams)
|
||||
nupa_signal(NUPAEVALDONE, NULL);
|
||||
nupa_signal(NUPAEVALDONE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (use_numparams) {
|
||||
/* the NUMPARAM final line translation pass */
|
||||
nupa_signal(NUPASUBDONE, NULL);
|
||||
nupa_signal(NUPASUBDONE);
|
||||
for (c = deck; c; c = c->nextcard)
|
||||
/* 'param' .meas statements can have dependencies on measurement values */
|
||||
/* need to skip evaluating here and evaluate after other .meas statements */
|
||||
|
|
@ -382,7 +382,7 @@ inp_subcktexpand(struct card *deck) {
|
|||
|
||||
/*nupa_list_params(stdout);*/
|
||||
nupa_copy_inst_dico();
|
||||
nupa_signal(NUPAEVALDONE, NULL);
|
||||
nupa_signal(NUPAEVALDONE);
|
||||
}
|
||||
|
||||
return (deck); /* return the spliced deck. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue