ngspice/mifparse.h, ngspice/mifcmdat.t, reduce scope of these include files
This commit is contained in:
parent
97cc400efb
commit
af93d79675
|
|
@ -11,8 +11,7 @@ Author: 1986 Thomas L. Quarles
|
|||
|
||||
/* gtri - add - wbk - 10/11/90 - for structs referenced in IFdevice */
|
||||
#ifdef XSPICE
|
||||
#include "ngspice/mifparse.h"
|
||||
#include "ngspice/mifcmdat.h"
|
||||
#include "ngspice/miftypes.h"
|
||||
#endif
|
||||
/* gtri - end - wbk - 10/11/90 */
|
||||
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ typedef struct Mif_Inst_Var_Data_s {
|
|||
* The top level data structure passed to code models.
|
||||
*/
|
||||
|
||||
typedef struct Mif_Private_s {
|
||||
struct Mif_Private {
|
||||
|
||||
Mif_Circ_Data_t circuit; /* Information about the circuit */
|
||||
int num_conn; /* Number of connections on this model */
|
||||
|
|
@ -367,7 +367,7 @@ typedef struct Mif_Private_s {
|
|||
int num_inst_var; /* Number of instance variables */
|
||||
Mif_Inst_Var_Data_t **inst_var; /* Information about each inst variable */
|
||||
|
||||
} Mif_Private_t;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -47,12 +47,30 @@ NON-STANDARD FEATURES
|
|||
#include "ngspice/miftypes.h"
|
||||
|
||||
|
||||
/*
|
||||
* Values of different types used by the parser. Note that this is a structure
|
||||
* instead of a union because we need to do initializations in the ifspec.c files for
|
||||
* the models and unions cannot be initialized in any useful way in C
|
||||
*
|
||||
*/
|
||||
|
||||
struct Mif_Parse_Value {
|
||||
|
||||
Mif_Boolean_t bvalue; /* For boolean values */
|
||||
int ivalue; /* For integer values */
|
||||
double rvalue; /* For real values */
|
||||
Mif_Complex_t cvalue; /* For complex values */
|
||||
char *svalue; /* For string values */
|
||||
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Information about a connection used by the parser to error check input
|
||||
*/
|
||||
|
||||
|
||||
typedef struct Mif_Conn_Info_s {
|
||||
struct Mif_Conn_Info {
|
||||
|
||||
char *name; /* Name of this connection */
|
||||
char *description; /* Description of this connection */
|
||||
|
|
@ -69,7 +87,7 @@ typedef struct Mif_Conn_Info_s {
|
|||
int upper_bound; /* Array size upper bound */
|
||||
Mif_Boolean_t null_allowed; /* True if null is allowed for this connection */
|
||||
|
||||
} Mif_Conn_Info_t;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
@ -78,7 +96,7 @@ typedef struct Mif_Conn_Info_s {
|
|||
* Information about a parameter used by the parser to error check input
|
||||
*/
|
||||
|
||||
typedef struct Mif_Param_Info_s {
|
||||
struct Mif_Param_Info {
|
||||
|
||||
char *name; /* Name of this parameter */
|
||||
char *description; /* Description of this parameter */
|
||||
|
|
@ -98,7 +116,7 @@ typedef struct Mif_Param_Info_s {
|
|||
int upper_bound; /* Array size upper bound */
|
||||
Mif_Boolean_t null_allowed; /* True if null is allowed for this parameter */
|
||||
|
||||
} Mif_Param_Info_t;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
|
@ -107,14 +125,14 @@ typedef struct Mif_Param_Info_s {
|
|||
* Information about an instance parameter used by the parser to error check input
|
||||
*/
|
||||
|
||||
typedef struct Mif_Inst_Var_Info_s {
|
||||
struct Mif_Inst_Var_Info {
|
||||
|
||||
char *name; /* Name of this instance var */
|
||||
char *description; /* Description of this instance var */
|
||||
Mif_Data_Type_t type; /* Is this a real, boolean, string, ... */
|
||||
Mif_Boolean_t is_array; /* True if instance var is an array */
|
||||
|
||||
} Mif_Inst_Var_Info_t;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -205,23 +205,14 @@ typedef union {
|
|||
|
||||
|
||||
|
||||
/* types from mifparse.h */
|
||||
typedef struct Mif_Parse_Value Mif_Parse_Value_t;
|
||||
typedef struct Mif_Conn_Info Mif_Conn_Info_t;
|
||||
typedef struct Mif_Param_Info Mif_Param_Info_t;
|
||||
typedef struct Mif_Inst_Var_Info Mif_Inst_Var_Info_t;
|
||||
|
||||
/*
|
||||
* Values of different types used by the parser. Note that this is a structure
|
||||
* instead of a union because we need to do initializations in the ifspec.c files for
|
||||
* the models and unions cannot be initialized in any useful way in C
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
|
||||
Mif_Boolean_t bvalue; /* For boolean values */
|
||||
int ivalue; /* For integer values */
|
||||
double rvalue; /* For real values */
|
||||
Mif_Complex_t cvalue; /* For complex values */
|
||||
char *svalue; /* For string values */
|
||||
|
||||
} Mif_Parse_Value_t;
|
||||
/* types from mifcmdat.h */
|
||||
typedef struct Mif_Private Mif_Private_t;
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -45,6 +45,10 @@ NON-STANDARD FEATURES
|
|||
#include "ngspice/mifproto.h"
|
||||
#include "ngspice/mifdefs.h"
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#include "ngspice/mifparse.h"
|
||||
#endif
|
||||
|
||||
#include "ngspice/suffix.h"
|
||||
|
||||
#include "ngspice/devdefs.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue