Browse Source

ivars.c: prevent crash in CYGWIN batch mode, if NGSPICE_INPUT_DIR given

remove unused Default_MFB_Cap
pre-master-46
h_vogt 13 years ago
parent
commit
8e5ad3d344
  1. 1
      src/include/ngspice/ngspice.h
  2. 5
      src/misc/ivars.c

1
src/include/ngspice/ngspice.h

@ -226,7 +226,6 @@ extern char Spice_Build_Date[];
extern char Spice_Manual[]; extern char Spice_Manual[];
extern char *News_File; extern char *News_File;
extern char *Default_MFB_Cap;
extern char *Spice_Path; extern char *Spice_Path;
extern char *Help_Path; extern char *Help_Path;
extern char *Lib_Path; extern char *Lib_Path;

5
src/misc/ivars.c

@ -18,7 +18,6 @@ extern int vasprintf(char **out, const char *fmt, va_list ap);
char *Spice_Path; char *Spice_Path;
char *News_File; char *News_File;
char *Default_MFB_Cap;
char *Help_Path; char *Help_Path;
char *Lib_Path; char *Lib_Path;
char *Inp_Path; char *Inp_Path;
@ -72,8 +71,6 @@ ivars(char *argv0)
/* for printing a news file */ /* for printing a news file */
mkvar(&News_File, Spice_Lib_Dir, "news", "SPICE_NEWS"); mkvar(&News_File, Spice_Lib_Dir, "news", "SPICE_NEWS");
/* not used in ngspice */
mkvar(&Default_MFB_Cap, Spice_Lib_Dir, "mfbcap", "SPICE_MFBCAP");
/* help directory, not used in Windows mode */ /* help directory, not used in Windows mode */
mkvar(&Help_Path, Spice_Lib_Dir, "helpdir", "SPICE_HELP_DIR"); mkvar(&Help_Path, Spice_Lib_Dir, "helpdir", "SPICE_HELP_DIR");
/* where spinit is found */ /* where spinit is found */
@ -95,6 +92,7 @@ ivars(char *argv0)
/* set path either to environment variable NGSPICE_INPUT_DIR /* set path either to environment variable NGSPICE_INPUT_DIR
(if given) or to NULL */ (if given) or to NULL */
env_overr(&Inp_Path, "NGSPICE_INPUT_DIR"); env_overr(&Inp_Path, "NGSPICE_INPUT_DIR");
Inp_Path = copy(Inp_Path); /* allow tfree */
#endif #endif
env_overr(&Spice_Host, "SPICE_HOST"); /* aspice */ env_overr(&Spice_Host, "SPICE_HOST"); /* aspice */
env_overr(&Bug_Addr, "SPICE_BUGADDR"); env_overr(&Bug_Addr, "SPICE_BUGADDR");
@ -113,7 +111,6 @@ void
destroy_ivars(void) destroy_ivars(void)
{ {
tfree(News_File); tfree(News_File);
tfree(Default_MFB_Cap);
tfree(Help_Path); tfree(Help_Path);
tfree(Lib_Path); tfree(Lib_Path);
tfree(Spice_Path); tfree(Spice_Path);

Loading…
Cancel
Save