new include file "typedefs.h" for struct forward declarations

This commit is contained in:
rlar 2010-07-06 18:58:15 +00:00
parent 8496ba3f91
commit a57a381ea7
9 changed files with 64 additions and 16 deletions

View File

@ -1,3 +1,15 @@
2010-07-06 Robert Larice
* src/include/typedefs.h :
new include file for struct forward declarations and for typedefs
* src/include/cktdefs.h ,
* src/include/gendefs.h ,
* src/include/graph.h ,
* src/include/ifsim.h ,
* src/include/mifcmdat.h ,
* src/include/ngspice.h ,
* src/include/tfdefs.h :
make use of the new include file.
2010-07-06 Holger Vogt 2010-07-06 Holger Vogt
* defines.h: void fcn prototype instead of sighandler_t * defines.h: void fcn prototype instead of sighandler_t
for MINGW, CYGWIN and MSC for MINGW, CYGWIN and MSC

View File

@ -7,6 +7,9 @@
#ifndef CKT #ifndef CKT
#define CKT "CKTdefs.h $Revision$ on $Date$ " #define CKT "CKTdefs.h $Revision$ on $Date$ "
#include "typedefs.h"
/* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */ /* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */
#ifdef XSPICE #ifdef XSPICE
#include "evt.h" #include "evt.h"
@ -30,8 +33,6 @@ extern int DEVmaxnum; /* Not sure if still used */
#include "pzdefs.h" #include "pzdefs.h"
#include "noisedef.h" #include "noisedef.h"
typedef struct CKTnode CKTnode;
typedef struct CKTcircuit CKTcircuit;
struct CKTnode { struct CKTnode {

View File

@ -6,10 +6,9 @@ Author: 1985 Thomas L. Quarles
#ifndef GEN #ifndef GEN
#define GEN #define GEN
#include "typedefs.h"
#include "ifsim.h" #include "ifsim.h"
typedef struct GENinstance GENinstance ;
typedef struct GENmodel GENmodel;
/* definitions used to describe generic devices */ /* definitions used to describe generic devices */

View File

@ -10,11 +10,11 @@ Author: 1988 Jeffrey M. Hsu
#ifndef _GRAPH_H #ifndef _GRAPH_H
#define _GRAPH_H #define _GRAPH_H
#include "typedefs.h"
#include "grid.h" #include "grid.h"
#include "plot.h" #include "plot.h"
#include "dvec.h" /* for struct dvec */ #include "dvec.h" /* for struct dvec */
typedef struct graph GRAPH;
struct _keyed; struct _keyed;

View File

@ -6,6 +6,9 @@ Author: 1986 Thomas L. Quarles
#ifndef IFSIMULATOR #ifndef IFSIMULATOR
#define IFSIMULATOR #define IFSIMULATOR
#include "typedefs.h"
/* gtri - add - wbk - 10/11/90 - for structs referenced in IFdevice */ /* gtri - add - wbk - 10/11/90 - for structs referenced in IFdevice */
#ifdef XSPICE #ifdef XSPICE
#include "mifparse.h" #include "mifparse.h"
@ -14,14 +17,6 @@ Author: 1986 Thomas L. Quarles
/* gtri - end - wbk - 10/11/90 */ /* 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;
/* /*
@ -66,7 +61,9 @@ struct IFparm {
* *
*/ */
typedef char *IFuid; /* moved to "typedefs.h"
* typedef char *IFuid;
*/
/* /*

View File

@ -45,6 +45,7 @@ NON-STANDARD FEATURES
=========================================================================== */ =========================================================================== */
#include "typedefs.h"
#include "miftypes.h" #include "miftypes.h"

View File

@ -32,6 +32,7 @@
#include "macros.h" #include "macros.h"
#include "bool.h" #include "bool.h"
#include "complex.h" #include "complex.h"
#include "typedefs.h"
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>

View File

@ -6,12 +6,11 @@ Author: 1985 Thomas L. Quarles
#ifndef TF #ifndef TF
#define TF #define TF
#include "typedefs.h"
#include "jobdefs.h" #include "jobdefs.h"
#include "tskdefs.h" #include "tskdefs.h"
#include "cktdefs.h" #include "cktdefs.h"
typedef struct TFan TFan;
/* TFdefs.h - defs for transfer function analyses */ /* TFdefs.h - defs for transfer function analyses */

38
src/include/typedefs.h Normal file
View File

@ -0,0 +1,38 @@
/*
* forward declaration of important structs
* and central typedefs which are not allowed to be repeated
*/
#ifndef TYPEDEFS_H_INCLUDED
#define TYPEDEFS_H_INCLUDED
typedef struct CKTcircuit CKTcircuit;
typedef struct CKTnode CKTnode;
typedef struct GENinstance GENinstance;
typedef struct GENmodel GENmodel;
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;
typedef char *IFuid;
typedef struct TFan TFan;
typedef struct graph GRAPH;
struct dbcomm;
#endif