ReactOS  0.4.14-dev-98-gb0d4763
widltypes.h File Reference
#include <stdarg.h>
#include <assert.h>
#include "guiddef.h"
#include "ndrtypes.h"
#include "wine/list.h"
Include dependency graph for widltypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _loc_info_t
 
struct  str_list_entry_t
 
struct  _attr_t
 
struct  _expr_t
 
struct  struct_details
 
struct  enumeration_details
 
struct  func_details
 
struct  iface_details
 
struct  module_details
 
struct  array_details
 
struct  coclass_details
 
struct  basic_details
 
struct  pointer_details
 
struct  bitfield_details
 
struct  namespace
 
struct  _type_t
 
struct  _var_t
 
struct  _declarator_t
 
struct  _ifref_t
 
struct  _typelib_entry_t
 
struct  _importinfo_t
 
struct  _importlib_t
 
struct  _typelib_t
 
struct  _user_type_t
 
struct  _type_list_t
 
struct  _statement_t
 
struct  _warning_t
 

Macros

#define UUID_DEFINED
 
#define TRUE   1
 
#define FALSE   0
 
#define TYPE_BASIC_MAX   TYPE_BASIC_HANDLE
 
#define TYPE_BASIC_INT_MIN   TYPE_BASIC_INT8
 
#define TYPE_BASIC_INT_MAX   TYPE_BASIC_HYPER
 
#define HASHMAX   64
 
#define tsENUM   1
 
#define tsSTRUCT   2
 
#define tsUNION   3
 
#define STATEMENTS_FOR_EACH_FUNC(stmt, stmts)
 

Typedefs

typedef GUID UUID
 
typedef struct _loc_info_t loc_info_t
 
typedef struct _attr_t attr_t
 
typedef struct _expr_t expr_t
 
typedef struct _type_t type_t
 
typedef struct _var_t var_t
 
typedef struct _declarator_t declarator_t
 
typedef struct _ifref_t ifref_t
 
typedef struct _typelib_entry_t typelib_entry_t
 
typedef struct _importlib_t importlib_t
 
typedef struct _importinfo_t importinfo_t
 
typedef struct _typelib_t typelib_t
 
typedef struct _user_type_t user_type_t
 
typedef struct _user_type_t context_handle_t
 
typedef struct _user_type_t generic_handle_t
 
typedef struct _type_list_t type_list_t
 
typedef struct _statement_t statement_t
 
typedef struct _warning_t warning_t
 
typedef struct list attr_list_t
 
typedef struct list str_list_t
 
typedef struct list expr_list_t
 
typedef struct list var_list_t
 
typedef struct list declarator_list_t
 
typedef struct list ifref_list_t
 
typedef struct list user_type_list_t
 
typedef struct list context_handle_list_t
 
typedef struct list generic_handle_list_t
 
typedef struct list statement_list_t
 
typedef struct list warning_list_t
 

Enumerations

enum  attr_type {
  ATTR_AGGREGATABLE, ATTR_ANNOTATION, ATTR_APPOBJECT, ATTR_ASYNC,
  ATTR_ASYNCUUID, ATTR_AUTO_HANDLE, ATTR_BINDABLE, ATTR_BROADCAST,
  ATTR_CALLAS, ATTR_CALLCONV, ATTR_CASE, ATTR_CODE,
  ATTR_COMMSTATUS, ATTR_CONST, ATTR_CONTEXTHANDLE, ATTR_CONTROL,
  ATTR_DECODE, ATTR_DEFAULT, ATTR_DEFAULTBIND, ATTR_DEFAULTCOLLELEM,
  ATTR_DEFAULTVALUE, ATTR_DEFAULTVTABLE, ATTR_DISABLECONSISTENCYCHECK, ATTR_DISPINTERFACE,
  ATTR_DISPLAYBIND, ATTR_DLLNAME, ATTR_DUAL, ATTR_ENABLEALLOCATE,
  ATTR_ENCODE, ATTR_ENDPOINT, ATTR_ENTRY, ATTR_EXPLICIT_HANDLE,
  ATTR_FAULTSTATUS, ATTR_FORCEALLOCATE, ATTR_HANDLE, ATTR_HELPCONTEXT,
  ATTR_HELPFILE, ATTR_HELPSTRING, ATTR_HELPSTRINGCONTEXT, ATTR_HELPSTRINGDLL,
  ATTR_HIDDEN, ATTR_ID, ATTR_IDEMPOTENT, ATTR_IGNORE,
  ATTR_IIDIS, ATTR_IMMEDIATEBIND, ATTR_IMPLICIT_HANDLE, ATTR_IN,
  ATTR_INLINE, ATTR_INPUTSYNC, ATTR_LENGTHIS, ATTR_LIBLCID,
  ATTR_LICENSED, ATTR_LOCAL, ATTR_MAYBE, ATTR_MESSAGE,
  ATTR_NOCODE, ATTR_NONBROWSABLE, ATTR_NONCREATABLE, ATTR_NONEXTENSIBLE,
  ATTR_NOTIFY, ATTR_NOTIFYFLAG, ATTR_OBJECT, ATTR_ODL,
  ATTR_OLEAUTOMATION, ATTR_OPTIMIZE, ATTR_OPTIONAL, ATTR_OUT,
  ATTR_PARAMLCID, ATTR_PARTIALIGNORE, ATTR_POINTERDEFAULT, ATTR_POINTERTYPE,
  ATTR_PROGID, ATTR_PROPGET, ATTR_PROPPUT, ATTR_PROPPUTREF,
  ATTR_PROXY, ATTR_PUBLIC, ATTR_RANGE, ATTR_READONLY,
  ATTR_REPRESENTAS, ATTR_REQUESTEDIT, ATTR_RESTRICTED, ATTR_RETVAL,
  ATTR_SIZEIS, ATTR_SOURCE, ATTR_STRICTCONTEXTHANDLE, ATTR_STRING,
  ATTR_SWITCHIS, ATTR_SWITCHTYPE, ATTR_THREADING, ATTR_TRANSMITAS,
  ATTR_UIDEFAULT, ATTR_USERMARSHAL, ATTR_USESGETLASTERROR, ATTR_UUID,
  ATTR_V1ENUM, ATTR_VARARG, ATTR_VERSION, ATTR_VIPROGID,
  ATTR_WIREMARSHAL
}
 
enum  expr_type {
  EXPR_COMPLEX = 1, EXPR_UNARY = 2, EXPR_PROPVAL = 3, EXPR_SVAL = 4,
  EXPR_IVAL = 5, EXPR_BVAL = 6, EXPR_VOID, EXPR_NUM,
  EXPR_HEXNUM, EXPR_DOUBLE, EXPR_IDENTIFIER, EXPR_NEG,
  EXPR_NOT, EXPR_PPTR, EXPR_CAST, EXPR_SIZEOF,
  EXPR_SHL, EXPR_SHR, EXPR_MUL, EXPR_DIV,
  EXPR_ADD, EXPR_SUB, EXPR_AND, EXPR_OR,
  EXPR_COND, EXPR_TRUEFALSE, EXPR_ADDRESSOF, EXPR_MEMBER,
  EXPR_ARRAY, EXPR_MOD, EXPR_LOGOR, EXPR_LOGAND,
  EXPR_XOR, EXPR_EQUALITY, EXPR_INEQUALITY, EXPR_GTR,
  EXPR_LESS, EXPR_GTREQL, EXPR_LESSEQL, EXPR_LOGNOT,
  EXPR_POS, EXPR_STRLIT, EXPR_WSTRLIT, EXPR_CHARCONST
}
 
enum  type_kind {
  TKIND_PRIMITIVE = -1, TKIND_ENUM, TKIND_RECORD, TKIND_MODULE,
  TKIND_INTERFACE, TKIND_DISPATCH, TKIND_COCLASS, TKIND_ALIAS,
  TKIND_UNION, TKIND_MAX
}
 
enum  storage_class { STG_NONE, STG_STATIC, STG_EXTERN, STG_REGISTER }
 
enum  statement_type {
  STMT_LIBRARY, STMT_DECLARATION, STMT_TYPE, STMT_TYPEREF,
  STMT_MODULE, STMT_TYPEDEF, STMT_IMPORT, STMT_IMPORTLIB,
  STMT_PRAGMA, STMT_CPPQUOTE
}
 
enum  threading_type {
  THREADING_APARTMENT = 1, THREADING_NEUTRAL, THREADING_SINGLE, THREADING_FREE,
  THREADING_BOTH
}
 
enum  type_basic_type {
  TYPE_BASIC_INT8 = 1, TYPE_BASIC_INT16, TYPE_BASIC_INT32, TYPE_BASIC_INT64,
  TYPE_BASIC_INT, TYPE_BASIC_INT3264, TYPE_BASIC_LONG, TYPE_BASIC_CHAR,
  TYPE_BASIC_HYPER, TYPE_BASIC_BYTE, TYPE_BASIC_WCHAR, TYPE_BASIC_FLOAT,
  TYPE_BASIC_DOUBLE, TYPE_BASIC_ERROR_STATUS_T, TYPE_BASIC_HANDLE
}
 
enum  type_type {
  TYPE_VOID, TYPE_BASIC, TYPE_ENUM, TYPE_STRUCT,
  TYPE_ENCAPSULATED_UNION, TYPE_UNION, TYPE_ALIAS, TYPE_MODULE,
  TYPE_COCLASS, TYPE_FUNCTION, TYPE_INTERFACE, TYPE_POINTER,
  TYPE_ARRAY, TYPE_BITFIELD
}
 
enum  syskind_t { SYS_WIN16, SYS_WIN32, SYS_MAC, SYS_WIN64 }
 

Functions

void check_for_additional_prototype_types (const var_list_t *list)
 
void init_types (void)
 
type_talloc_type (void)
 
void set_all_tfswrite (int val)
 
void clear_all_offsets (void)
 
var_tfind_const (const char *name, int f)
 
type_tfind_type (const char *name, struct namespace *namespace, int t)
 
type_tmake_type (enum type_type type)
 
type_tget_type (enum type_type type, char *name, struct namespace *namespace, int t)
 
type_treg_type (type_t *type, const char *name, struct namespace *namespace, int t)
 
void add_incomplete (type_t *t)
 
var_tmake_var (char *name)
 
var_list_tappend_var (var_list_t *list, var_t *var)
 
void init_loc_info (loc_info_t *)
 
charformat_namespace (struct namespace *namespace, const char *prefix, const char *separator, const char *suffix)
 
static var_list_ttype_get_function_args (const type_t *func_type)
 
static enum type_type type_get_type_detect_alias (const type_t *type)
 
static int statements_has_func (const statement_list_t *stmts)
 
static int is_global_namespace (const struct namespace *namespace)
 

Variables

user_type_list_t user_type_list
 
context_handle_list_t context_handle_list
 
generic_handle_list_t generic_handle_list
 

Macro Definition Documentation

◆ FALSE

#define FALSE   0

Definition at line 36 of file widltypes.h.

◆ HASHMAX

#define HASHMAX   64

Definition at line 389 of file widltypes.h.

◆ STATEMENTS_FOR_EACH_FUNC

#define STATEMENTS_FOR_EACH_FUNC (   stmt,
  stmts 
)
Value:
if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, statement_t, entry ) \
if (stmt->type == STMT_DECLARATION && stmt->u.var->stgclass == STG_NONE && \
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static enum type_type type_get_type_detect_alias(const type_t *type)
Definition: widltypes.h:589
uint32_t entry
Definition: isohybrid.c:63

Definition at line 596 of file widltypes.h.

◆ TRUE

#define TRUE   1

Definition at line 35 of file widltypes.h.

◆ tsENUM

#define tsENUM   1

Definition at line 566 of file widltypes.h.

◆ tsSTRUCT

#define tsSTRUCT   2

Definition at line 567 of file widltypes.h.

◆ tsUNION

#define tsUNION   3

Definition at line 568 of file widltypes.h.

◆ TYPE_BASIC_INT_MAX

#define TYPE_BASIC_INT_MAX   TYPE_BASIC_HYPER

Definition at line 281 of file widltypes.h.

◆ TYPE_BASIC_INT_MIN

#define TYPE_BASIC_INT_MIN   TYPE_BASIC_INT8

Definition at line 280 of file widltypes.h.

◆ TYPE_BASIC_MAX

#define TYPE_BASIC_MAX   TYPE_BASIC_HANDLE

Definition at line 279 of file widltypes.h.

◆ UUID_DEFINED

#define UUID_DEFINED

Definition at line 31 of file widltypes.h.

Typedef Documentation

◆ attr_list_t

Definition at line 56 of file widltypes.h.

◆ attr_t

Definition at line 39 of file widltypes.h.

◆ context_handle_list_t

Definition at line 63 of file widltypes.h.

◆ context_handle_t

Definition at line 50 of file widltypes.h.

◆ declarator_list_t

Definition at line 60 of file widltypes.h.

◆ declarator_t

Definition at line 43 of file widltypes.h.

◆ expr_list_t

Definition at line 58 of file widltypes.h.

◆ expr_t

Definition at line 40 of file widltypes.h.

◆ generic_handle_list_t

Definition at line 64 of file widltypes.h.

◆ generic_handle_t

Definition at line 51 of file widltypes.h.

◆ ifref_list_t

Definition at line 61 of file widltypes.h.

◆ ifref_t

Definition at line 44 of file widltypes.h.

◆ importinfo_t

Definition at line 47 of file widltypes.h.

◆ importlib_t

Definition at line 46 of file widltypes.h.

◆ loc_info_t

Definition at line 38 of file widltypes.h.

◆ statement_list_t

Definition at line 65 of file widltypes.h.

◆ statement_t

Definition at line 53 of file widltypes.h.

◆ str_list_t

Definition at line 57 of file widltypes.h.

◆ type_list_t

Definition at line 52 of file widltypes.h.

◆ type_t

Definition at line 41 of file widltypes.h.

◆ typelib_entry_t

Definition at line 45 of file widltypes.h.

◆ typelib_t

Definition at line 48 of file widltypes.h.

◆ user_type_list_t

Definition at line 62 of file widltypes.h.

◆ user_type_t

Definition at line 49 of file widltypes.h.

◆ UUID

typedef GUID UUID

Definition at line 32 of file widltypes.h.

◆ var_list_t

Definition at line 59 of file widltypes.h.

◆ var_t

typedef struct _var_t var_t

Definition at line 42 of file widltypes.h.

◆ warning_list_t

Definition at line 66 of file widltypes.h.

◆ warning_t

Definition at line 54 of file widltypes.h.

Enumeration Type Documentation

◆ attr_type

Enumerator
ATTR_AGGREGATABLE 
ATTR_ANNOTATION 
ATTR_APPOBJECT 
ATTR_ASYNC 
ATTR_ASYNCUUID 
ATTR_AUTO_HANDLE 
ATTR_BINDABLE 
ATTR_BROADCAST 
ATTR_CALLAS 
ATTR_CALLCONV 
ATTR_CASE 
ATTR_CODE 
ATTR_COMMSTATUS 
ATTR_CONST 
ATTR_CONTEXTHANDLE 
ATTR_CONTROL 
ATTR_DECODE 
ATTR_DEFAULT 
ATTR_DEFAULTBIND 
ATTR_DEFAULTCOLLELEM 
ATTR_DEFAULTVALUE 
ATTR_DEFAULTVTABLE 
ATTR_DISABLECONSISTENCYCHECK 
ATTR_DISPINTERFACE 
ATTR_DISPLAYBIND 
ATTR_DLLNAME 
ATTR_DUAL 
ATTR_ENABLEALLOCATE 
ATTR_ENCODE 
ATTR_ENDPOINT 
ATTR_ENTRY 
ATTR_EXPLICIT_HANDLE 
ATTR_FAULTSTATUS 
ATTR_FORCEALLOCATE 
ATTR_HANDLE 
ATTR_HELPCONTEXT 
ATTR_HELPFILE 
ATTR_HELPSTRING 
ATTR_HELPSTRINGCONTEXT 
ATTR_HELPSTRINGDLL 
ATTR_HIDDEN 
ATTR_ID 
ATTR_IDEMPOTENT 
ATTR_IGNORE 
ATTR_IIDIS 
ATTR_IMMEDIATEBIND 
ATTR_IMPLICIT_HANDLE 
ATTR_IN 
ATTR_INLINE 
ATTR_INPUTSYNC 
ATTR_LENGTHIS 
ATTR_LIBLCID 
ATTR_LICENSED 
ATTR_LOCAL 
ATTR_MAYBE 
ATTR_MESSAGE 
ATTR_NOCODE 
ATTR_NONBROWSABLE 
ATTR_NONCREATABLE 
ATTR_NONEXTENSIBLE 
ATTR_NOTIFY 
ATTR_NOTIFYFLAG 
ATTR_OBJECT 
ATTR_ODL 
ATTR_OLEAUTOMATION 
ATTR_OPTIMIZE 
ATTR_OPTIONAL 
ATTR_OUT 
ATTR_PARAMLCID 
ATTR_PARTIALIGNORE 
ATTR_POINTERDEFAULT 
ATTR_POINTERTYPE 
ATTR_PROGID 
ATTR_PROPGET 
ATTR_PROPPUT 
ATTR_PROPPUTREF 
ATTR_PROXY 
ATTR_PUBLIC 
ATTR_RANGE 
ATTR_READONLY 
ATTR_REPRESENTAS 
ATTR_REQUESTEDIT 
ATTR_RESTRICTED 
ATTR_RETVAL 
ATTR_SIZEIS 
ATTR_SOURCE 
ATTR_STRICTCONTEXTHANDLE 
ATTR_STRING 
ATTR_SWITCHIS 
ATTR_SWITCHTYPE 
ATTR_THREADING 
ATTR_TRANSMITAS 
ATTR_UIDEFAULT 
ATTR_USERMARSHAL 
ATTR_USESGETLASTERROR 
ATTR_UUID 
ATTR_V1ENUM 
ATTR_VARARG 
ATTR_VERSION 
ATTR_VIPROGID 
ATTR_WIREMARSHAL 

Definition at line 68 of file widltypes.h.

69 {
73  ATTR_ASYNC,
79  ATTR_CALLCONV, /* calling convention pseudo-attribute */
80  ATTR_CASE,
81  ATTR_CODE,
83  ATTR_CONST, /* const pseudo-attribute */
96  ATTR_DUAL,
100  ATTR_ENTRY,
104  ATTR_HANDLE,
110  ATTR_HIDDEN,
111  ATTR_ID,
113  ATTR_IGNORE,
114  ATTR_IIDIS,
117  ATTR_IN,
118  ATTR_INLINE,
121  ATTR_LIBLCID,
123  ATTR_LOCAL,
124  ATTR_MAYBE,
125  ATTR_MESSAGE,
126  ATTR_NOCODE,
130  ATTR_NOTIFY,
132  ATTR_OBJECT,
133  ATTR_ODL,
137  ATTR_OUT,
142  ATTR_PROGID,
143  ATTR_PROPGET,
144  ATTR_PROPPUT,
146  ATTR_PROXY,
147  ATTR_PUBLIC,
148  ATTR_RANGE,
153  ATTR_RETVAL,
154  ATTR_SIZEIS,
155  ATTR_SOURCE,
157  ATTR_STRING,
165  ATTR_UUID,
166  ATTR_V1ENUM,
167  ATTR_VARARG,
168  ATTR_VERSION,
171 };

◆ expr_type

Enumerator
EXPR_COMPLEX 
EXPR_UNARY 
EXPR_PROPVAL 
EXPR_SVAL 
EXPR_IVAL 
EXPR_BVAL 
EXPR_VOID 
EXPR_NUM 
EXPR_HEXNUM 
EXPR_DOUBLE 
EXPR_IDENTIFIER 
EXPR_NEG 
EXPR_NOT 
EXPR_PPTR 
EXPR_CAST 
EXPR_SIZEOF 
EXPR_SHL 
EXPR_SHR 
EXPR_MUL 
EXPR_DIV 
EXPR_ADD 
EXPR_SUB 
EXPR_AND 
EXPR_OR 
EXPR_COND 
EXPR_TRUEFALSE 
EXPR_ADDRESSOF 
EXPR_MEMBER 
EXPR_ARRAY 
EXPR_MOD 
EXPR_LOGOR 
EXPR_LOGAND 
EXPR_XOR 
EXPR_EQUALITY 
EXPR_INEQUALITY 
EXPR_GTR 
EXPR_LESS 
EXPR_GTREQL 
EXPR_LESSEQL 
EXPR_LOGNOT 
EXPR_POS 
EXPR_STRLIT 
EXPR_WSTRLIT 
EXPR_CHARCONST 

Definition at line 173 of file widltypes.h.

174 {
175  EXPR_VOID,
176  EXPR_NUM,
177  EXPR_HEXNUM,
178  EXPR_DOUBLE,
180  EXPR_NEG,
181  EXPR_NOT,
182  EXPR_PPTR,
183  EXPR_CAST,
184  EXPR_SIZEOF,
185  EXPR_SHL,
186  EXPR_SHR,
187  EXPR_MUL,
188  EXPR_DIV,
189  EXPR_ADD,
190  EXPR_SUB,
191  EXPR_AND,
192  EXPR_OR,
193  EXPR_COND,
196  EXPR_MEMBER,
197  EXPR_ARRAY,
198  EXPR_MOD,
199  EXPR_LOGOR,
200  EXPR_LOGAND,
201  EXPR_XOR,
204  EXPR_GTR,
205  EXPR_LESS,
206  EXPR_GTREQL,
207  EXPR_LESSEQL,
208  EXPR_LOGNOT,
209  EXPR_POS,
210  EXPR_STRLIT,
211  EXPR_WSTRLIT,
213 };

◆ statement_type

Enumerator
STMT_LIBRARY 
STMT_DECLARATION 
STMT_TYPE 
STMT_TYPEREF 
STMT_MODULE 
STMT_TYPEDEF 
STMT_IMPORT 
STMT_IMPORTLIB 
STMT_PRAGMA 
STMT_CPPQUOTE 

Definition at line 237 of file widltypes.h.

◆ storage_class

Enumerator
STG_NONE 
STG_STATIC 
STG_EXTERN 
STG_REGISTER 

Definition at line 229 of file widltypes.h.

230 {
231  STG_NONE,
232  STG_STATIC,
233  STG_EXTERN,
234  STG_REGISTER,
235 };

◆ syskind_t

Enumerator
SYS_WIN16 
SYS_WIN32 
SYS_MAC 
SYS_WIN64 

Definition at line 549 of file widltypes.h.

549  {
550  SYS_WIN16,
551  SYS_WIN32,
552  SYS_MAC,
553  SYS_WIN64
554 } syskind_t;
syskind_t
Definition: widltypes.h:549

◆ threading_type

Enumerator
THREADING_APARTMENT 
THREADING_NEUTRAL 
THREADING_SINGLE 
THREADING_FREE 
THREADING_BOTH 

Definition at line 251 of file widltypes.h.

◆ type_basic_type

Enumerator
TYPE_BASIC_INT8 
TYPE_BASIC_INT16 
TYPE_BASIC_INT32 
TYPE_BASIC_INT64 
TYPE_BASIC_INT 
TYPE_BASIC_INT3264 
TYPE_BASIC_LONG 
TYPE_BASIC_CHAR 
TYPE_BASIC_HYPER 
TYPE_BASIC_BYTE 
TYPE_BASIC_WCHAR 
TYPE_BASIC_FLOAT 
TYPE_BASIC_DOUBLE 
TYPE_BASIC_ERROR_STATUS_T 
TYPE_BASIC_HANDLE 

Definition at line 260 of file widltypes.h.

◆ type_kind

Enumerator
TKIND_PRIMITIVE 
TKIND_ENUM 
TKIND_RECORD 
TKIND_MODULE 
TKIND_INTERFACE 
TKIND_DISPATCH 
TKIND_COCLASS 
TKIND_ALIAS 
TKIND_UNION 
TKIND_MAX 

Definition at line 215 of file widltypes.h.

◆ type_type

Enumerator
TYPE_VOID 
TYPE_BASIC 
TYPE_ENUM 
TYPE_STRUCT 
TYPE_ENCAPSULATED_UNION 
TYPE_UNION 
TYPE_ALIAS 
TYPE_MODULE 
TYPE_COCLASS 
TYPE_FUNCTION 
TYPE_INTERFACE 
TYPE_POINTER 
TYPE_ARRAY 
TYPE_BITFIELD 

Definition at line 399 of file widltypes.h.

Function Documentation

◆ add_incomplete()

void add_incomplete ( type_t t)

Definition at line 6026 of file parser.tab.c.

6027 {
6028  struct typenode *tn = xmalloc(sizeof *tn);
6029  tn->type = t;
6031 }
GLdouble GLdouble t
Definition: gl.h:2047
typelist_t incomplete_types
Definition: parser.tab.c:135
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
void * xmalloc(int size)
Definition: uimain.c:747
type_t * type
Definition: parser.tab.c:118
struct list entry
Definition: parser.tab.c:119

Referenced by reg_typedefs(), type_new_enum(), type_new_nonencapsulated_union(), and type_new_struct().

◆ alloc_type()

type_t* alloc_type ( void  )

Definition at line 5517 of file parser.tab.c.

5518 {
5519  type_pool_node_t *node = xmalloc(sizeof *node);
5520  list_add_tail(&type_pool, &node->link);
5521  return &node->data;
5522 }
GLvoid * data
Definition: dlist.c:359
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
void * xmalloc(int size)
Definition: uimain.c:747
static struct list type_pool
Definition: parser.tab.c:5510
Definition: dlist.c:348

Referenced by duptype(), and make_type().

◆ append_var()

var_list_t* append_var ( var_list_t list,
var_t var 
)

Definition at line 5852 of file parser.tab.c.

5853 {
5854  if (!var) return list;
5855  if (!list)
5856  {
5857  list = xmalloc( sizeof(*list) );
5858  list_init( list );
5859  }
5860  list_add_tail( list, &var->entry );
5861  return list;
5862 }
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
void * xmalloc(int size)
Definition: uimain.c:747
Definition: _list.h:228
#define list
Definition: rosglue.h:35
struct list entry
Definition: widltypes.h:462
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149

Referenced by check_async_uuid(), set_var_types(), type_new_encapsulated_union(), and yyparse().

◆ check_for_additional_prototype_types()

void check_for_additional_prototype_types ( const var_list_t list)

Definition at line 640 of file header.c.

641 {
642  const var_t *v;
643 
644  if (!list) return;
645  LIST_FOR_EACH_ENTRY( v, list, const var_t, entry )
646  {
647  type_t *type = v->type;
648  if (!type) continue;
649  for (;;) {
650  const char *name = type->name;
651  if (type->user_types_registered) break;
652  type->user_types_registered = 1;
653  if (is_attr(type->attrs, ATTR_CONTEXTHANDLE)) {
655  {
656  context_handle_t *ch = xmalloc(sizeof(*ch));
657  ch->name = xstrdup(name);
659  }
660  /* don't carry on parsing fields within this type */
661  break;
662  }
663  if ((type_get_type(type) != TYPE_BASIC ||
665  is_attr(type->attrs, ATTR_HANDLE)) {
667  {
668  generic_handle_t *gh = xmalloc(sizeof(*gh));
669  gh->name = xstrdup(name);
671  }
672  /* don't carry on parsing fields within this type */
673  break;
674  }
675  if (is_attr(type->attrs, ATTR_WIREMARSHAL)) {
677  {
678  user_type_t *ut = xmalloc(sizeof *ut);
679  ut->name = xstrdup(name);
681  }
682  /* don't carry on parsing fields within this type as we are already
683  * using a wire marshaled type */
684  break;
685  }
686  else if (type_is_complete(type))
687  {
688  var_list_t *vars;
690  {
691  case TYPE_ENUM:
692  vars = type_enum_get_values(type);
693  break;
694  case TYPE_STRUCT:
696  break;
697  case TYPE_UNION:
698  vars = type_union_get_cases(type);
699  break;
700  default:
701  vars = NULL;
702  break;
703  }
705  }
706 
707  if (type_is_alias(type))
709  else if (is_ptr(type))
711  else if (is_array(type))
713  else
714  break;
715  }
716  }
717 }
static var_list_t * type_struct_get_fields(const type_t *type)
Definition: typetree.h:87
generic_handle_list_t generic_handle_list
Definition: header.c:44
static type_t * type_array_get_element(const type_t *type)
Definition: typetree.h:253
static var_list_t * type_union_get_cases(const type_t *type)
Definition: typetree.h:134
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static enum type_basic_type type_basic_get_type(const type_t *type)
Definition: typetree.h:73
static int context_handle_registered(const char *name)
Definition: header.c:580
static type_t * type_pointer_get_ref(const type_t *type)
Definition: typetree.h:292
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
void * xmalloc(int size)
Definition: uimain.c:747
static int is_ptr(const type_t *t)
Definition: header.h:59
static int type_is_alias(const type_t *type)
Definition: typetree.h:274
smooth NULL
Definition: ftsmooth.c:416
static int is_array(const type_t *t)
Definition: header.h:64
static var_list_t * type_enum_get_values(const type_t *type)
Definition: typetree.h:113
static int type_is_complete(const type_t *type)
Definition: typetree.h:191
static enum type_type type_get_type(const type_t *type)
Definition: typetree.h:68
static int generic_handle_registered(const char *name)
Definition: header.c:589
static enum type_type type_get_type_detect_alias(const type_t *type)
Definition: widltypes.h:589
user_type_list_t user_type_list
Definition: header.c:42
uint32_t entry
Definition: isohybrid.c:63
Definition: _list.h:228
void check_for_additional_prototype_types(const var_list_t *list)
Definition: header.c:640
const GLdouble * v
Definition: gl.h:2040
const char * name
Definition: widltypes.h:522
struct list entry
Definition: widltypes.h:521
static type_t * type_alias_get_aliasee(const type_t *type)
Definition: typetree.h:279
Definition: name.c:36
int is_attr(const attr_list_t *list, enum attr_type t)
Definition: header.c:99
char * xstrdup(const char *s)
Definition: uimain.c:768
static int user_type_registered(const char *name)
Definition: header.c:571
WCHAR * name
Definition: name.c:40

Referenced by check_all_user_types(), and check_for_additional_prototype_types().

◆ clear_all_offsets()

void clear_all_offsets ( void  )

Definition at line 5531 of file parser.tab.c.

5532 {
5535  node->data.typestring_offset = node->data.ptrdesc = 0;
5536 }
GLvoid * data
Definition: dlist.c:359
struct node node
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static struct list type_pool
Definition: parser.tab.c:5510
const WCHAR * link
Definition: db.cpp:988
Definition: dlist.c:348

Referenced by write_formatstringsdecl().

◆ find_const()

var_t* find_const ( const char name,
int  f 
)

Definition at line 6224 of file parser.tab.c.

6225 {
6226  struct rconst *cur = const_hash[hash_ident(name)];
6227  while (cur && strcmp(cur->name, name))
6228  cur = cur->next;
6229  if (!cur) {
6230  if (f) error_loc("constant '%s' not found\n", name);
6231  return NULL;
6232  }
6233  return cur->var;
6234 }
struct rconst * const_hash[HASHMAX]
Definition: parser.tab.c:6205
var_t * var
Definition: parser.tab.c:6201
void error_loc(const char *s,...)
Definition: utils.c:69
smooth NULL
Definition: ftsmooth.c:416
struct rconst * next
Definition: parser.tab.c:6202
char * name
Definition: parser.tab.c:6200
GLfloat f
Definition: glext.h:7540
static int hash_ident(const char *name)
Definition: parser.tab.c:5936
Definition: name.c:36
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469

Referenced by find_identifier(), and make_exprs().

◆ find_type()

type_t* find_type ( const char name,
struct namespace namespace,
int  t 
)

Definition at line 6139 of file parser.tab.c.

6140 {
6141  struct rtype *cur;
6142 
6143  if(namespace && namespace != &global_namespace) {
6144  for(cur = namespace->type_hash[hash_ident(name)]; cur; cur = cur->next) {
6145  if(cur->t == t && !strcmp(cur->name, name))
6146  return cur->type;
6147  }
6148  }
6149  for(cur = global_namespace.type_hash[hash_ident(name)]; cur; cur = cur->next) {
6150  if(cur->t == t && !strcmp(cur->name, name))
6151  return cur->type;
6152  }
6153  return NULL;
6154 }
GLdouble GLdouble t
Definition: gl.h:2047
struct rtype * type_hash[HASHMAX]
Definition: widltypes.h:396
smooth NULL
Definition: ftsmooth.c:416
const char * name
Definition: parser.tab.c:5986
struct rtype * next
Definition: parser.tab.c:5989
int t
Definition: parser.tab.c:5988
static int hash_ident(const char *name)
Definition: parser.tab.c:5936
static struct namespace global_namespace
Definition: parser.tab.c:206
Definition: name.c:36
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
type_t * type
Definition: parser.tab.c:5987

Referenced by find_type_or_error(), get_type(), is_type(), reg_typedefs(), type_dispinterface_define(), type_dispinterface_define_from_iface(), type_new_enum(), type_new_nonencapsulated_union(), type_new_struct(), and yyparse().

◆ format_namespace()

char* format_namespace ( struct namespace namespace,
const char prefix,
const char separator,
const char suffix 
)

Definition at line 110 of file typetree.c.

111 {
112  unsigned len = strlen(prefix) + strlen(suffix);
113  unsigned sep_len = strlen(separator);
114  struct namespace *iter;
115  char *ret, *ptr;
116 
117  if(use_abi_namespace && !is_global_namespace(namespace))
118  len += 3 /* strlen("ABI") */ + sep_len;
119 
120  for(iter = namespace; !is_global_namespace(iter); iter = iter->parent)
121  len += strlen(iter->name) + sep_len;
122 
123  ret = xmalloc(len+1);
124  strcpy(ret, prefix);
125  ptr = append_namespace(ret + strlen(ret), namespace, separator);
126  strcpy(ptr, suffix);
127 
128  return ret;
129 }
static int is_global_namespace(const struct namespace *namespace)
Definition: widltypes.h:613
static const WCHAR separator[]
Definition: asmname.c:63
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
void * xmalloc(int size)
Definition: uimain.c:747
static PVOID ptr
Definition: dispmode.c:27
int ret
GLenum GLsizei len
Definition: glext.h:6722
int use_abi_namespace
Definition: widl.c:130
const char * name
Definition: widltypes.h:392
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
static char * append_namespace(char *ptr, struct namespace *namespace, const char *separator)
Definition: typetree.c:94
struct namespace * parent
Definition: widltypes.h:393

Referenced by reg_type(), and write_uuid_decl().

◆ get_type()

type_t* get_type ( enum type_type  type,
char name,
struct namespace namespace,
int  t 
)

Definition at line 6178 of file parser.tab.c.

6179 {
6180  type_t *tp;
6181  if (!namespace)
6182  namespace = &global_namespace;
6183  if (name) {
6184  tp = find_type(name, namespace, t);
6185  if (tp) {
6186  free(name);
6187  return tp;
6188  }
6189  }
6190  tp = make_type(type);
6191  tp->name = name;
6192  tp->namespace = namespace;
6193  if (!name) return tp;
6194  return reg_type(tp, name, namespace, t);
6195 }
type_t * make_type(enum type_type type)
Definition: typetree.c:44
GLdouble GLdouble t
Definition: gl.h:2047
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
void free(void *)
Definition: cabinet.c:147
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2883
type_t * find_type(const char *name, struct namespace *namespace, int t)
Definition: parser.tab.c:6139
static struct namespace global_namespace
Definition: parser.tab.c:206
Definition: name.c:36
type_t * reg_type(type_t *type, const char *name, struct namespace *namespace, int t)
Definition: parser.tab.c:5992
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by check_async_uuid(), and yyparse().

◆ init_loc_info()

void init_loc_info ( loc_info_t )

Definition at line 7200 of file parser.tab.c.

7201 {
7202  i->input_name = input_name ? input_name : "stdin";
7203  i->line_number = line_number;
7204  i->near_text = parser_text;
7205 }
char * parser_text
Definition: parser.yy.c:703
int line_number
Definition: parser.yy.c:775
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
char * input_name
Definition: parser.yy.c:774

Referenced by make_type(), make_var(), and type_new_alias().

◆ init_types()

void init_types ( void  )

Definition at line 5310 of file parser.tab.c.

5311 {
5316  decl_builtin_basic("error_status_t", TYPE_BASIC_ERROR_STATUS_T);
5319 }
static void decl_builtin_basic(const char *name, enum type_basic_type type)
Definition: parser.tab.c:5299
static void decl_builtin_alias(const char *name, type_t *t)
Definition: parser.tab.c:5305
type_t * type_new_basic(enum type_basic_type basic_type)
Definition: typetree.c:243

Referenced by main().

◆ is_global_namespace()

static int is_global_namespace ( const struct namespace namespace)
inlinestatic

◆ make_type()

type_t* make_type ( enum type_type  type)

Definition at line 44 of file typetree.c.

45 {
46  type_t *t = alloc_type();
47  t->name = NULL;
48  t->namespace = NULL;
49  t->type_type = type;
50  t->attrs = NULL;
51  t->c_name = NULL;
52  t->orig = NULL;
53  memset(&t->details, 0, sizeof(t->details));
54  t->typestring_offset = 0;
55  t->ptrdesc = 0;
56  t->ignore = (parse_only != 0);
57  t->defined = FALSE;
58  t->written = FALSE;
59  t->user_types_registered = FALSE;
60  t->tfswrite = FALSE;
61  t->checked = FALSE;
62  t->is_alias = FALSE;
63  t->typelib_idx = -1;
64  init_loc_info(&t->loc_info);
65  return t;
66 }
GLdouble GLdouble t
Definition: gl.h:2047
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
smooth NULL
Definition: ftsmooth.c:416
void init_loc_info(loc_info_t *i)
Definition: parser.tab.c:7200
type_t * alloc_type(void)
Definition: parser.tab.c:5517
#define parse_only
Definition: parser.h:44
#define memset(x, y, z)
Definition: compat.h:39

Referenced by get_type(), type_new_array(), type_new_basic(), type_new_bitfield(), type_new_enum(), type_new_function(), type_new_nonencapsulated_union(), type_new_pointer(), type_new_struct(), and type_new_void().

◆ make_var()

var_t* make_var ( char name)

Definition at line 5876 of file parser.tab.c.

5877 {
5878  var_t *v = xmalloc(sizeof(var_t));
5879  v->name = name;
5880  v->type = NULL;
5881  v->attrs = NULL;
5882  v->eval = NULL;
5883  v->stgclass = STG_NONE;
5884  init_loc_info(&v->loc_info);
5885  return v;
5886 }
void * xmalloc(int size)
Definition: uimain.c:747
smooth NULL
Definition: ftsmooth.c:416
void init_loc_info(loc_info_t *i)
Definition: parser.tab.c:7200
const GLdouble * v
Definition: gl.h:2040
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by add_explicit_handle_if_necessary(), declare_var(), make_declarator(), type_new_encapsulated_union(), and yyparse().

◆ reg_type()

type_t* reg_type ( type_t type,
const char name,
struct namespace namespace,
int  t 
)

Definition at line 5992 of file parser.tab.c.

5993 {
5994  struct rtype *nt;
5995  int hash;
5996  if (!name) {
5997  error_loc("registering named type without name\n");
5998  return type;
5999  }
6000  if (!namespace)
6001  namespace = &global_namespace;
6002  hash = hash_ident(name);
6003  nt = xmalloc(sizeof(struct rtype));
6004  nt->name = name;
6005  if (is_global_namespace(namespace))
6006  type->c_name = name;
6007  else
6008  type->c_name = format_namespace(namespace, "__x_", "_C", name);
6009  nt->type = type;
6010  nt->t = t;
6011  nt->next = namespace->type_hash[hash];
6012  namespace->type_hash[hash] = nt;
6013  if ((t == tsSTRUCT || t == tsUNION))
6015  return type;
6016 }
static int is_global_namespace(const struct namespace *namespace)
Definition: widltypes.h:613
GLdouble GLdouble t
Definition: gl.h:2047
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
IMAGE_NT_HEADERS nt
Definition: module.c:50
#define tsUNION
Definition: widltypes.h:568
int hash
Definition: main.c:58
void * xmalloc(int size)
Definition: uimain.c:747
#define tsSTRUCT
Definition: widltypes.h:567
void error_loc(const char *s,...)
Definition: utils.c:69
char * format_namespace(struct namespace *namespace, const char *prefix, const char *separator, const char *suffix)
Definition: typetree.c:110
static void fix_incomplete_types(type_t *complete_type)
Definition: parser.tab.c:6057
static int hash_ident(const char *name)
Definition: parser.tab.c:5936
static struct namespace global_namespace
Definition: parser.tab.c:206
Definition: name.c:36
Definition: _hash_fun.h:40
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by add_register(), decl_builtin_alias(), decl_builtin_basic(), get_regdata(), get_shader_semantics(), get_type(), reg_add(), reg_typedefs(), shader_glsl_resinfo(), type_new_enum(), type_new_nonencapsulated_union(), type_new_struct(), write_const(), and yyparse().

◆ set_all_tfswrite()

void set_all_tfswrite ( int  val)

Definition at line 5524 of file parser.tab.c.

5525 {
5528  node->data.tfswrite = val;
5529 }
GLvoid * data
Definition: dlist.c:359
struct node node
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
GLuint GLfloat * val
Definition: glext.h:7180
static struct list type_pool
Definition: parser.tab.c:5510
const WCHAR * link
Definition: db.cpp:988
Definition: dlist.c:348

Referenced by get_size_typeformatstring(), and write_typeformatstring().

◆ statements_has_func()

static int statements_has_func ( const statement_list_t stmts)
inlinestatic

Definition at line 601 of file widltypes.h.

602 {
603  const statement_t *stmt;
604  int has_func = 0;
605  STATEMENTS_FOR_EACH_FUNC(stmt, stmts)
606  {
607  has_func = 1;
608  break;
609  }
610  return has_func;
611 }
#define STATEMENTS_FOR_EACH_FUNC(stmt, stmts)
Definition: widltypes.h:596

Referenced by write_server_stmts().

◆ type_get_function_args()

◆ type_get_type_detect_alias()

static enum type_type type_get_type_detect_alias ( const type_t type)
inlinestatic

Variable Documentation

◆ context_handle_list

◆ generic_handle_list

◆ user_type_list