diff --git a/src/frontend/inp.c b/src/frontend/inp.c index 3a581c40a..7a3ab692f 100644 --- a/src/frontend/inp.c +++ b/src/frontend/inp.c @@ -15,10 +15,18 @@ $Id$ * the listing routines. */ -#ifdef HAVE_LIBGEN_H /* dirname() */ -#include -#endif #include "ngspice.h" + +#ifdef HAVE_LIBGEN_H /* dirname */ +#include +#define HAVE_DECL_BASENAME 1 +#endif + +#ifdef HAVE_LIBIBERTY_H /* asprintf etc. */ +#include +#undef AND /* obsolete macro in ansidecl.h */ +#endif + #include "cpdefs.h" #include "inpdefs.h" #include "ftedefs.h" diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 895abfe81..64298e34b 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -30,17 +30,23 @@ Author: 1985 Wayne A. Christopher * Fixed crash where a NULL pointer gets freed in inp_readall() */ -#ifdef HAVE_LIBGEN_H /* dirname() */ -#include -#endif -#include #include "ngspice.h" + +#ifdef HAVE_LIBGEN_H /* dirname */ +#include +#define HAVE_DECL_BASENAME 1 +#endif + +#ifdef HAVE_LIBIBERTY_H /* asprintf etc. */ +#include +#undef AND /* obsolete macro in ansidecl.h */ +#endif + #include "cpdefs.h" #include "ftedefs.h" #include "dvec.h" #include "fteinp.h" - #include "inpcom.h" #include "variable.h" @@ -54,6 +60,22 @@ Author: 1985 Wayne A. Christopher /* SJB - Uncomment this line for debug tracing */ /*#define TRACE*/ +/* globals -- wanted to avoid complicating inp_readall interface */ +static char *library_file[1000]; +static char *library_name[1000][1000]; +struct line *library_ll_ptr[1000][1000]; +struct line *libraries[1000]; +int num_libraries; +int num_lib_names[1000]; +static char *global; +static char *subckt_w_params[1000]; +static int num_subckt_w_params; +static char *func_names[1000]; +static char *func_params[1000][1000]; +static char *func_macro[5000]; +static int num_functions; +static int num_parameters[1000]; + /* static declarations */ static char * readline(FILE *fd); static bool is_arith_char(char c);