From baef6f49570c15c18c1bf19ecf5124df314ffdb5 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 2 Aug 2026 15:46:17 +0200 Subject: [PATCH] make the path for fopen more flexible, add e.g. the contents of the 'sourcepath' variable. --- src/spicelib/devices/nport/nportread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/spicelib/devices/nport/nportread.c b/src/spicelib/devices/nport/nportread.c index 348a3b87c..7bc4b878b 100644 --- a/src/spicelib/devices/nport/nportread.c +++ b/src/spicelib/devices/nport/nportread.c @@ -32,6 +32,8 @@ keyword. All numeric fields are plain doubles. #include #include +#include "ngspice/fteext.h" + /* token reader: skips '#'-to-EOL comments; returns 1 on a token, 0 on EOF */ static int nport_tok(FILE *f, char *buf, int cap) @@ -79,7 +81,7 @@ snp_nport_read(const char *path, double **presRe, double **presIm, char *err, int errlen) { - FILE *f = fopen(path, "r"); + FILE *f = inp_pathopen(path, "r"); int N = 0, Np = -1, ver = 0, i, got_hdr = 0; double *poleRe = NULL, *poleIm = NULL, *d = NULL, *e = NULL; double *resRe = NULL, *resIm = NULL;