90 fprintf(
f,
"DEFINE_GUID(%s_%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
91 "0x%02x,0x%02x,0x%02x,0x%02x,0x%02x);\n",
99 fprintf(
f,
"#ifdef __CRT_UUID_DECL\n");
100 fprintf(
f,
"__CRT_UUID_DECL(%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
101 "0x%02x,0x%02x,0x%02x,0x%02x,0x%02x)\n",
112 snprintf(
buf,
sizeof(
buf),
"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
163 unsigned nameless_struct_cnt = 0, nameless_struct_i = 0, nameless_union_cnt = 0, nameless_union_i = 0;
171 if (!
v->declspec.type)
continue;
176 nameless_struct_cnt++;
179 nameless_union_cnt++;
188 if (!
v->declspec.type)
continue;
199 if(nameless_struct_cnt == 1) {
200 name =
"__C89_NAMELESSSTRUCTNAME";
201 }
else if(nameless_struct_i < 5 ) {
202 snprintf(
buf,
sizeof(
buf),
"__C89_NAMELESSSTRUCTNAME%d", ++nameless_struct_i);
210 if(nameless_union_cnt == 1) {
211 name =
"__C89_NAMELESSUNIONNAME";
212 }
else if(nameless_union_i < 8 ) {
213 snprintf(
buf,
sizeof(
buf),
"__C89_NAMELESSUNIONNAME%d", ++nameless_union_i);
277 if (callconv)
fprintf(
h,
"%s ", callconv);
285 const char *decl_name, *
name;
304 else if (!
t->written) {
306 if (decl_name)
fprintf(
h,
"enum %s {\n", decl_name);
320 else if (!
t->written) {
322 if (decl_name)
fprintf(
h,
"struct %s {\n", decl_name);
338 else if (!
t->written) {
340 if (decl_name)
fprintf(
h,
"union %s {\n", decl_name);
380 if (callconv)
fprintf(
h,
" %s ", callconv);
494 fprintf(
h,
"[%s]", is_field ?
"1" :
"");
562 int save_written =
t->written;
569 fprintf(
f,
"} /* extern \"C\" */\n");
576 t->written = save_written;
628 unsigned int index = 0;
634 else error(
"internal error: %s is not a context handle\n",
type->name );
641 error(
"internal error: %s is not registered as a context handle\n",
type->name );
648 unsigned int index = 0;
654 else error(
"internal error: %s is not a generic handle\n",
type->name );
661 error(
"internal error: %s is not registered as a generic handle\n",
type->name );
672 if (
type->user_types_registered)
break;
673 type->user_types_registered = 1;
789 fprintf(
header,
"unsigned char * __RPC_USER %s_UserMarshal (ULONG *, unsigned char *, %s *);\n",
name,
name);
790 fprintf(
header,
"unsigned char * __RPC_USER %s_UserUnmarshal(ULONG *, unsigned char *, %s *);\n",
name,
name);
852 for (
t = &
var->declspec; ; )
873 switch (
v->declspec.stgclass)
902 for (
t =
var->declspec.type;
912 unsigned char *explicit_fc,
unsigned char *implicit_fc )
917 *explicit_fc = *implicit_fc = 0;
1003 char inherit_name[256];
1028 char inherit_name[256];
1050 static char buff[255];
1061 int first_iface = 1;
1133 const var_t *tail_arg;
1137 if(tail_arg ==
arg) {
1175 if (!callconv) callconv =
"STDMETHODCALLTYPE";
1178 fprintf(
header,
"#ifdef WIDL_EXPLICIT_AGGREGATE_RETURNS\n");
1236 int first_iface = 1;
1288 int first_iface = 1;
1314 if (!callconv) callconv =
"STDMETHODCALLTYPE";
1363 if (!callconv) callconv =
"STDMETHODCALLTYPE";
1372 fprintf(
header,
" IRpcChannelBuffer* pRpcChannelBuffer,\n");
1382 =
"/* WIDL-generated stub. You must provide an implementation for this. */";
1409 fprintf(fp,
" return E_NOTIMPL;\n");
1414 fprintf(fp,
" memset(&rv, 0, sizeof rv);\n");
1460 fprintf(local_stubs,
"#include <objbase.h>\n");
1472 if (!callconv) callconv =
"__cdecl";
1491 fprintf(
header,
"#if defined(__cplusplus) && !defined(CINTERFACE)\n");
1516 fprintf(
header,
"#if defined(__cplusplus) && !defined(CINTERFACE)\n");
1593 ver =
expr->ref->
u.integer.value;
1606 ver =
expr->ref->
u.integer.value;
1616 fprintf(
header,
"/*****************************************************************************\n");
1617 fprintf(
header,
" * %s %sinterface\n", iface->
name, dispinterface ?
"disp" :
"");
1620 fprintf(
header,
"#ifndef __%s_%sINTERFACE_DEFINED__\n", iface->
c_name, dispinterface ?
"DISP" :
"");
1621 fprintf(
header,
"#define __%s_%sINTERFACE_DEFINED__\n\n", iface->
c_name, dispinterface ?
"DISP" :
"");
1676 fprintf(
header,
"#if defined(__cplusplus) && !defined(CINTERFACE)\n");
1709 if (!dispinterface && !iface->
impl_name)
1755 fprintf(
header,
"#endif /* __%s_%sINTERFACE_DEFINED__ */\n", iface->
c_name, dispinterface ?
"DISP" :
"");
1766 fprintf(
header,
"/*****************************************************************************\n");
1785 fprintf(
header,
"extern RPC_IF_HANDLE %s%s_v%d_%d_c_ifspec;\n",
1787 fprintf(
header,
"extern RPC_IF_HANDLE %s%s_v%d_%d_s_ifspec;\n",
1804 fprintf(
header,
"/*****************************************************************************\n");
1847 char *
name, *c_name;
1855 fprintf(
header,
"#ifndef RUNTIMECLASS_%s_DEFINED\n", c_name);
1856 fprintf(
header,
"#define RUNTIMECLASS_%s_DEFINED\n", c_name);
1857 fprintf(
header,
"#if !defined(_MSC_VER) && !defined(__MINGW32__)\n");
1858 fprintf(
header,
"static const WCHAR RuntimeClass_%s[] = {", c_name);
1861 fprintf(
header,
"#elif defined(__GNUC__) && !defined(__cplusplus)\n");
1863 fprintf(
header,
"const DECLSPEC_SELECTANY WCHAR RuntimeClass_%s[] = L\"%s\";\n", c_name,
name);
1865 fprintf(
header,
"extern const DECLSPEC_SELECTANY WCHAR RuntimeClass_%s[] = {", c_name);
1869 fprintf(
header,
"#endif /* RUNTIMECLASS_%s_DEFINED */\n", c_name);
2067 if (prefixes_differ)
2097 fprintf(
header,
"#define __REQUIRED_RPCNDR_H_VERSION__ 475\n");
2131 fprintf(
header,
"/* Begin additional prototypes for all interfaces */\n");
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strchr(const char *String, int ch)
char * xstrdup(const char *s)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static const WCHAR indent[]
void write_expr(FILE *h, const expr_t *e, int brackets, int toplevel, const char *toplevel_prefix, const type_t *cont_type, const char *local_var_prefix)
static unsigned char buff[32768]
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLenum const GLfloat * params
GLenum GLuint GLenum GLsizei const GLchar * buf
GLboolean GLboolean GLboolean GLboolean a
GLfloat GLfloat GLfloat GLfloat h
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
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fputc(_In_ int _Ch, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
#define comment(fmt, arg1)
static const struct encodedInt enums[]
char * strmake(size_t *lenp,...)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
#define LIST_FOR_EACH_ENTRY_REV(elem, list, type, field)
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
typeref_list_t * type_list
union _statement_t::@5358 u
struct parameterized_details parameterized
union _type_t::@5357 details
const char * qualified_name
struct namespace * parent
Character const *const prefix
char * format_namespace(struct namespace *namespace, const char *prefix, const char *separator, const char *suffix, const char *abi_prefix)
const char * type_get_decl_name(const type_t *type, enum name_type name_type)
const char * type_get_name(const type_t *type, enum name_type name_type)
static int type_array_is_decl_as_ptr(const type_t *type)
static enum type_type type_get_type(const type_t *type)
static type_t * type_runtimeclass_get_default_iface(const type_t *type, int check)
static const decl_spec_t * type_function_get_ret(const type_t *type)
static const expr_t * type_bitfield_get_bits(const type_t *type)
static type_t * type_delegate_get_iface(const type_t *type)
static int type_basic_get_sign(const type_t *type)
static type_t * type_function_get_rettype(const type_t *type)
static type_t * type_pointer_get_root_type(type_t *type)
static var_list_t * type_union_get_cases(const type_t *type)
static type_t * type_array_get_element_type(const type_t *type)
static type_t * type_bitfield_get_field(const type_t *type)
static type_t * type_alias_get_aliasee_type(const type_t *type)
static enum type_basic_type type_basic_get_type(const type_t *type)
static type_t * type_iface_get_async_iface(const type_t *type)
static const decl_spec_t * type_pointer_get_ref(const type_t *type)
static int type_is_defined(const type_t *type)
static var_list_t * type_struct_get_fields(const type_t *type)
static int type_is_complete(const type_t *type)
static const decl_spec_t * type_alias_get_aliasee(const type_t *type)
static var_list_t * type_encapsulated_union_get_fields(const type_t *type)
static type_t * type_pointer_get_ref_type(const type_t *type)
static int type_is_alias(const type_t *type)
static type_t * type_iface_get_inherit(const type_t *type)
static var_list_t * type_function_get_args(const type_t *type)
static type_t * type_parameterized_type_get_real_type(const type_t *type)
static unsigned int type_array_get_dim(const type_t *type)
static statement_list_t * type_iface_get_stmts(const type_t *type)
static var_list_t * type_enum_get_values(const type_t *type)
static const decl_spec_t * type_array_get_element(const type_t *type)
void start_cplusplus_guard(FILE *fp)
const char * prefix_server
void end_cplusplus_guard(FILE *fp)
const char * prefix_client
@ TYPE_PARAMETERIZED_TYPE
@ TYPE_ENCAPSULATED_UNION
static enum type_type type_get_type_detect_alias(const type_t *type)
static int is_global_namespace(const struct namespace *namespace)
@ TYPE_BASIC_ERROR_STATUS_T
@ FUNCTION_SPECIFIER_INLINE
#define STATEMENTS_FOR_EACH_FUNC(stmt, stmts)
void int int ULONGLONG int va_list * ap