diff --git a/ChangeLog b/ChangeLog index 0cb278326..3d3ac0ef0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,16 @@ +2010-07-03 Robert Larice + * src/include/cktdefs.h , + * src/include/gendefs.h , + * src/include/graph.h , + * src/include/ifsim.h , + * src/include/inpdefs.h , + * src/include/tfdefs.h : + forward declaration of structs, unions and typedefs + 2010-07-02 Robert Larice * src/spicelib/analysis/cktsens.c , * src/xspice/mif/mifload.c : - ansi style function args for some function pointers + ansi style function args for some function pointers 2010-07-02 Holger Vogt * src/frontend/inpcom.c : .TITLE line added diff --git a/src/include/cktdefs.h b/src/include/cktdefs.h index 9526e70e5..ccfaa8a8f 100644 --- a/src/include/cktdefs.h +++ b/src/include/cktdefs.h @@ -30,8 +30,10 @@ extern int DEVmaxnum; /* Not sure if still used */ #include "pzdefs.h" #include "noisedef.h" +typedef struct CKTnode CKTnode; +typedef struct CKTcircuit CKTcircuit; -typedef struct sCKTnode { +struct CKTnode { IFuid name; int type; @@ -44,10 +46,10 @@ typedef struct sCKTnode { double ic; /* Value of the initial condition */ double nodeset; /* Value of the .nodeset option */ double *ptr; /* ??? */ - struct sCKTnode *next; /* pointer to the next node */ + CKTnode *next; /* pointer to the next node */ unsigned int icGiven:1; /* FLAG ic given */ unsigned int nsGiven:1; /* FLAG nodeset given */ -} CKTnode; +}; /* defines for node parameters */ #define PARM_NS 1 @@ -56,7 +58,7 @@ typedef struct sCKTnode { -typedef struct { +struct CKTcircuit { /* gtri - begin - wbk - change declaration to allow dynamic sizing */ @@ -261,7 +263,7 @@ typedef struct { #endif /* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */ -} CKTcircuit; +}; /* Now function prottypes */ diff --git a/src/include/gendefs.h b/src/include/gendefs.h index 9e9c3c486..595b3b0fb 100644 --- a/src/include/gendefs.h +++ b/src/include/gendefs.h @@ -8,13 +8,17 @@ Author: 1985 Thomas L. Quarles #include "ifsim.h" +typedef struct GENinstance GENinstance ; +typedef struct GENmodel GENmodel; + + /* definitions used to describe generic devices */ /* information used to describe a single instance */ -typedef struct sGENinstance { - struct sGENmodel *GENmodPtr; /* backpointer to model */ - struct sGENinstance *GENnextInstance; /* pointer to next instance of +struct GENinstance { + GENmodel *GENmodPtr; /* backpointer to model */ + GENinstance *GENnextInstance; /* pointer to next instance of * current model*/ IFuid GENname; /* pointer to character string naming this instance */ int GENowner; /* number of owner process */ @@ -26,7 +30,7 @@ typedef struct sGENinstance { int GENnode5; /* appropriate node numbers */ int GENnode6; /* added to create body node 01/06/99 */ int GENnode7; /* added to create temp node 2/03/99 */ -} GENinstance ; +}; /* Generic circuit data */ @@ -35,13 +39,13 @@ typedef void GENcircuit; /* per model data */ -typedef struct sGENmodel { /* model structure for a resistor */ +struct GENmodel { /* model structure for a resistor */ int GENmodType; /* type index of this device type */ - struct sGENmodel *GENnextModel; /* pointer to next possible model in + GENmodel *GENnextModel; /* pointer to next possible model in * linked list */ GENinstance * GENinstances; /* pointer to list of instances that have this * model */ IFuid GENmodName; /* pointer to character string naming this model */ -} GENmodel; +}; #endif /*GEN*/ diff --git a/src/include/graph.h b/src/include/graph.h index 6b4ad4bfa..1f5da50ee 100644 --- a/src/include/graph.h +++ b/src/include/graph.h @@ -14,11 +14,15 @@ Author: 1988 Jeffrey M. Hsu #include "plot.h" #include "dvec.h" /* for struct dvec */ +typedef struct graph GRAPH; +struct _keyed; + + /* Device-independent data structure for plots. */ #define NUMCOLORS 20 -typedef struct graph { +struct graph { int graphid; struct dveclist *plotdata; /* normalized data */ char *plotname; /* name of plot this graph is in */ @@ -114,12 +118,7 @@ typedef struct graph { /* characters the user typed on graph */ /* note: think up better names */ - struct _keyed { - char *text; - int x, y; - int colorindex; /* index into colors array */ - struct _keyed *next; - } *keyed; + struct _keyed *keyed; /* for zoomin */ char *commandline; @@ -129,7 +128,19 @@ typedef struct graph { */ char *devdep; -} GRAPH; +}; + + +/* characters the user typed on graph */ +/* note: think up better names */ + +struct _keyed { + char *text; + int x, y; + int colorindex; /* index into colors array */ + struct _keyed *next; +}; + #define NEWGRAPH (GRAPH *) tmalloc(sizeof(GRAPH)) diff --git a/src/include/ifsim.h b/src/include/ifsim.h index 48734e2b1..235b1734c 100644 --- a/src/include/ifsim.h +++ b/src/include/ifsim.h @@ -14,6 +14,16 @@ Author: 1986 Thomas L. Quarles /* gtri - end - wbk - 10/11/90 */ +typedef struct IFparm IFparm; +typedef union IFvalue IFvalue; +typedef struct IFparseTree IFparseTree; +typedef struct IFcomplex IFcomplex; +typedef struct IFdevice IFdevice; +typedef struct IFanalysis IFanalysis; +typedef struct IFsimulator IFsimulator; +typedef struct IFfrontEnd IFfrontEnd; + + /* * structure: IFparm * @@ -38,12 +48,12 @@ Author: 1986 Thomas L. Quarles * used for. */ -typedef struct sIFparm { +struct IFparm { char *keyword; int id; int dataType; char *description; -} IFparm; +}; /* * @@ -156,16 +166,16 @@ typedef char *IFuid; * */ -typedef struct sIFparseTree { +struct IFparseTree { int numVars; /* number of variables used */ int *varTypes; /* array of types of variables */ - union uIFvalue * vars; /* array of structures describing values */ + IFvalue * vars; /* array of structures describing values */ #ifdef __STDC__ - int ((*IFeval)(struct sIFparseTree*,double,double*,double*,double*)); + int ((*IFeval)(IFparseTree*,double,double*,double*,double*)); #else int ((*IFeval)()); /* function to call to get evaluated */ #endif /* STDC */ -} IFparseTree; +}; /* @@ -217,13 +227,13 @@ typedef void * IFnode; /* * and of course, the standard complex data type */ -typedef struct sIFcomplex { +struct IFcomplex { double real; double imag; -} IFcomplex; +}; -typedef union uIFvalue { +union IFvalue { int iValue; /* integer or flag valued data */ double rValue; /* real valued data */ IFcomplex cValue; /* complex valued data */ @@ -242,7 +252,7 @@ typedef union uIFvalue { IFnode *nVec; /* pointer to node vector */ }vec; }v; -} IFvalue; +}; /* @@ -261,7 +271,7 @@ typedef union uIFvalue { * */ -typedef struct sIFdevice { +struct IFdevice { char *name; /* name of this type of device */ char *description; /* description of this type of device */ @@ -293,7 +303,7 @@ typedef struct sIFdevice { #endif int flags; /* DEV_ */ -} IFdevice; +}; /* @@ -310,14 +320,14 @@ typedef struct sIFdevice { * */ -typedef struct sIFanalysis { +struct IFanalysis { char *name; /* name of this analysis type */ char *description; /* description of this type of analysis */ int numParms; /* number of analysis parameter descriptors */ IFparm *analysisParms; /* array of analysis parameter descriptors */ -} IFanalysis; +}; /* @@ -331,7 +341,7 @@ typedef struct sIFanalysis { * */ -typedef struct sIFsimulator { +struct IFsimulator { char *simulator; /* the simulator's name */ char *description; /* description of this simulator */ char *version; /* version or revision level of simulator*/ @@ -410,7 +420,7 @@ typedef struct sIFsimulator { int numSpecSigs; /* number of special signals legal in parse trees */ char **specSigs; /* names of special signals legal in parse trees */ -} IFsimulator; +}; /* * Structure: IFfrontEnd @@ -422,7 +432,7 @@ typedef struct sIFsimulator { * */ -typedef struct sIFfrontEnd { +struct IFfrontEnd { int ((*IFnewUid)(void*,IFuid*,IFuid,char*,int,void**)); /* create a new UID in the circuit */ int ((*IFdelUid)(void*,IFuid,int)); @@ -455,7 +465,7 @@ typedef struct sIFfrontEnd { /* end nested domain */ int ((*OUTattributes)(void *,IFuid,int,IFvalue*)); /* specify output attributes of node */ -} IFfrontEnd; +}; /* flags for the first argument to IFerror */ #define ERR_WARNING 0x1 diff --git a/src/include/inpdefs.h b/src/include/inpdefs.h index 107e8f73b..418ef2531 100644 --- a/src/include/inpdefs.h +++ b/src/include/inpdefs.h @@ -13,6 +13,11 @@ Modified: 2000 AlansFixes #include "gendefs.h" #include "inpptree.h" +typedef struct INPtables INPtables; +typedef struct card card; +typedef struct INPmodel INPmodel; + + struct INPtab { char *t_ent; struct INPtab *t_next; @@ -24,7 +29,7 @@ struct INPnTab { struct INPnTab *t_next; }; -typedef struct sINPtables{ +struct INPtables{ struct INPtab **INPsymtab; struct INPnTab **INPtermsymtab; int INPsize; @@ -54,26 +59,26 @@ typedef struct sINPtables{ void *defWmod; void *defYmod; void *defZmod; -} INPtables; +}; -typedef struct card{ +struct card{ int linenum; int linenum_orig; char *line; char *error; - struct card *nextcard; - struct card *actualLine; -} card; + card *nextcard; + card *actualLine; +}; /* structure used to save models in after they are read during pass 1 */ -typedef struct sINPmodel{ +struct INPmodel{ IFuid INPmodName; /* uid of model */ int INPmodType; /* type index of device type */ - struct sINPmodel *INPnextModel; /* link to next model */ + INPmodel *INPnextModel; /* link to next model */ int INPmodUsed; /* flag to indicate it has already been used */ card *INPmodLine; /* pointer to line describing model */ void *INPmodfast; /* high speed pointer to model for access */ -} INPmodel; +}; diff --git a/src/include/tfdefs.h b/src/include/tfdefs.h index 4b05876df..3f4e7a5fc 100644 --- a/src/include/tfdefs.h +++ b/src/include/tfdefs.h @@ -10,9 +10,12 @@ Author: 1985 Thomas L. Quarles #include "tskdefs.h" #include "cktdefs.h" +typedef struct TFan TFan; + + /* TFdefs.h - defs for transfer function analyses */ -typedef struct { +struct TFan { int JOBtype; JOB *JOBnextJob; IFuid JOBname; @@ -25,7 +28,7 @@ typedef struct { unsigned int TFoutIsI :1; unsigned int TFinIsV :1; unsigned int TFinIsI :1; -} TFan; +}; #define TF_OUTPOS 1 #define TF_OUTNEG 2