47"Usage: widl [options...] infile.idl\n"
48" or: widl [options...] --dlldata-only name1 [name2...]\n"
49" --acf=file Use ACF file\n"
50" -app_config Ignored, present for midl compatibility\n"
51" -b arch Set the target architecture\n"
52" -c Generate client stub\n"
53" -d n Set debug level to 'n'\n"
54" -D id[=val] Define preprocessor identifier id=val\n"
55" -E Preprocess only\n"
56" --help Display this help and exit\n"
57" -h Generate headers\n"
58" -H file Name of header file (default is infile.h)\n"
59" -I path Set include search dir to path (multiple -I allowed)\n"
60" --local-stubs=file Write empty stubs for call_as/local methods to file\n"
61" -m32, -m64 Set the target architecture (Win32 or Win64)\n"
62" -N Do not preprocess input\n"
63" --oldnames Use old naming conventions\n"
64" --oldtlb Use old typelib (SLTG) format\n"
65" -o, --output=NAME Set the output file name\n"
66" -Otype Type of stubs to generate (-Os, -Oi, -Oif)\n"
68" --prefix-all=p Prefix names of client stubs / server functions with 'p'\n"
69" --prefix-client=p Prefix names of client stubs with 'p'\n"
70" --prefix-server=p Prefix names of server functions with 'p'\n"
71" -r Generate registration script\n"
72" -robust Ignored, present for midl compatibility\n"
73" --winrt Enable Windows Runtime mode\n"
74" --ns_prefix Prefix namespaces with ABI namespace\n"
75" -s Generate server stub\n"
76" -t Generate typelib\n"
77" -u Generate interface identifiers file\n"
78" -V Print version and exit\n"
79" -W Enable pedantic warnings\n"
80" --win32, --win64 Set the target architecture (Win32 or Win64)\n"
81" --win32-align n Set win32 structure alignment to 'n'\n"
82" --win64-align n Set win64 structure alignment to 'n'\n"
83"Debug level 'n' is a bitmask with following meaning:\n"
84" * 0x01 Tell which resource is parsed (verbose mode)\n"
85" * 0x02 Dump internal structures\n"
86" * 0x04 Create a parser trace (yydebug=1)\n"
87" * 0x08 Preprocessor messages\n"
88" * 0x10 Preprocessor lex messages\n"
89" * 0x20 Preprocessor yacc trace\n"
93 "Copyright 2002 Ove Kaaven\n";
97#elif defined(__x86_64__)
99#elif defined(__powerpc__)
101#elif defined(__arm__)
103#elif defined(__aarch64__)
106#error Unsupported CPU
183 "b:cC:d:D:EhH:I:m:No:O:pP:rsS:tT:uU:VW";
194 {
"output", 0,
NULL,
'o' },
199 {
"target", 0,
NULL,
'b' },
227 if (slash)
name = slash + 1;
268 char version_str[11];
306 if (!(
p =
strchr( spec,
'-' )))
error(
"Invalid target specification '%s'\n",
target );
308 for (
i = 0;
i <
sizeof(cpu_names)/
sizeof(cpu_names[0]);
i++)
317 error(
"Unrecognized CPU '%s'\n", spec );
341 fprintf(fp,
"#ifdef __cplusplus\n");
342 fprintf(fp,
"extern \"C\" {\n");
348 fprintf(fp,
"#ifdef __cplusplus\n");
386 fprintf(dlldata,
"- Do not edit ***/\n\n");
387 if (define_proxy_delegation)
388 fprintf(dlldata,
"#define PROXY_DELEGATION\n");
390 fprintf(dlldata,
"#ifdef __REACTOS__\n");
391 fprintf(dlldata,
"#define WIN32_NO_STATUS\n");
392 fprintf(dlldata,
"#define WIN32_LEAN_AND_MEAN\n");
393 fprintf(dlldata,
"#endif\n\n");
395 fprintf(dlldata,
"#include <objbase.h>\n");
396 fprintf(dlldata,
"#include <rpcproxy.h>\n\n");
400 fprintf(dlldata,
"EXTERN_PROXY_FILE(%s)\n",
node->filename);
402 fprintf(dlldata,
"\nPROXYFILE_LIST_START\n");
403 fprintf(dlldata,
"/* Start of list */\n");
405 fprintf(dlldata,
" REFERENCE_PROXY_FILE(%s),\n",
node->filename);
406 fprintf(dlldata,
"/* End of list */\n");
407 fprintf(dlldata,
"PROXYFILE_LIST_END\n\n");
409 fprintf(dlldata,
"DLLDATA_ROUTINES(aProxyFileList, GET_DLL_CLSID)\n\n");
424 int define_proxy_delegation = 0;
435 static const char marker[] =
"REFERENCE_PROXY_FILE";
436 static const char delegation_define[] =
"#define PROXY_DELEGATION";
448 while (*
end && *
end !=
')')
457 }
else if (!define_proxy_delegation &&
strncmp(
start, delegation_define,
sizeof(delegation_define)-1)) {
458 define_proxy_delegation = 1;
484 fprintf(
f,
"MIDL_DEFINE_GUID(%s, %s_%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
485 "0x%02x,0x%02x,0x%02x,0x%02x,0x%02x);\n",
507 if (
type->details.iface->async_iface)
559 fprintf(
idfile,
"#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\n");
560 fprintf(
idfile,
" DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)\n\n");
564 fprintf(
idfile,
"#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\n");
565 fprintf(
idfile,
" EXTERN_C const type DECLSPEC_SELECTANY name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\n\n");
569 fprintf(
idfile,
"#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\n");
570 fprintf(
idfile,
" const type DECLSPEC_SELECTANY name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\n\n");
589 char *output_name =
NULL;
643 error(
"Packing must be one of 2, 4 or 8\n");
648 error(
"Packing must be one of 2, 4 or 8\n");
755#ifdef DEFAULT_INCLUDE_DIR
899 chat(
"Starting preprocess\n");
911 error(
"Could not generate a temp name from %s\n",
name);
915 error(
"Could not open fd %s for writing\n",
name);
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strchr(const char *String, int ch)
char * xstrdup(const char *s)
static void list_remove(struct list_entry *entry)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
int wpp_add_define(const char *name, const char *value)
int wpp_parse(const char *input, FILE *output)
static const WCHAR *const ext[]
static const WCHAR version[]
int __cdecl atexit(void(__cdecl *function)(void))
int getopt_long_only(optarg_ctx *o, int argc, WCHAR *const *argv, const WCHAR *shortopts, const struct option *longopts, int *longind)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLsizeiptr const GLvoid GLenum usage
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
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 token
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
_Check_return_ _CRTIMP int __cdecl ferror(_In_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_ _CRTIMP FILE *__cdecl fdopen(_In_ int _FileHandle, _In_z_ const char *_Format)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_CRTIMP void __cdecl setbuf(_Inout_ FILE *_File, _Inout_updates_opt_(BUFSIZ) _Post_readable_size_(0) char *_Buffer)
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
int mkstemps(char *template, int suffix_len)
const char * strerror(int err)
static unsigned __int64 next
int wpp_add_cmdline_define(const char *value)
void wpp_set_debug(int lex_debug, int parser_debug, int msg_debug)
int wpp_add_include_path(const char *path)
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
union _statement_t::@5154 u
const attr_list_t * attrs
static enum type_type type_get_type(const type_t *type)
void start_cplusplus_guard(FILE *fp)
const char * prefix_server
static const char short_options[]
static void free_filename_nodes(struct list *list)
static void rm_tempfile(void)
unsigned int pointer_size
static void set_target(const char *target)
static enum stub_mode stub_mode
static void exit_on_signal(int sig)
static void write_id_guid(FILE *f, const char *type, const char *guid_prefix, const char *name, const UUID *uuid)
static void add_filename_node(struct list *list, const char *name)
static const char version_string[]
static char * eat_space(char *s)
static char * dup_basename_token(const char *name, const char *ext)
static void write_id_data_stmts(const statement_list_t *stmts)
static const struct option long_options[]
static void add_widl_version_define(void)
void write_dlldata(const statement_list_t *stmts)
void end_cplusplus_guard(FILE *fp)
static char * make_token(const char *name)
static void set_everything(int x)
void write_id_data(const statement_list_t *stmts)
static char * idfile_name
static void write_dlldata_list(struct list *filenames, int define_proxy_delegation)
enum stub_mode get_stub_mode(void)
static int preprocess_only
const char * prefix_client
#define DEBUGLEVEL_PPTRACE