Browse Source

environmental variable NGSPICE_INPUT_DIR

h_vogt 15 years ago
parent
commit
ab587d8d3f
  1. 4
      ChangeLog
  2. 2
      src/main.c
  3. 4
      src/misc/ivars.c

4
ChangeLog

@ -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 :

2
src/main.c

@ -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);

4
src/misc/ivars.c

@ -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");

Loading…
Cancel
Save