NSPICE_INPUT_DIR

This commit is contained in:
h_vogt 2011-07-10 11:18:57 +00:00
parent ab587d8d3f
commit 6979f1c76a
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
2011-07-10 Holger Vogt
* main.c, ivars.c: environmental variable NGSPICE_INPUT_DIR
* main.c, ivars.c, /xspice/icm/analog/file_source/cfunc.mod:
environmental variable NGSPICE_INPUT_DIR
for additional search directory for input file
2011-07-10 Robert Larice

View File

@ -148,7 +148,7 @@ void cm_filesource(ARGS) /* structure holding parms, inputs, outputs, etc.
state->atend = 0;
if (!state->fp) {
char *lbuffer, *p;
lbuffer = getenv("NGSPICE_INPUT");
lbuffer = getenv("NGSPICE_INPUT_DIR");
if (lbuffer && *lbuffer) {
p = (char*) malloc(strlen(lbuffer) + strlen(DIR_PATHSEP) + strlen(PARAM(file)) + 1);
sprintf(p, "%s%s%s", lbuffer, DIR_PATHSEP, PARAM(file));