ivars.c, return of env_overr is bool, free var. temp

This commit is contained in:
h_vogt 2016-11-01 17:16:54 +01:00 committed by rlar
parent db5a9c9997
commit a161d4303b
1 changed files with 7 additions and 2 deletions

View File

@ -56,12 +56,16 @@ get_abs_path(void)
#endif
static void
static bool
env_overr(char **v, char *e)
{
char *p;
if (v && e && (p = getenv(e)) != NULL)
if (v && e && (p = getenv(e)) != NULL) {
*v = p;
return (TRUE);
}
else
return (FALSE);
}
static void
@ -113,6 +117,7 @@ ivars(char *argv0)
mkvar(&Lib_Path, Spice_Lib_Dir, "scripts", "SPICE_SCRIPTS");
/* used to call ngspice with aspice command, not used in Windows mode */
mkvar(&Spice_Path, Spice_Exec_Dir, "ngspice", "SPICE_PATH");
tfree(temp);
/* may be used to store input files (*.lib, *.include, ...) */
/* get directory where ngspice resides */
#if defined (HAS_WINGUI) || defined (__MINGW32__) || defined (_MSC_VER)