ReactOS 0.4.15-dev-7677-g8209aa5
widl.h File Reference
#include "widltypes.h"
#include <time.h>
Include dependency graph for widl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEBUGLEVEL_NONE   0x0000
 
#define DEBUGLEVEL_CHAT   0x0001
 
#define DEBUGLEVEL_DUMP   0x0002
 
#define DEBUGLEVEL_TRACE   0x0004
 
#define DEBUGLEVEL_PPMSG   0x0008
 
#define DEBUGLEVEL_PPLEX   0x0010
 
#define DEBUGLEVEL_PPTRACE   0x0020
 

Enumerations

enum  target_cpu {
  CPU_x86 , CPU_x86_64 , CPU_POWERPC , CPU_ARM ,
  CPU_ARM64 , CPU_LAST = CPU_ARM64
}
 
enum  stub_mode { MODE_Os , MODE_Oi , MODE_Oif }
 

Functions

enum stub_mode get_stub_mode (void)
 
void write_header (const statement_list_t *stmts)
 
void write_id_data (const statement_list_t *stmts)
 
void write_proxies (const statement_list_t *stmts)
 
void write_client (const statement_list_t *stmts)
 
void write_server (const statement_list_t *stmts)
 
void write_regscript (const statement_list_t *stmts)
 
void write_typelib_regscript (const statement_list_t *stmts)
 
void output_typelib_regscript (const typelib_t *typelib)
 
void write_local_stubs (const statement_list_t *stmts)
 
void write_dlldata (const statement_list_t *stmts)
 
void start_cplusplus_guard (FILE *fp)
 
void end_cplusplus_guard (FILE *fp)
 

Variables

int debuglevel
 
int pedantic
 
int do_everything
 
int do_header
 
int do_typelib
 
int do_old_typelib
 
int do_proxies
 
int do_client
 
int do_server
 
int do_regscript
 
int do_idfile
 
int do_dlldata
 
int old_names
 
int win32_packing
 
int win64_packing
 
int winrt_mode
 
int use_abi_namespace
 
charinput_name
 
charinput_idl_name
 
characf_name
 
charheader_name
 
charheader_token
 
charlocal_stubs_name
 
chartypelib_name
 
chardlldata_name
 
charproxy_name
 
charproxy_token
 
charclient_name
 
charclient_token
 
charserver_name
 
charserver_token
 
charregscript_name
 
charregscript_token
 
const charprefix_client
 
const charprefix_server
 
unsigned int pointer_size
 
time_t now
 
int line_number
 
int char_number
 
enum target_cpu target_cpu
 

Macro Definition Documentation

◆ DEBUGLEVEL_CHAT

#define DEBUGLEVEL_CHAT   0x0001

Definition at line 30 of file widl.h.

◆ DEBUGLEVEL_DUMP

#define DEBUGLEVEL_DUMP   0x0002

Definition at line 31 of file widl.h.

◆ DEBUGLEVEL_NONE

#define DEBUGLEVEL_NONE   0x0000

Definition at line 29 of file widl.h.

◆ DEBUGLEVEL_PPLEX

#define DEBUGLEVEL_PPLEX   0x0010

Definition at line 34 of file widl.h.

◆ DEBUGLEVEL_PPMSG

#define DEBUGLEVEL_PPMSG   0x0008

Definition at line 33 of file widl.h.

◆ DEBUGLEVEL_PPTRACE

#define DEBUGLEVEL_PPTRACE   0x0020

Definition at line 35 of file widl.h.

◆ DEBUGLEVEL_TRACE

#define DEBUGLEVEL_TRACE   0x0004

Definition at line 32 of file widl.h.

Enumeration Type Documentation

◆ stub_mode

Enumerator
MODE_Os 
MODE_Oi 
MODE_Oif 

Definition at line 85 of file widl.h.

86{
87 MODE_Os, /* inline stubs */
88 MODE_Oi, /* old-style interpreted stubs */
89 MODE_Oif /* new-style fully interpreted stubs */
90};
@ MODE_Os
Definition: widl.h:87
@ MODE_Oif
Definition: widl.h:89
@ MODE_Oi
Definition: widl.h:88

◆ target_cpu

Enumerator
CPU_x86 
CPU_x86_64 
CPU_POWERPC 
CPU_ARM 
CPU_ARM64 
CPU_LAST 

Definition at line 78 of file widl.h.

79{
81};
@ CPU_LAST
Definition: widl.h:80
@ CPU_ARM
Definition: widl.h:80
@ CPU_x86_64
Definition: widl.h:80
@ CPU_x86
Definition: widl.h:80
@ CPU_ARM64
Definition: widl.h:80
@ CPU_POWERPC
Definition: widl.h:80

Function Documentation

◆ end_cplusplus_guard()

void end_cplusplus_guard ( FILE fp)

Definition at line 347 of file widl.c.

348{
349 fprintf(fp, "#ifdef __cplusplus\n");
350 fprintf(fp, "}\n");
351 fprintf(fp, "#endif\n\n");
352}
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)

Referenced by write_dlldata_list(), write_header(), and write_id_data().

◆ get_stub_mode()

enum stub_mode get_stub_mode ( void  )

◆ output_typelib_regscript()

void output_typelib_regscript ( const typelib_t typelib)

Definition at line 304 of file register.c.

305{
306 const UUID *typelib_uuid = get_attrp( typelib->attrs, ATTR_UUID );
307 const char *descr = get_attrp( typelib->attrs, ATTR_HELPSTRING );
308 const expr_t *lcid_expr = get_attrp( typelib->attrs, ATTR_LIBLCID );
309 unsigned int version = get_attrv( typelib->attrs, ATTR_VERSION );
310 unsigned int flags = 0;
311 char id_part[12] = "";
312#ifndef __REACTOS__
313 char *resname = typelib_name;
314#endif
315 expr_t *expr;
316
317 if (is_attr( typelib->attrs, ATTR_RESTRICTED )) flags |= 1; /* LIBFLAG_FRESTRICTED */
318 if (is_attr( typelib->attrs, ATTR_CONTROL )) flags |= 2; /* LIBFLAG_FCONTROL */
319 if (is_attr( typelib->attrs, ATTR_HIDDEN )) flags |= 4; /* LIBFLAG_FHIDDEN */
320
321 put_str( indent, "HKCR\n" );
322 put_str( indent++, "{\n" );
323
324 put_str( indent, "NoRemove Typelib\n" );
325 put_str( indent++, "{\n" );
326 put_str( indent, "NoRemove '%s'\n", format_uuid( typelib_uuid ));
327 put_str( indent++, "{\n" );
328 put_str( indent, "'%u.%u' = s '%s'\n",
330 put_str( indent++, "{\n" );
331 expr = get_attrp( typelib->attrs, ATTR_ID );
332#ifdef __REACTOS__
333 if (expr)
334 sprintf(id_part, "\\%d", expr->cval);
335#else
336 if (expr)
337 {
338 sprintf(id_part, "\\%d", expr->cval);
339 resname = xmalloc( strlen(typelib_name) + 20 );
340 sprintf(resname, "%s\\%d", typelib_name, expr->cval);
341 }
342#endif
343 put_str( indent, "'%x' { %s = s '%%MODULE%%%s' }\n",
344 lcid_expr ? lcid_expr->cval : 0, pointer_size == 8 ? "win64" : "win32", id_part );
345 put_str( indent, "FLAGS = s '%u'\n", flags );
346 put_str( --indent, "}\n" );
347 put_str( --indent, "}\n" );
348 put_str( --indent, "}\n" );
349
350 put_str( indent, "NoRemove Interface\n" );
351 put_str( indent++, "{\n" );
353 put_str( --indent, "}\n" );
354
355 put_str( indent, "NoRemove CLSID\n" );
356 put_str( indent++, "{\n" );
358 put_str( --indent, "}\n" );
359
360 write_progids( typelib->stmts );
361 put_str( --indent, "}\n" );
362#ifdef __REACTOS__
363 add_output_to_resources( "WINE_REGISTRY", typelib_name );
364#else
365 add_output_to_resources( "WINE_REGISTRY", resname );
366#endif
367}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
static ITypeLib * typelib
Definition: apps.c:108
void * xmalloc(int size)
Definition: uimain.c:747
#define ATTR_HIDDEN
Definition: fat.h:160
static const WCHAR version[]
Definition: asmname.c:66
GLbitfield flags
Definition: glext.h:7161
#define sprintf(buf, format,...)
Definition: sprintf.c:55
const char * descr
Definition: boot.c:45
int is_attr(const attr_list_t *list, enum attr_type t)
Definition: header.c:99
unsigned int get_attrv(const attr_list_t *list, enum attr_type t)
Definition: header.c:115
void * get_attrp(const attr_list_t *list, enum attr_type t)
Definition: header.c:107
static void write_coclasses(const statement_list_t *stmts, const typelib_t *typelib)
Definition: register.c:181
static void write_progids(const statement_list_t *stmts)
Definition: register.c:223
static int indent
Definition: register.c:41
static void write_typelib_interfaces(const typelib_t *typelib)
Definition: register.c:140
static const char * format_uuid(const UUID *uuid)
Definition: register.c:43
void add_output_to_resources(const char *type, const char *name)
Definition: utils.c:307
void put_str(int indent, const char *format,...)
Definition: utils.c:423
#define MINORVERSION(version)
Definition: utils.h:76
#define MAJORVERSION(version)
Definition: utils.h:75
int cval
Definition: widltypes.h:319
Definition: query.h:87
char * typelib_name
Definition: widl.c:139
@ ATTR_UUID
Definition: widltypes.h:166
@ ATTR_VERSION
Definition: widltypes.h:169
@ ATTR_CONTROL
Definition: widltypes.h:86
@ ATTR_LIBLCID
Definition: widltypes.h:122
@ ATTR_RESTRICTED
Definition: widltypes.h:153
@ ATTR_ID
Definition: widltypes.h:112
@ ATTR_HELPSTRING
Definition: widltypes.h:108

Referenced by save_all_changes().

◆ start_cplusplus_guard()

void start_cplusplus_guard ( FILE fp)

Definition at line 340 of file widl.c.

341{
342 fprintf(fp, "#ifdef __cplusplus\n");
343 fprintf(fp, "extern \"C\" {\n");
344 fprintf(fp, "#endif\n\n");
345}

Referenced by write_dlldata_list(), write_header(), and write_id_data().

◆ write_client()

void write_client ( const statement_list_t stmts)

Definition at line 619 of file client.c.

620{
621 if (!do_client)
622 return;
623 if (do_everything && !need_stub_files(stmts))
624 return;
625
626 init_client();
627 if (!client)
628 return;
629
630 write_client_routines( stmts );
631 fclose(client);
632}
int need_stub_files(const statement_list_t *stmts)
Definition: proxy.c:850
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
static void init_client(void)
Definition: client.c:497
static FILE * client
Definition: client.c:41
static void write_client_routines(const statement_list_t *stmts)
Definition: client.c:593
int do_everything
Definition: widl.c:114
int do_client
Definition: widl.c:120

◆ write_dlldata()

void write_dlldata ( const statement_list_t stmts)

Definition at line 422 of file widl.c.

423{
424 struct list filenames = LIST_INIT(filenames);
425 int define_proxy_delegation = 0;
427 FILE *dlldata;
428
429 if (!do_dlldata || !need_proxy_file(stmts))
430 return;
431
432 define_proxy_delegation = need_proxy_delegation(stmts);
433
434 dlldata = fopen(dlldata_name, "r");
435 if (dlldata) {
436 static const char marker[] = "REFERENCE_PROXY_FILE";
437 static const char delegation_define[] = "#define PROXY_DELEGATION";
438 char *line = NULL;
439 size_t len = 0;
440
441 while (widl_getline(&line, &len, dlldata)) {
442 char *start, *end;
444 if (strncmp(start, marker, sizeof marker - 1) == 0) {
445 start = eat_space(start + sizeof marker - 1);
446 if (*start != '(')
447 continue;
448 end = start = eat_space(start + 1);
449 while (*end && *end != ')')
450 ++end;
451 if (*end != ')')
452 continue;
453 while (isspace((unsigned char) end[-1]))
454 --end;
455 *end = '\0';
456 if (start < end)
457 add_filename_node(&filenames, start);
458 }else if (!define_proxy_delegation && strncmp(start, delegation_define, sizeof(delegation_define)-1)) {
459 define_proxy_delegation = 1;
460 }
461 }
462
463 if (ferror(dlldata))
464 error("couldn't read from %s: %s\n", dlldata_name, strerror(errno));
465
466 free(line);
467 fclose(dlldata);
468 }
469
471 if (strcmp(proxy_token, node->filename) == 0) {
472 /* We're already in the list, no need to regenerate this file. */
473 free_filename_nodes(&filenames);
474 return;
475 }
476
477 add_filename_node(&filenames, proxy_token);
478 write_dlldata_list(&filenames, define_proxy_delegation);
479 free_filename_nodes(&filenames);
480}
#define isspace(c)
Definition: acclib.h:69
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534
Definition: list.h:37
const WCHAR * link
Definition: db.cpp:997
#define free
Definition: debug_ros.c:5
#define NULL
Definition: types.h:112
GLuint start
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
GLenum GLsizei len
Definition: glext.h:6722
int need_proxy_delegation(const statement_list_t *stmts)
Definition: proxy.c:814
int need_proxy_file(const statement_list_t *stmts)
Definition: proxy.c:809
_Check_return_ _CRTIMP int __cdecl ferror(_In_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
int marker
Definition: jpeglib.h:1030
#define error(str)
Definition: mkdosfs.c:1605
const char * strerror(int err)
Definition: compat_str.c:23
#define errno
Definition: errno.h:18
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
size_t widl_getline(char **linep, size_t *lenp, FILE *fp)
Definition: utils.c:172
Definition: parser.c:49
#define LIST_INIT(head)
Definition: queue.h:197
Definition: dlist.c:348
static void free_filename_nodes(struct list *list)
Definition: widl.c:367
char * dlldata_name
Definition: widl.c:140
static void add_filename_node(struct list *list, const char *name)
Definition: widl.c:360
static char * eat_space(char *s)
Definition: widl.c:415
char * proxy_token
Definition: widl.c:142
static void write_dlldata_list(struct list *filenames, int define_proxy_delegation)
Definition: widl.c:377
int do_dlldata
Definition: widl.c:124

◆ write_header()

void write_header ( const statement_list_t stmts)

Definition at line 1790 of file header.c.

1791{
1792 FILE *header;
1793
1794 if (!do_header) return;
1795
1796 if(!(header = fopen(header_name, "w"))) {
1797 error("Could not open %s for output\n", header_name);
1798 return;
1799 }
1800 fprintf(header, "/*** Autogenerated by WIDL %s from %s - Do not edit ***/\n\n", PACKAGE_VERSION, input_name);
1801
1802 fprintf(header, "#ifdef _WIN32\n");
1803 fprintf(header, "#ifndef __REQUIRED_RPCNDR_H_VERSION__\n");
1804 fprintf(header, "#define __REQUIRED_RPCNDR_H_VERSION__ 475\n");
1805 fprintf(header, "#endif\n\n");
1806
1807 fprintf(header, "#ifdef __REACTOS__\n");
1808 fprintf(header, "#define WIN32_LEAN_AND_MEAN\n");
1809 fprintf(header, "#endif\n\n");
1810
1811 fprintf(header, "#include <rpc.h>\n" );
1812 fprintf(header, "#include <rpcndr.h>\n" );
1814 fprintf(header, "#include <midles.h>\n" );
1815 fprintf(header, "#endif\n\n");
1816
1817 fprintf(header, "#ifndef COM_NO_WINDOWS_H\n");
1818 fprintf(header, "#include <windows.h>\n");
1819 fprintf(header, "#include <ole2.h>\n");
1820 fprintf(header, "#endif\n\n");
1821
1822 fprintf(header, "#ifndef __%s__\n", header_token);
1823 fprintf(header, "#define __%s__\n\n", header_token);
1824
1825 fprintf(header, "/* Forward declarations */\n\n");
1827
1828 fprintf(header, "/* Headers for imported files */\n\n");
1829 write_imports(header, stmts);
1830 fprintf(header, "\n");
1832
1834
1835 fprintf(header, "/* Begin additional prototypes for all interfaces */\n");
1836 fprintf(header, "\n");
1841 fprintf(header, "\n");
1842 fprintf(header, "/* End additional prototypes */\n");
1843 fprintf(header, "\n");
1844
1846 fprintf(header, "#endif /* __%s__ */\n", header_token);
1847
1848 fclose(header);
1849}
#define FALSE
Definition: types.h:117
#define PACKAGE_VERSION
Definition: config.h:835
static void write_generic_handle_routines(FILE *header)
Definition: header.c:783
static void write_imports(FILE *header, const statement_list_t *stmts)
Definition: header.c:1628
static int for_each_serializable(const statement_list_t *stmts, FILE *header, int(*proc)(FILE *, const type_t *))
Definition: header.c:730
static int write_serialize_function_decl(FILE *header, const type_t *type)
Definition: header.c:719
static void write_user_types(FILE *header)
Definition: header.c:760
static void write_context_handle_rundowns(FILE *header)
Definition: header.c:773
static void write_header_stmts(FILE *header, const statement_list_t *stmts, const type_t *iface, int ignore_funcs)
Definition: header.c:1700
static void write_forward_decls(FILE *header, const statement_list_t *stmts)
Definition: header.c:1660
static int serializable_exists(FILE *header, const type_t *type)
Definition: header.c:725
void start_cplusplus_guard(FILE *fp)
Definition: widl.c:340
int do_header
Definition: widl.c:116
char * header_token
Definition: widl.c:138
void end_cplusplus_guard(FILE *fp)
Definition: widl.c:347
char * header_name
Definition: widl.c:136
char * input_name
Definition: widl.c:133

◆ write_id_data()

void write_id_data ( const statement_list_t stmts)

Definition at line 529 of file widl.c.

530{
531 if (!do_idfile) return;
532
533 idfile = fopen(idfile_name, "w");
534 if (! idfile) {
535 error("Could not open %s for output\n", idfile_name);
536 return;
537 }
538
539 fprintf(idfile, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION);
540 fprintf(idfile, "from %s - Do not edit ***/\n\n", input_idl_name);
541
542 fprintf(idfile, "#ifdef __REACTOS__\n");
543 fprintf(idfile, "#define WIN32_NO_STATUS\n");
544 fprintf(idfile, "#define WIN32_LEAN_AND_MEAN\n");
545 fprintf(idfile, "#endif\n\n");
546
547 fprintf(idfile, "#include <rpc.h>\n");
548 fprintf(idfile, "#include <rpcndr.h>\n\n");
549
550 fprintf(idfile, "#ifdef _MIDL_USE_GUIDDEF_\n\n");
551
552 fprintf(idfile, "#ifndef INITGUID\n");
553 fprintf(idfile, "#define INITGUID\n");
554 fprintf(idfile, "#include <guiddef.h>\n");
555 fprintf(idfile, "#undef INITGUID\n");
556 fprintf(idfile, "#else\n");
557 fprintf(idfile, "#include <guiddef.h>\n");
558 fprintf(idfile, "#endif\n\n");
559
560 fprintf(idfile, "#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\n");
561 fprintf(idfile, " DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)\n\n");
562
563 fprintf(idfile, "#elif defined(__cplusplus)\n\n");
564
565 fprintf(idfile, "#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\n");
566 fprintf(idfile, " EXTERN_C const type DECLSPEC_SELECTANY name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\n\n");
567
568 fprintf(idfile, "#else\n\n");
569
570 fprintf(idfile, "#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\n");
571 fprintf(idfile, " const type DECLSPEC_SELECTANY name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\n\n");
572
573 fprintf(idfile, "#endif\n\n");
575
576 write_id_data_stmts(stmts);
577
578 fprintf(idfile, "\n");
580 fprintf(idfile, "#undef MIDL_DEFINE_GUID\n" );
581
582 fclose(idfile);
583}
int do_idfile
Definition: widl.c:123
char * input_idl_name
Definition: widl.c:134
static void write_id_data_stmts(const statement_list_t *stmts)
Definition: widl.c:492
static FILE * idfile
Definition: widl.c:156
static char * idfile_name
Definition: widl.c:149

◆ write_local_stubs()

void write_local_stubs ( const statement_list_t stmts)

Definition at line 1403 of file header.c.

1404{
1405 FILE *local_stubs;
1406
1407 if (!local_stubs_name) return;
1408
1409 local_stubs = fopen(local_stubs_name, "w");
1410 if (!local_stubs) {
1411 error("Could not open %s for output\n", local_stubs_name);
1412 return;
1413 }
1414 fprintf(local_stubs, "/* call_as/local stubs for %s */\n\n", input_name);
1415 fprintf(local_stubs, "#include <objbase.h>\n");
1416 fprintf(local_stubs, "#include \"%s\"\n\n", header_name);
1417
1418 write_local_stubs_stmts(local_stubs, stmts);
1419
1420 fclose(local_stubs);
1421}
static void write_local_stubs_stmts(FILE *local_stubs, const statement_list_t *stmts)
Definition: header.c:1393
char * local_stubs_name
Definition: widl.c:137

◆ write_proxies()

void write_proxies ( const statement_list_t stmts)

Definition at line 1077 of file proxy.c.

1078{
1079 if (!do_proxies) return;
1080 if (do_everything && !need_proxy_file(stmts)) return;
1081
1082 init_proxy(stmts);
1083 if(!proxy) return;
1084
1085 write_proxy_routines( stmts );
1086 fclose(proxy);
1087}
static void write_proxy_routines(const statement_list_t *stmts)
Definition: proxy.c:922
int need_proxy_file(const statement_list_t *stmts)
Definition: proxy.c:809
static FILE * proxy
Definition: proxy.c:40
static void init_proxy(const statement_list_t *stmts)
Definition: proxy.c:83
int do_proxies
Definition: widl.c:119

◆ write_regscript()

void write_regscript ( const statement_list_t stmts)

Definition at line 237 of file register.c.

238{
239 const type_t *ps_factory;
240
241 if (!do_regscript) return;
242 if (do_everything && !need_proxy_file( stmts )) return;
243
245
246 put_str( indent, "HKCR\n" );
247 put_str( indent++, "{\n" );
248
249 put_str( indent, "NoRemove Interface\n" );
250 put_str( indent++, "{\n" );
251 ps_factory = find_ps_factory( stmts );
252 if (ps_factory) write_interfaces( stmts, ps_factory );
253 put_str( --indent, "}\n" );
254
255 put_str( indent, "NoRemove CLSID\n" );
256 put_str( indent++, "{\n" );
257 write_coclasses( stmts, NULL );
258 put_str( --indent, "}\n" );
259
260 write_progids( stmts );
261 put_str( --indent, "}\n" );
262
263 if (strendswith( regscript_name, ".res" )) /* create a binary resource file */
264 {
265 add_output_to_resources( "WINE_REGISTRY", regscript_token );
267 }
268 else
269 {
270 FILE *f = fopen( regscript_name, "w" );
271 if (!f) error( "Could not open %s for output\n", regscript_name );
273 error( "Failed to write to %s\n", regscript_name );
274 if (fclose( f ))
275 error( "Failed to write to %s\n", regscript_name );
276 }
277}
GLfloat f
Definition: glext.h:7540
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
static const type_t * find_ps_factory(const statement_list_t *stmts)
Definition: register.c:67
static void write_interfaces(const statement_list_t *stmts, const type_t *ps_factory)
Definition: register.c:105
size_t output_buffer_pos
Definition: utils.c:253
void flush_output_resources(const char *name)
Definition: utils.c:341
int strendswith(const char *str, const char *end)
Definition: utils.c:238
void init_output_buffer(void)
Definition: utils.c:272
int do_regscript
Definition: widl.c:122
char * regscript_name
Definition: widl.c:147
char * regscript_token
Definition: widl.c:148

◆ write_server()

void write_server ( const statement_list_t stmts)

Definition at line 536 of file server.c.

537{
538 if (!do_server)
539 return;
540 if (do_everything && !need_stub_files(stmts))
541 return;
542
543 init_server();
544 if (!server)
545 return;
546
547 write_server_routines( stmts );
548 fclose(server);
549}
static void server(void)
Definition: server.c:2011
static void init_server(void)
Definition: server.c:441
static void write_server_routines(const statement_list_t *stmts)
Definition: server.c:498
int do_server
Definition: widl.c:121

◆ write_typelib_regscript()

void write_typelib_regscript ( const statement_list_t stmts)

Definition at line 280 of file register.c.

281{
282 const statement_t *stmt;
283 unsigned int count = 0;
284
285 if (!do_typelib) return;
286 if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry )
287 {
288 if (stmt->type != STMT_LIBRARY) continue;
289 if (count && !strendswith( typelib_name, ".res" ))
290 error( "Cannot store multiple typelibs into %s\n", typelib_name );
291 else
292 {
293 if (do_old_typelib)
294 create_sltg_typelib( stmt->u.lib );
295 else
296 create_msft_typelib( stmt->u.lib );
297 }
298 count++;
299 }
301}
GLuint GLuint GLsizei count
Definition: gl.h:1545
uint32_t entry
Definition: isohybrid.c:63
int create_msft_typelib(typelib_t *typelib)
Definition: write_msft.c:2657
int create_sltg_typelib(typelib_t *typelib)
Definition: write_sltg.c:1831
statement_type_t type
Definition: parser.h:124
typelib_t * lib
Definition: widltypes.h:540
union _statement_t::@5026 u
int do_typelib
Definition: widl.c:117
int do_old_typelib
Definition: widl.c:118
@ STMT_LIBRARY
Definition: widltypes.h:240

Variable Documentation

◆ acf_name

char* acf_name
extern

Definition at line 135 of file widl.c.

Referenced by main().

◆ char_number

int char_number
extern

Referenced by pp_internal_error().

◆ client_name

char* client_name
extern

Definition at line 143 of file widl.c.

Referenced by init_client(), main(), and rm_tempfile().

◆ client_token

char* client_token
extern

Definition at line 144 of file widl.c.

Referenced by main(), and write_client_routines().

◆ debuglevel

int debuglevel
extern

Definition at line 110 of file widl.c.

Referenced by chat(), dump_var_desc(), and main().

◆ dlldata_name

char* dlldata_name
extern

Definition at line 140 of file widl.c.

Referenced by main(), write_dlldata(), and write_dlldata_list().

◆ do_client

int do_client
extern

Definition at line 120 of file widl.c.

Referenced by main(), rm_tempfile(), set_everything(), and write_client().

◆ do_dlldata

int do_dlldata
extern

Definition at line 124 of file widl.c.

Referenced by main(), set_everything(), and write_dlldata().

◆ do_everything

int do_everything
extern

Definition at line 114 of file widl.c.

Referenced by main(), write_client(), write_proxies(), write_regscript(), and write_server().

◆ do_header

int do_header
extern

Definition at line 116 of file widl.c.

Referenced by main(), rm_tempfile(), set_everything(), and write_header().

◆ do_idfile

int do_idfile
extern

Definition at line 123 of file widl.c.

Referenced by main(), rm_tempfile(), set_everything(), and write_id_data().

◆ do_old_typelib

int do_old_typelib
extern

Definition at line 118 of file widl.c.

Referenced by main(), set_everything(), and write_typelib_regscript().

◆ do_proxies

int do_proxies
extern

Definition at line 119 of file widl.c.

Referenced by main(), rm_tempfile(), set_everything(), and write_proxies().

◆ do_regscript

int do_regscript
extern

Definition at line 122 of file widl.c.

Referenced by main(), rm_tempfile(), set_everything(), and write_regscript().

◆ do_server

int do_server
extern

Definition at line 121 of file widl.c.

Referenced by main(), rm_tempfile(), set_everything(), and write_server().

◆ do_typelib

int do_typelib
extern

Definition at line 117 of file widl.c.

Referenced by main(), rm_tempfile(), set_everything(), type_new_struct(), and write_typelib_regscript().

◆ header_name

◆ header_token

char* header_token
extern

Definition at line 138 of file widl.c.

Referenced by main(), and write_header().

◆ input_idl_name

char* input_idl_name
extern

Definition at line 134 of file widl.c.

Referenced by main(), and write_id_data().

◆ input_name

char* input_name
extern

Definition at line 133 of file widl.c.

Referenced by init_client(), init_proxy(), init_server(), main(), write_header(), and write_local_stubs().

◆ line_number

int line_number
extern

Definition at line 154 of file widl.c.

◆ local_stubs_name

char* local_stubs_name
extern

Definition at line 137 of file widl.c.

Referenced by main(), rm_tempfile(), and write_local_stubs().

◆ now

time_t now
extern

Definition at line 65 of file finger.c.

Referenced by __attribute__(), __drv_requiresIRQL(), _Dispatch_type_(), add_special_defines(), adns__fdevents(), adns__internal_submit(), adns__must_gettimeofday(), adns__procdgram(), adns__query_send(), adns__search_next(), adns__tcp_tryconnect(), adns__timeouts(), adns__update_expires(), adns_afterselect(), adns_beforeselect(), adns_check(), adns_firsttimeout(), adns_processany(), adns_processreadable(), adns_processtimeouts(), adns_processwriteable(), adns_submit(), authunix_create(), authunix_refresh(), CertDllVerifyRevocation(), ClasspRetryRequestDpc(), clnt_dg_create(), clnt_vc_create(), collect_connections(), connection_collector(), CoWaitForMultipleHandles(), create_cache_entry(), create_directory_fcb(), create_stream(), create_subvol(), delete_fileref(), delete_reparse_point(), do_create_snapshot(), DSoundRender_DoRenderSample(), duplicate_extents(), Ext2FirstUnusedMcb(), Ext2QueryUnusedBH(), Ext2QueryUnusedFcb(), fd_event(), file_create2(), FTPGetOneF(), FTPUpdateIOTimer(), get_test_year(), GetStartSpoolDate(), gettimeofday(), InitLsMonths(), inter_maxtoabs(), LogOpen(), look_for_roots(), LsCacheLookup(), main(), MediaControl_Run(), mknod(), move_across_subvols(), NetBTWaitForNameResponse(), open_file3(), print_ttl(), QualityControlRender_WaitFor(), query_alloc(), query_simple(), query_submit(), query_usetcp(), queue_current_time(), queue_timer_expire(), readclock_GetTime(), recvd_subvol(), NotifyArea::Refresh(), run_child_process(), SClose(), set_basic_information(), set_file_security(), set_link_information(), set_rename_information(), set_reparse_point2(), set_symlink(), set_zero_data(), SnmpSvcGetUptime(), SRead(), SRecv(), SRecvfrom(), SSend(), SSendto(), SSendtoByName(), stream_set_end_of_file_information(), sw_check_timers(), SWaitUntilReadyForReading(), SWaitUntilReadyForWriting(), SWrite(), tcp_connected(), tcp_events(), test_buffer(), test_buffer8(), test_cache_read(), test_get_state(), test_urlcacheA(), timeouts_queue(), UnDate(), UnLslR(), UnLslRLine(), UnMDTMDate(), UNUSED(), update_chunk_cache(), update_chunk_caches(), urlcache_entry_is_expired(), warp_check(), write_one_file(), write_volume_label(), and WriteDefaultFirewallPrefs().

◆ old_names

int old_names
extern

◆ pedantic

int pedantic
extern

Definition at line 113 of file widl.c.

Referenced by main(), pp_internal_error(), and tt_loader_init().

◆ pointer_size

◆ prefix_client

◆ prefix_server

◆ proxy_name

char* proxy_name
extern

Definition at line 141 of file widl.c.

Referenced by init_proxy(), main(), and rm_tempfile().

◆ proxy_token

char* proxy_token
extern

Definition at line 142 of file widl.c.

Referenced by main(), write_dlldata(), and write_proxy_routines().

◆ regscript_name

char* regscript_name
extern

Definition at line 147 of file widl.c.

Referenced by main(), rm_tempfile(), and write_regscript().

◆ regscript_token

char* regscript_token
extern

Definition at line 148 of file widl.c.

Referenced by main(), and write_regscript().

◆ server_name

◆ server_token

char* server_token
extern

Definition at line 146 of file widl.c.

Referenced by main(), and write_server_routines().

◆ target_cpu

◆ typelib_name

char* typelib_name
extern

◆ use_abi_namespace

int use_abi_namespace
extern

◆ win32_packing

int win32_packing
extern

Definition at line 127 of file widl.c.

Referenced by clamp_align(), and main().

◆ win64_packing

int win64_packing
extern

Definition at line 128 of file widl.c.

Referenced by clamp_align(), and main().

◆ winrt_mode

int winrt_mode
extern

Definition at line 129 of file widl.c.

Referenced by main(), and write_com_interface_end().