move ngspice_compat_mode(void) to inpcom.c and make it static

This commit is contained in:
Holger Vogt 2018-05-21 00:52:07 +02:00
parent fa3badf2bd
commit 0cb71b21bb
2 changed files with 27 additions and 27 deletions

View File

@ -479,6 +479,33 @@ find_back_assignment(const char *p, const char *start)
}
/* Set a compatibility flag.
Currently available are flags for:
- ngspice (standard)
- a commercial simulator
- Spice3
- all compatibility stuff
*/
static COMPATMODE_T
ngspice_compat_mode(void)
{
char behaviour[80];
if (cp_getvar("ngbehavior", CP_STRING, behaviour)) {
if (strcasecmp(behaviour, "all") == 0)
return COMPATMODE_ALL;
if (strcasecmp(behaviour, "hs") == 0)
return COMPATMODE_HS;
if (strcasecmp(behaviour, "ps") == 0)
return COMPATMODE_PS;
if (strcasecmp(behaviour, "spice3") == 0)
return COMPATMODE_SPICE3;
}
return COMPATMODE_ALL;
}
/*-------------------------------------------------------------------------
Read the entire input file and return a pointer to the first line of
the linked list of 'card' records in data. The pointer is stored in

View File

@ -475,33 +475,6 @@ double CONSTe;
IFfrontEnd *SPfrontEnd = NULL;
int DEVmaxnum = 0;
/* -------------------------------------------------------------------------- */
/* Set a compatibility flag.
Currently available are flags for:
- ngspice (standard)
- a commercial simulator
- Spice3
- all compatibility stuff
*/
COMPATMODE_T
ngspice_compat_mode(void)
{
char behaviour[80];
if (cp_getvar("ngbehavior", CP_STRING, behaviour)) {
if (strcasecmp(behaviour, "all") == 0)
return COMPATMODE_ALL;
if (strcasecmp(behaviour, "hs") == 0)
return COMPATMODE_HS;
if (strcasecmp(behaviour, "ps") == 0)
return COMPATMODE_PS;
if (strcasecmp(behaviour, "spice3") == 0)
return COMPATMODE_SPICE3;
}
return COMPATMODE_ALL;
}
/* -------------------------------------------------------------------------- */
int