From 8ff62fd262785a87c0d71bbaba9f7439d45475c4 Mon Sep 17 00:00:00 2001 From: rlar Date: Fri, 30 Jul 2010 16:09:38 +0000 Subject: [PATCH] add #include's for visibility of prototypes to their function definitions move some typedefs to "typedef.h" --- ChangeLog | 21 +++++++++++++++++++++ src/frontend/com_dl.c | 1 + src/frontend/com_help.c | 1 + src/frontend/com_set.c | 1 + src/frontend/com_sysinfo.c | 1 + src/frontend/hcomp.c | 1 + src/frontend/parse.h | 1 + src/include/pzdefs.h | 11 ++++++----- src/include/sen2defs.h | 5 +++-- src/include/typedefs.h | 7 +++++++ src/main.c | 2 ++ src/maths/misc/accuracy.c | 1 + src/maths/misc/bernoull.c | 1 + src/maths/misc/norm.c | 1 + src/ngsconvert.c | 1 + src/spicelib/analysis/cktdelt.c | 1 + src/spicelib/devices/limit.c | 2 ++ src/xspice/evt/evtaccept.c | 1 + 18 files changed, 53 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0997228c8..4d601205f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2010-07-30 Robert Larice + * src/frontend/com_dl.c , + * src/frontend/com_help.c , + * src/frontend/com_set.c , + * src/frontend/com_sysinfo.c , + * src/frontend/hcomp.c , + * src/frontend/parse.h , + * src/include/pzdefs.h , + * src/include/sen2defs.h , + * src/include/typedefs.h , + * src/main.c , + * src/maths/misc/accuracy.c , + * src/maths/misc/bernoull.c , + * src/maths/misc/norm.c , + * src/ngsconvert.c , + * src/spicelib/analysis/cktdelt.c , + * src/spicelib/devices/limit.c , + * src/xspice/evt/evtaccept.c : + add #include's for visibility of prototypes to their function definitions + move some typedefs to "typedef.h" + 2010-07-30 Robert Larice * src/include/ifsim.h , * src/include/inpptree.h , diff --git a/src/frontend/com_dl.c b/src/frontend/com_dl.c index b219393d5..44abd94c1 100755 --- a/src/frontend/com_dl.c +++ b/src/frontend/com_dl.c @@ -2,6 +2,7 @@ #include "ftedefs.h" #include /* solve deps in dev.h*/ #include <../spicelib/devices/dev.h> /*for load library commands*/ +#include "com_dl.h" #ifdef XSPICE void com_codemodel(wordlist *wl){ diff --git a/src/frontend/com_help.c b/src/frontend/com_help.c index f341afd03..eeb9977f9 100644 --- a/src/frontend/com_help.c +++ b/src/frontend/com_help.c @@ -7,6 +7,7 @@ #include #include "hcomp.h" +#include "com_help.h" void diff --git a/src/frontend/com_set.c b/src/frontend/com_set.c index ccf6c970f..f7d9f2a29 100644 --- a/src/frontend/com_set.c +++ b/src/frontend/com_set.c @@ -5,6 +5,7 @@ #include #include "variable.h" +#include "com_set.h" /* The set command. Syntax is set [opt ...] [opt = val ...]. Val may diff --git a/src/frontend/com_sysinfo.c b/src/frontend/com_sysinfo.c index 19b4b0a91..54dede1c0 100644 --- a/src/frontend/com_sysinfo.c +++ b/src/frontend/com_sysinfo.c @@ -11,6 +11,7 @@ #include "config.h" #include "ngspice.h" #include "cpdefs.h" +#include "fteext.h" /* We might compile for Windows, but only as a console application (e.g. tcl) */ #if defined(HAS_WINDOWS) || defined(__MINGW32__) || defined(_MSC_VER) diff --git a/src/frontend/hcomp.c b/src/frontend/hcomp.c index 6319fc7a5..cfe519b3d 100644 --- a/src/frontend/hcomp.c +++ b/src/frontend/hcomp.c @@ -1,5 +1,6 @@ #include #include +#include "fteext.h" int hcomp(const void *a, const void *b) diff --git a/src/frontend/parse.h b/src/frontend/parse.h index 44aa3a544..17e1b33c2 100644 --- a/src/frontend/parse.h +++ b/src/frontend/parse.h @@ -16,5 +16,6 @@ struct pnode * ft_getpnames(wordlist *wl, bool check); #endif void free_pnode_x(struct pnode *t); +void free_pnode_o(struct pnode *t); #endif diff --git a/src/include/pzdefs.h b/src/include/pzdefs.h index 591b0e840..1e7fc16ca 100644 --- a/src/include/pzdefs.h +++ b/src/include/pzdefs.h @@ -6,18 +6,19 @@ #include "jobdefs.h" #include #include "complex.h" +#include "typedefs.h" -typedef struct strial { +struct PZtrial { SPcomplex s, f_raw, f_def; - struct strial *next, *prev; + PZtrial *next, *prev; int mag_raw, mag_def; int multiplicity; int flags; int seq_num; int count; -} PZtrial; +}; -typedef struct { +struct PZAN { int JOBtype; JOB *JOBnextJob; IFuid JOBname; @@ -36,7 +37,7 @@ typedef struct { int PZnZeros; double *PZdrive_pptr; double *PZdrive_nptr; -} PZAN; +}; #define PZ_DO_POLES 0x1 #define PZ_DO_ZEROS 0x2 diff --git a/src/include/sen2defs.h b/src/include/sen2defs.h index 8cf755ac5..3b8f85025 100644 --- a/src/include/sen2defs.h +++ b/src/include/sen2defs.h @@ -11,8 +11,9 @@ Copyright 1990 Regents of the University of California. All rights reserved. #include "smpdefs.h" #include "jobdefs.h" +#include "typedefs.h" -typedef struct { +struct SENstruct { int JOBtype; JOB *JOBnextJob; /* pointer to next thing to do */ char *JOBname; /* name of this job */ @@ -47,7 +48,7 @@ typedef struct { double *SEN_parmVal; /* table containing values of design parameters */ char **SEN_parmName; /* table containing names of design parameters */ -} SENstruct; +}; /* SENmode */ #define DCSEN 0x1 diff --git a/src/include/typedefs.h b/src/include/typedefs.h index 2f49c46bb..3d89ac034 100644 --- a/src/include/typedefs.h +++ b/src/include/typedefs.h @@ -35,4 +35,11 @@ typedef struct graph GRAPH; struct dbcomm; +typedef struct PZtrial PZtrial; +typedef struct PZAN PZAN; + + +typedef struct SENstruct SENstruct; + + #endif diff --git a/src/main.c b/src/main.c index 4e76dc953..40978172e 100644 --- a/src/main.c +++ b/src/main.c @@ -67,6 +67,8 @@ extern int rl_catch_signals; /* missing from editline/readline.h */ #include "maths/misc/accuracy.h" #endif +#include "mifproto.h" +#include "evtproto.h" #if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) char history_file[512] = {'\0'}; diff --git a/src/maths/misc/accuracy.c b/src/maths/misc/accuracy.c index a408c0f6f..fec3ea719 100644 --- a/src/maths/misc/accuracy.c +++ b/src/maths/misc/accuracy.c @@ -5,6 +5,7 @@ Modified: 2001 Paolo Nenzi **********/ #include "ngspice.h" +#include "accuracy.h" /* XXX Globals are hiding here. diff --git a/src/maths/misc/bernoull.c b/src/maths/misc/bernoull.c index 4cf74b475..43d4d9b21 100644 --- a/src/maths/misc/bernoull.c +++ b/src/maths/misc/bernoull.c @@ -5,6 +5,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group #include "ngspice.h" #include "accuracy.h" +#include "bernoull.h" /* * this function computes the bernoulli function diff --git a/src/maths/misc/norm.c b/src/maths/misc/norm.c index 6a9576f67..2b093fe78 100644 --- a/src/maths/misc/norm.c +++ b/src/maths/misc/norm.c @@ -4,6 +4,7 @@ Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice.h" +#include "norm.h" /* functions to compute max and one norms of a given vector of doubles */ diff --git a/src/ngsconvert.c b/src/ngsconvert.c index 0c86db8b0..ed3902c91 100644 --- a/src/ngsconvert.c +++ b/src/ngsconvert.c @@ -15,6 +15,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group #include #include #include "suffix.h" +#include "frontend/display.h" FILE *cp_in = NULL; FILE *cp_out = NULL; diff --git a/src/spicelib/analysis/cktdelt.c b/src/spicelib/analysis/cktdelt.c index 3ce97ee80..ae9997a51 100644 --- a/src/spicelib/analysis/cktdelt.c +++ b/src/spicelib/analysis/cktdelt.c @@ -8,6 +8,7 @@ Author: 1985 Thomas L. Quarles #include "jobdefs.h" #include "ifsim.h" #include "iferrmsg.h" +#include "ckt.h" /* ARGSUSED */ diff --git a/src/spicelib/devices/limit.c b/src/spicelib/devices/limit.c index 54c5a0b68..8751def09 100644 --- a/src/spicelib/devices/limit.c +++ b/src/spicelib/devices/limit.c @@ -3,6 +3,8 @@ Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ +#include "devdefs.h" + /* limiting routines for junction voltages */ double DvRevMax = 0.5, DvFwdMax = 50.0e-3; diff --git a/src/xspice/evt/evtaccept.c b/src/xspice/evt/evtaccept.c index 16973ed44..c8076c3e7 100755 --- a/src/xspice/evt/evtaccept.c +++ b/src/xspice/evt/evtaccept.c @@ -46,6 +46,7 @@ NON-STANDARD FEATURES #include "mif.h" #include "evt.h" +#include "evtproto.h"