add Inp_Path to sourcepath variable
Patch provided by Uros Platise https://sourceforge.net/p/ngspice/ngspice/merge-requests/4/
This commit is contained in:
parent
ab9ffc2319
commit
7c90004921
|
|
@ -995,6 +995,16 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
/* add Inp_Path to sourcepath variable */
|
||||||
|
char *p;
|
||||||
|
if ((p = strstr(buffer, "sourcepath"))) {
|
||||||
|
if ((p = strchr(buffer, ')'))) {
|
||||||
|
*p = 0; // clear ) and insert Inp_Path in between
|
||||||
|
p = tprintf("%s %s ) %s", buffer, Inp_Path ? Inp_Path : "", p + 1);
|
||||||
|
tfree(buffer);
|
||||||
|
buffer = p;
|
||||||
|
}
|
||||||
|
}
|
||||||
/* exclude commands listed above to preserve filename case */
|
/* exclude commands listed above to preserve filename case */
|
||||||
for (s = buffer; *s && (*s != '\n'); s++)
|
for (s = buffer; *s && (*s != '\n'); s++)
|
||||||
;
|
;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue