environmental variable NGSPICE_INPUT_DIR

This commit is contained in:
h_vogt 2011-07-10 09:59:39 +00:00
parent 12eba3888e
commit ab587d8d3f
3 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2011-07-10 Holger Vogt
* main.c, ivars.c: environmental variable NGSPICE_INPUT_DIR
for additional search directory for input file
2011-07-10 Robert Larice
* src/winmain.c ,
* src/frontend/wdisp/winprint.c :

View File

@ -1192,7 +1192,7 @@ main(int argc, char **argv)
/* Copy all the arguments into the temporary file */
tp = fopen(arg, "r");
if (!tp) {
char *lbuffer = getenv("NGSPICE_INPUT");
char *lbuffer = getenv("NGSPICE_INPUT_DIR");
if (lbuffer && *lbuffer) {
char *p =
TMALLOC(char, strlen(lbuffer) + strlen(DIR_PATHSEP) + strlen(arg) + 1);

View File

@ -84,8 +84,8 @@ ivars(char *argv0)
/* get directory where ngspice resides */
ngpath = ngdirname(argv0);
/* set path either to <ngspice-directory>/input or, if set, to
environment variable NGSPICE_INPUT */
mkvar(&Inp_Path, ngpath, "input", "NGSPICE_INPUT");
environment variable NGSPICE_INPUT_DIR */
mkvar(&Inp_Path, ngpath, "input", "NGSPICE_INPUT_DIR");
env_overr(&Spice_Host, "SPICE_HOST"); /* aspice */
env_overr(&Bug_Addr, "SPICE_BUGADDR");