From ab607102e68f936bfd3a1e3c5a76507fac087bdd Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 2 Jun 2013 17:15:51 +0200 Subject: [PATCH] inpcom.c, cleanup inp_readall() #2/7, move inp_read() prolog to inp_readall() --- src/frontend/inpcom.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 17b80e38b..61287dcc8 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -464,6 +464,9 @@ inp_readall(FILE *fp, char *dir_name, bool comfile, bool intfile) int call_depth = 0; struct line *cc; + num_libraries = 0; + inp_compat_mode = ngspice_compat_mode(); + cc = inp_read(fp, call_depth, dir_name, comfile, intfile); return cc; @@ -493,11 +496,6 @@ inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile) bool found_end = FALSE, shell_eol_continuation = FALSE; - if (call_depth == 0) { - num_libraries = 0; - inp_compat_mode = ngspice_compat_mode(); - } - /* First read in all lines & put them in the struct cc */ for (;;) { /* derive lines from circarray */