ReactOS 0.4.16-dev-1946-g52006dd
widl.c File Reference
#include "config.h"
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include <sys/types.h>
#include "widl.h"
#include "utils.h"
#include "parser.h"
#include "wpp_private.h"
#include "header.h"
Include dependency graph for widl.c:

Go to the source code of this file.

Macros

#define TRYOPEN(str)
 

Enumerations

enum  {
  OLDNAMES_OPTION = CHAR_MAX + 1 , ACF_OPTION , APP_CONFIG_OPTION , DLLDATA_OPTION ,
  DLLDATA_ONLY_OPTION , LOCAL_STUBS_OPTION , NOSTDINC_OPTION , OLD_TYPELIB_OPTION ,
  PACKING_OPTION , PREFIX_ALL_OPTION , PREFIX_CLIENT_OPTION , PREFIX_SERVER_OPTION ,
  PRINT_HELP , RT_NS_PREFIX , RT_OPTION , ROBUST_OPTION ,
  SYSROOT_OPTION , WIN32_OPTION , WIN64_OPTION
}
 

Functions

static void rm_tempfile (void)
 
static charmake_token (const char *name)
 
static chardup_basename_token (const char *name, const char *ext)
 
static void add_widl_version_define (void)
 
static void exit_on_signal (int sig)
 
static void set_everything (int x)
 
void start_cplusplus_guard (FILE *fp)
 
void end_cplusplus_guard (FILE *fp)
 
static void write_dlldata_list (struct strarray filenames, int define_proxy_delegation)
 
static chareat_space (char *s)
 
void write_dlldata (const statement_list_t *stmts)
 
static void write_id_guid (FILE *f, const char *type, const char *guid_prefix, const char *name, const struct uuid *uuid)
 
static void write_id_data_stmts (const statement_list_t *stmts)
 
void write_id_data (const statement_list_t *stmts)
 
static void option_callback (int optc, char *optarg)
 
int open_typelib (const char *name)
 
int main (int argc, char *argv[])
 
charfind_input_file (const char *name, const char *parent)
 
FILEopen_input_file (const char *path)
 

Variables

static const char usage []
 
static const char version_string []
 
struct target target = { 0 }
 
int debuglevel = DEBUGLEVEL_NONE
 
int parser_debug
 
int yy_flex_debug
 
int pedantic = 0
 
int do_everything = 1
 
static int preprocess_only = 0
 
int do_header = 0
 
int do_typelib = 0
 
int do_proxies = 0
 
int do_client = 0
 
int do_server = 0
 
int do_regscript = 0
 
int do_idfile = 0
 
int do_dlldata = 0
 
static int no_preprocess = 0
 
int old_names = 0
 
int old_typelib = 0
 
int winrt_mode = 0
 
int interpreted_mode = 1
 
int use_abi_namespace = 0
 
static int stdinc = 1
 
charinput_name
 
charidl_name
 
characf_name
 
charheader_name
 
charlocal_stubs_name
 
charheader_token
 
chartypelib_name
 
chardlldata_name
 
charproxy_name
 
charproxy_token
 
charclient_name
 
charclient_token
 
charserver_name
 
charserver_token
 
charregscript_name
 
charregscript_token
 
static charidfile_name
 
struct strarray temp_files = { 0 }
 
const chartemp_dir = NULL
 
const charprefix_client = ""
 
const charprefix_server = ""
 
static const charbindir
 
static const charlibdir
 
static const charincludedir
 
static struct strarray dlldirs
 
static charoutput_name
 
static const charsysroot = ""
 
static FILEidfile
 
unsigned int packing = 8
 
unsigned int pointer_size = 0
 
time_t now
 
static const char short_options []
 
static const struct long_option long_options []
 

Macro Definition Documentation

◆ TRYOPEN

#define TRYOPEN (   str)
Value:
do { \
char *file = str; \
if ((fd = open( file, O_RDONLY | O_BINARY )) != -1) return fd; \
free( file ); } while(0)
#define O_BINARY
Definition: acwin.h:109
#define O_RDONLY
Definition: acwin.h:108
#define open
Definition: acwin.h:95
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
return
Definition: dirsup.c:529
#define free
Definition: debug_ros.c:5
const WCHAR * str
static int fd
Definition: io.c:51
Definition: fci.c:127

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OLDNAMES_OPTION 
ACF_OPTION 
APP_CONFIG_OPTION 
DLLDATA_OPTION 
DLLDATA_ONLY_OPTION 
LOCAL_STUBS_OPTION 
NOSTDINC_OPTION 
OLD_TYPELIB_OPTION 
PACKING_OPTION 
PREFIX_ALL_OPTION 
PREFIX_CLIENT_OPTION 
PREFIX_SERVER_OPTION 
PRINT_HELP 
RT_NS_PREFIX 
RT_OPTION 
ROBUST_OPTION 
SYSROOT_OPTION 
WIN32_OPTION 
WIN64_OPTION 

Definition at line 151 of file widl.c.

151 {
166 RT_OPTION,
171};
#define CHAR_MAX
Definition: limits.h:32
@ DLLDATA_ONLY_OPTION
Definition: widl.c:156
@ LOCAL_STUBS_OPTION
Definition: widl.c:157
@ OLD_TYPELIB_OPTION
Definition: widl.c:159
@ OLDNAMES_OPTION
Definition: widl.c:152
@ ACF_OPTION
Definition: widl.c:153
@ RT_NS_PREFIX
Definition: widl.c:165
@ APP_CONFIG_OPTION
Definition: widl.c:154
@ NOSTDINC_OPTION
Definition: widl.c:158
@ PREFIX_SERVER_OPTION
Definition: widl.c:163
@ PREFIX_ALL_OPTION
Definition: widl.c:161
@ ROBUST_OPTION
Definition: widl.c:167
@ PREFIX_CLIENT_OPTION
Definition: widl.c:162
@ PRINT_HELP
Definition: widl.c:164
@ WIN64_OPTION
Definition: widl.c:170
@ SYSROOT_OPTION
Definition: widl.c:168
@ DLLDATA_OPTION
Definition: widl.c:155
@ WIN32_OPTION
Definition: widl.c:169
@ RT_OPTION
Definition: widl.c:166
@ PACKING_OPTION
Definition: widl.c:160

Function Documentation

◆ add_widl_version_define()

static void add_widl_version_define ( void  )
static

Definition at line 225 of file widl.c.

226{
227 char version_str[32];
228 unsigned int version;
229 const char *p = PACKAGE_VERSION;
230
231 /* major */
232 version = atoi(p) * 0x10000;
233 p = strchr(p, '.');
234
235 /* minor */
236 if (p)
237 {
238 version += atoi(p + 1) * 0x100;
239 p = strchr(p + 1, '.');
240 }
241
242 /* build */
243 if (p)
244 version += atoi(p + 1);
245
246 snprintf(version_str, sizeof(version_str), "__WIDL__=0x%x", version);
247 wpp_add_cmdline_define(version_str);
248}
char * strchr(const char *String, int ch)
Definition: utclib.c:501
static const WCHAR version[]
Definition: asmname.c:66
GLfloat GLfloat p
Definition: glext.h:8902
#define PACKAGE_VERSION
Definition: config.h:835
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
int wpp_add_cmdline_define(const char *value)
Definition: wpp.c:588
#define snprintf
Definition: wintirpc.h:48

Referenced by main().

◆ dup_basename_token()

static char * dup_basename_token ( const char name,
const char ext 
)
static

Definition at line 217 of file widl.c.

218{
219 char *p, *ret = replace_extension( get_basename(name), ext, "" );
220 /* map invalid characters to '_' */
221 for (p = ret; *p; p++) if (!isalnum(*p)) *p = '_';
222 return ret;
223}
static const WCHAR *const ext[]
Definition: module.c:53
return ret
Definition: mutex.c:146
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
static char * get_basename(const char *file)
Definition: tools.h:307
static char * replace_extension(const char *name, const char *old_ext, const char *new_ext)
Definition: tools.h:328
Definition: name.c:39

Referenced by main().

◆ eat_space()

static char * eat_space ( char s)
static

Definition at line 322 of file widl.c.

323{
324 while (isspace((unsigned char) *s))
325 ++s;
326 return s;
327}
#define isspace(c)
Definition: acclib.h:69
GLdouble s
Definition: gl.h:2039

Referenced by write_dlldata().

◆ end_cplusplus_guard()

void end_cplusplus_guard ( FILE fp)

Definition at line 275 of file widl.c.

276{
277 fprintf(fp, "#ifdef __cplusplus\n");
278 fprintf(fp, "}\n");
279 fprintf(fp, "#endif\n\n");
280}
_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().

◆ exit_on_signal()

static void exit_on_signal ( int  sig)
static

Definition at line 251 of file widl.c.

252{
253 exit(1); /* this will call the atexit functions */
254}
#define exit(n)
Definition: config.h:202

Referenced by main().

◆ find_input_file()

char * find_input_file ( const char name,
const char parent 
)

Definition at line 888 of file widl.c.

889{
890 char *path;
891
892 /* don't search for a file name with a path in the include directories, for compatibility with MIDL */
893 if (strchr( name, '/' ) || strchr( name, '\\' )) path = xstrdup( name );
894 else if (!(path = wpp_find_include( name, parent ))) error_loc( "Unable to open include file %s\n", name );
895
896 return path;
897}
char * xstrdup(const char *s)
Definition: uimain.c:768
r parent
Definition: btrfs.c:3010
#define error_loc(...)
Definition: utils.h:29
char * wpp_find_include(const char *name, const char *parent_name)
Definition: wpp.c:315

◆ main()

int main ( int argc  ,
char argv[] 
)

Definition at line 705 of file widl.c.

706{
707 int i;
708 int ret = 0;
709 struct strarray files;
710
712 bindir = get_bindir( argv[0] );
713 libdir = get_libdir( bindir );
714 includedir = get_includedir( bindir );
716
717 now = time(NULL);
718
720
721#ifndef __REACTOS__
722 if (stdinc)
723 {
724 static const char *incl_dirs[] = { INCLUDEDIR, "/usr/include", "/usr/local/include" };
725
726 if (includedir)
727 {
728 wpp_add_include_path( strmake( "%s/wine/msvcrt", includedir ));
729 wpp_add_include_path( strmake( "%s/wine/windows", includedir ));
730 }
731 for (i = 0; i < ARRAY_SIZE(incl_dirs); i++)
732 {
733 if (i && !strcmp( incl_dirs[i], incl_dirs[0] )) continue;
734 wpp_add_include_path( strmake( "%s%s/wine/msvcrt", sysroot, incl_dirs[i] ));
735 wpp_add_include_path( strmake( "%s%s/wine/windows", sysroot, incl_dirs[i] ));
736 }
737 }
738#endif
739
740 if (pointer_size)
742 else
744
745 /* if nothing specified, try to guess output type from the output file name */
748 {
749 do_everything = 0;
750 if (strendswith( output_name, ".h" )) do_header = 1;
751 else if (strendswith( output_name, ".tlb" )) do_typelib = 1;
752 else if (strendswith( output_name, "_p.c" )) do_proxies = 1;
753 else if (strendswith( output_name, "_c.c" )) do_client = 1;
754 else if (strendswith( output_name, "_s.c" )) do_server = 1;
755 else if (strendswith( output_name, "_i.c" )) do_idfile = 1;
756 else if (strendswith( output_name, "_r.res" )) do_regscript = 1;
757 else if (strendswith( output_name, "_t.res" )) do_typelib = 1;
758 else if (strendswith( output_name, "_l.res" )) do_typelib = 1;
759 else if (strendswith( output_name, "dlldata.c" )) do_dlldata = 1;
760 else do_everything = 1;
761 }
762
763 if(do_everything) {
765 }
766
769 {
778 }
779
780 if (!dlldata_name && do_dlldata)
781 dlldata_name = xstrdup("dlldata.c");
782
783 if (files.count) {
784 if (do_dlldata && !do_everything) {
785 struct strarray filenames = empty_strarray;
786 for (i = 0; i < files.count; i++)
787 strarray_add(&filenames, replace_extension( get_basename( files.str[i] ), ".idl", "" ));
788
789 write_dlldata_list(filenames, 0 /* FIXME */ );
790 return 0;
791 }
792 else if (files.count > 1) {
793 fprintf(stderr, "%s", usage);
794 return 1;
795 }
796 else
797 {
798 input_name = xstrdup( files.str[0] );
800 }
801 }
802 else {
803 fprintf(stderr, "%s", usage);
804 return 1;
805 }
806
807 if(debuglevel)
808 {
811 }
812
815
818 (debuglevel & DEBUGLEVEL_PPMSG) != 0 );
819
820 if (!header_name)
822
823 if (!typelib_name && do_typelib)
825
826 if (!proxy_name && do_proxies)
828
829 if (!client_name && do_client)
831
832 if (!server_name && do_server)
834
837
838 if (!idfile_name && do_idfile)
840
845
847 wpp_add_cmdline_define("_WIN32=1");
848
852
854
855 init_types();
856 ret = parser_parse();
858 if (ret) exit(1);
859
860 /* Everything has been done successfully, don't delete any files. */
863
864 return 0;
865}
static int argc
Definition: ServiceArgs.c:12
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define ARRAY_SIZE(A)
Definition: main.h:20
void parse_options(struct packet *)
Definition: options.c:59
int wpp_parse(const char *input, FILE *output)
Definition: compiler.c:437
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
int __cdecl atexit(void(__cdecl *function)(void))
Definition: stubs.c:10
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
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
#define stdout
Definition: stdio.h:99
#define stderr
Definition: stdio.h:100
_CRTIMP void __cdecl setbuf(_Inout_ FILE *_File, _Inout_updates_opt_(BUFSIZ) _Post_readable_size_(0) char *_Buffer)
__u16 time
Definition: mkdosfs.c:8
char * strmake(size_t *lenp,...)
Definition: util.c:82
#define argv
Definition: mplay32.c:18
static void strarray_add(struct strarray *array, const char *str)
Definition: tools.h:183
static char * get_bindir(const char *argv0)
Definition: tools.h:702
static int strendswith(const char *str, const char *end)
Definition: tools.h:145
static void set_target_ptr_size(struct target *target, unsigned int size)
Definition: tools.h:538
static const struct strarray empty_strarray
Definition: tools.h:181
static void init_signals(void(*cleanup)(int))
Definition: tools.h:455
static unsigned int get_target_ptr_size(struct target target)
Definition: tools.h:524
static struct target init_argv0_target(const char *argv0)
Definition: tools.h:689
int parser_parse(void)
FILE * parser_in
void close_all_inputs(void)
Definition: tools.h:99
static void write_dlldata_list(struct strarray filenames, int define_proxy_delegation)
Definition: widl.c:282
int do_header
Definition: widl.c:100
static const char short_options[]
Definition: widl.c:173
int parser_debug
Definition: widl.c:95
static const char * bindir
Definition: widl.c:137
int do_idfile
Definition: widl.c:106
static const char * libdir
Definition: widl.c:138
static const char * sysroot
Definition: widl.c:142
int do_regscript
Definition: widl.c:105
char * client_token
Definition: widl.c:127
time_t now
Definition: widl.c:149
char * typelib_name
Definition: widl.c:122
static void rm_tempfile(void)
Definition: widl.c:867
unsigned int pointer_size
Definition: widl.c:147
int do_server
Definition: widl.c:104
char * dlldata_name
Definition: widl.c:123
char * server_name
Definition: widl.c:128
int do_everything
Definition: widl.c:98
char * proxy_name
Definition: widl.c:124
static void exit_on_signal(int sig)
Definition: widl.c:251
static const char * includedir
Definition: widl.c:139
static char * output_name
Definition: widl.c:141
static void option_callback(int optc, char *optarg)
Definition: widl.c:487
static int stdinc
Definition: widl.c:114
FILE * open_input_file(const char *path)
Definition: widl.c:899
char * local_stubs_name
Definition: widl.c:120
int yy_flex_debug
Definition: widl.c:95
char * regscript_name
Definition: widl.c:130
char * header_token
Definition: widl.c:121
int do_typelib
Definition: widl.c:101
static char * dup_basename_token(const char *name, const char *ext)
Definition: widl.c:217
char * idl_name
Definition: widl.c:117
static const struct long_option long_options[]
Definition: widl.c:175
char * server_token
Definition: widl.c:129
static void add_widl_version_define(void)
Definition: widl.c:225
int do_proxies
Definition: widl.c:102
char * regscript_token
Definition: widl.c:131
char * client_name
Definition: widl.c:126
char * proxy_token
Definition: widl.c:125
static char * make_token(const char *name)
Definition: widl.c:203
static void set_everything(int x)
Definition: widl.c:256
static char * idfile_name
Definition: widl.c:132
int do_client
Definition: widl.c:103
int debuglevel
Definition: widl.c:94
int do_dlldata
Definition: widl.c:107
static int preprocess_only
Definition: widl.c:99
char * header_name
Definition: widl.c:119
char * input_name
Definition: widl.c:116
#define DEBUGLEVEL_PPMSG
Definition: widl.h:34
#define DEBUGLEVEL_PPTRACE
Definition: widl.h:36
#define DEBUGLEVEL_PPLEX
Definition: widl.h:35
#define DEBUGLEVEL_TRACE
Definition: widl.h:33
void init_types(void)
void wpp_set_debug(int lex_debug, int parser_debug, int msg_debug)
Definition: wpp.c:601
int wpp_add_include_path(const char *path)
Definition: wpp.c:298

◆ make_token()

static char * make_token ( const char name)
static

Definition at line 203 of file widl.c.

204{
205 char *token;
206 int i;
207
209 for (i=0; token[i]; i++) {
210 if (!isalnum(token[i])) token[i] = '_';
211 else token[i] = tolower(token[i]);
212 }
213 return token;
214}
int tolower(int c)
Definition: utclib.c:902
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
Definition: glfuncs.h:210

Referenced by main().

◆ open_input_file()

FILE * open_input_file ( const char path)

Definition at line 899 of file widl.c.

900{
901 FILE *file;
902 char *name;
903 int ret;
904
905 if (no_preprocess)
906 {
907 if (!(file = fopen( path, "r" ))) error_loc( "Unable to open %s\n", path );
908 return file;
909 }
910
911 name = make_temp_file( "widl", NULL );
912 if (!(file = fopen( name, "wt" ))) error_loc( "Could not open %s for writing\n", name );
913 ret = wpp_parse( path, file );
914 fclose( file );
915 if (ret) exit( 1 );
916
917 if (!(file = fopen( name, "r" ))) error_loc( "Unable to open %s\n", name );
918 return file;
919}
_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)
static char * make_temp_file(const char *prefix, const char *suffix)
Definition: tools.h:407
static int no_preprocess
Definition: widl.c:108

Referenced by main().

◆ open_typelib()

int open_typelib ( const char name)

Definition at line 650 of file widl.c.

651{
652#ifndef __REACTOS__
653 static const char *default_dirs[] = { LIBDIR "/wine", "/usr/lib/wine", "/usr/local/lib/wine" };
654#endif
655 struct target win_target = { target.cpu, PLATFORM_WINDOWS };
656 const char *pe_dir = get_arch_dir( win_target );
657 int fd;
658 unsigned int i;
659
660#define TRYOPEN(str) do { \
661 char *file = str; \
662 if ((fd = open( file, O_RDONLY | O_BINARY )) != -1) return fd; \
663 free( file ); } while(0)
664
665 for (i = 0; i < dlldirs.count; i++)
666 {
667 if (strendswith( dlldirs.str[i], "/*" )) /* special case for wine build tree */
668 {
669 int namelen = strlen( name );
670 if (strendswith( name, ".dll" )) namelen -= 4;
671 TRYOPEN( strmake( "%.*s/%.*s%s/%s", (int)strlen(dlldirs.str[i]) - 2, dlldirs.str[i],
672 namelen, name, pe_dir, name ));
673 }
674 else
675 {
676 TRYOPEN( strmake( "%s%s/%s", dlldirs.str[i], pe_dir, name ));
677 TRYOPEN( strmake( "%s/%s", dlldirs.str[i], name ));
678 }
679 }
680
681#ifndef __REACTOS__
682 if (stdinc)
683 {
684 if (libdir)
685 {
686 TRYOPEN( strmake( "%s/wine%s/%s", libdir, pe_dir, name ));
687 TRYOPEN( strmake( "%s/wine/%s", libdir, name ));
688 }
689 for (i = 0; i < ARRAY_SIZE(default_dirs); i++)
690 {
691 if (i && !strcmp( default_dirs[i], default_dirs[0] )) continue;
692 TRYOPEN( strmake( "%s%s/%s", default_dirs[i], pe_dir, name ));
693 }
694 }
695#endif
696
697 error( "cannot find %s\n", name );
698#undef TRYOPEN
699
700#ifdef __REACTOS__
701 return 1;
702#endif
703}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define LIBDIR
Definition: create_nls.c:23
GLint namelen
Definition: glext.h:7232
#define error(str)
Definition: mkdosfs.c:1605
static const char * get_arch_dir(struct target target)
Definition: tools.h:616
@ PLATFORM_WINDOWS
Definition: tools.h:110
enum target::@5352 cpu
static struct strarray dlldirs
Definition: widl.c:140
#define TRYOPEN(str)

Referenced by read_importlib().

◆ option_callback()

static void option_callback ( int  optc,
char optarg 
)
static

Definition at line 487 of file widl.c.

488{
489 switch (optc)
490 {
491 case DLLDATA_OPTION:
493 break;
495 do_everything = 0;
496 do_dlldata = 1;
497 break;
499 do_everything = 0;
501 break;
502 case NOSTDINC_OPTION:
503 stdinc = 0;
504 break;
505 case OLDNAMES_OPTION:
506 old_names = 1;
507 break;
511 break;
514 break;
517 break;
518 case PRINT_HELP:
519 fprintf(stderr, "%s", usage);
520 exit(0);
521 case RT_OPTION:
522 winrt_mode = 1;
523 break;
524 case RT_NS_PREFIX:
526 break;
527 case SYSROOT_OPTION:
529 break;
530 case WIN32_OPTION:
531 pointer_size = 4;
532 break;
533 case WIN64_OPTION:
534 pointer_size = 8;
535 break;
536 case PACKING_OPTION:
537 packing = strtol(optarg, NULL, 0);
538 if(packing != 2 && packing != 4 && packing != 8)
539 error("Structure packing must be one of 2, 4 or 8\n");
540 break;
541 case ACF_OPTION:
543 break;
545 /* widl does not distinguish between app_mode and default mode,
546 but we ignore this option for midl compatibility */
547 break;
548 case ROBUST_OPTION:
549 /* FIXME: Support robust option */
550 break;
551 case 'b':
552 if (!parse_target( optarg, &target ))
553 error( "Invalid target specification '%s'\n", optarg );
554 break;
555 case 'c':
556 do_everything = 0;
557 do_client = 1;
558 break;
559 case 'C':
561 break;
562 case 'd':
564 break;
565 case 'D':
567 break;
568 case 'E':
569 do_everything = 0;
570 preprocess_only = 1;
571 break;
572 case 'h':
573 do_everything = 0;
574 do_header = 1;
575 break;
576 case 'H':
578 break;
579 case 'I':
581 break;
582 case 'L':
584 break;
585 case 'm':
586 if (!strcmp( optarg, "32" )) pointer_size = 4;
587 else if (!strcmp( optarg, "64" )) pointer_size = 8;
588 break;
589 case 'N':
590 no_preprocess = 1;
591 break;
592 case 'o':
594 break;
595 case 'O':
596 if (!strcmp( optarg, "s" )) interpreted_mode = 0;
597 else if (!strcmp( optarg, "i" )) interpreted_mode = 1;
598 else if (!strcmp( optarg, "ic" )) interpreted_mode = 1;
599 else if (!strcmp( optarg, "if" )) interpreted_mode = 1;
600 else if (!strcmp( optarg, "icf" )) interpreted_mode = 1;
601 else error( "Invalid argument '-O%s'\n", optarg );
602 break;
603 case 'p':
604 do_everything = 0;
605 do_proxies = 1;
606 break;
607 case 'P':
609 break;
610 case 'r':
611 do_everything = 0;
612 do_regscript = 1;
613 break;
614 case 's':
615 do_everything = 0;
616 do_server = 1;
617 break;
618 case 'S':
620 break;
621 case 't':
622 do_everything = 0;
623 do_typelib = 1;
624 break;
626 old_typelib = 1;
627 break;
628 case 'T':
630 break;
631 case 'u':
632 do_everything = 0;
633 do_idfile = 1;
634 break;
635 case 'U':
637 break;
638 case 'V':
639 printf("%s", version_string);
640 exit(0);
641 case 'W':
642 pedantic = 1;
643 break;
644 case '?':
645 fprintf(stderr, "widl: %s\n\n%s", optarg, usage);
646 exit(1);
647 }
648}
const char * optarg
Definition: getopt.c:49
#define printf
Definition: freeldr.h:97
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
static int parse_target(const char *name, struct target *target)
Definition: tools.h:640
unsigned int packing
Definition: widl.c:146
char * acf_name
Definition: widl.c:118
const char * prefix_server
Definition: widl.c:136
int use_abi_namespace
Definition: widl.c:113
int interpreted_mode
Definition: widl.c:112
static const char version_string[]
Definition: widl.c:89
int old_names
Definition: widl.c:109
int winrt_mode
Definition: widl.c:111
int old_typelib
Definition: widl.c:110
int pedantic
Definition: widl.c:97
const char * prefix_client
Definition: widl.c:135

Referenced by main().

◆ rm_tempfile()

static void rm_tempfile ( void  )
static

Definition at line 867 of file widl.c.

868{
869 if (do_header)
873 if (do_client)
875 if (do_server)
877 if (do_regscript)
879 if (do_idfile)
881 if (do_proxies)
883 if (do_typelib)
886}
#define unlink
Definition: syshdrs.h:54
static void remove_temp_files(void)
Definition: tools.h:446

Referenced by main().

◆ set_everything()

static void set_everything ( int  x)
static

Definition at line 256 of file widl.c.

257{
258 do_header = x;
259 do_typelib = x;
260 do_proxies = x;
261 do_client = x;
262 do_server = x;
263 do_regscript = x;
264 do_idfile = x;
265 do_dlldata = x;
266}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

Referenced by main().

◆ start_cplusplus_guard()

void start_cplusplus_guard ( FILE fp)

Definition at line 268 of file widl.c.

269{
270 fprintf(fp, "#ifdef __cplusplus\n");
271 fprintf(fp, "extern \"C\" {\n");
272 fprintf(fp, "#endif\n\n");
273}

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

◆ write_dlldata()

void write_dlldata ( const statement_list_t stmts)

Definition at line 329 of file widl.c.

330{
331 struct strarray filenames = empty_strarray;
332 int define_proxy_delegation = 0;
333 FILE *dlldata;
334
335 if (!do_dlldata || !need_proxy_file(stmts))
336 return;
337
338 define_proxy_delegation = need_proxy_delegation(stmts);
339
340 dlldata = fopen(dlldata_name, "r");
341 if (dlldata) {
342 static const char marker[] = "REFERENCE_PROXY_FILE";
343 static const char delegation_define[] = "#define PROXY_DELEGATION";
344 char *line = NULL;
345 size_t len = 0;
346
347 while (widl_getline(&line, &len, dlldata)) {
348 char *start, *end;
350 if (strncmp(start, marker, sizeof marker - 1) == 0) {
351 start = eat_space(start + sizeof marker - 1);
352 if (*start != '(')
353 continue;
354 end = start = eat_space(start + 1);
355 while (*end && *end != ')')
356 ++end;
357 if (*end != ')')
358 continue;
359 while (isspace((unsigned char) end[-1]))
360 --end;
361 *end = '\0';
362 if (start < end)
363 strarray_add(&filenames, replace_extension( get_basename( start ), ".idl", "" ));
364 }else if (!define_proxy_delegation && strncmp(start, delegation_define, sizeof(delegation_define)-1)) {
365 define_proxy_delegation = 1;
366 }
367 }
368
369 if (ferror(dlldata))
370 error("couldn't read from %s: %s\n", dlldata_name, strerror(errno));
371
372 free(line);
373 fclose(dlldata);
374 }
375
376 if (strarray_exists( &filenames, proxy_token ))
377 /* We're already in the list, no need to regenerate this file. */
378 return;
379
380 strarray_add(&filenames, proxy_token);
381 write_dlldata_list(filenames, define_proxy_delegation);
382}
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
Definition: utclib.c:534
GLuint start
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
GLenum GLsizei len
Definition: glext.h:6722
_Check_return_ _CRTIMP int __cdecl ferror(_In_ FILE *_File)
int marker
Definition: jpeglib.h:1030
const char * strerror(int err)
Definition: compat_str.c:23
#define errno
Definition: errno.h:18
static int strarray_exists(const struct strarray *array, const char *str)
Definition: tools.h:201
int need_proxy_delegation(const statement_list_t *stmts)
Definition: proxy.c:809
int need_proxy_file(const statement_list_t *stmts)
Definition: proxy.c:804
size_t widl_getline(char **linep, size_t *lenp, FILE *fp)
Definition: utils.c:91
Definition: parser.c:49
static char * eat_space(char *s)
Definition: widl.c:322

◆ write_dlldata_list()

static void write_dlldata_list ( struct strarray  filenames,
int  define_proxy_delegation 
)
static

Definition at line 282 of file widl.c.

283{
284 FILE *dlldata;
285 unsigned int i;
286
287 dlldata = fopen(dlldata_name, "w");
288 if (!dlldata)
289 error("couldn't open %s: %s\n", dlldata_name, strerror(errno));
290
291 fprintf(dlldata, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION);
292 fprintf(dlldata, "- Do not edit ***/\n\n");
293 if (define_proxy_delegation)
294 fprintf(dlldata, "#define PROXY_DELEGATION\n");
295
296#ifdef __REACTOS__
297 fprintf(dlldata, "#ifdef __REACTOS__\n");
298 fprintf(dlldata, "#define WIN32_NO_STATUS\n");
299 fprintf(dlldata, "#define WIN32_LEAN_AND_MEAN\n");
300 fprintf(dlldata, "#endif\n\n");
301#endif
302
303 fprintf(dlldata, "#include <objbase.h>\n");
304 fprintf(dlldata, "#include <rpcproxy.h>\n\n");
305 start_cplusplus_guard(dlldata);
306
307 for (i = 0; i < filenames.count; i++)
308 fprintf(dlldata, "EXTERN_PROXY_FILE(%s)\n", filenames.str[i]);
309
310 fprintf(dlldata, "\nPROXYFILE_LIST_START\n");
311 fprintf(dlldata, "/* Start of list */\n");
312 for (i = 0; i < filenames.count; i++)
313 fprintf(dlldata, " REFERENCE_PROXY_FILE(%s),\n", filenames.str[i]);
314 fprintf(dlldata, "/* End of list */\n");
315 fprintf(dlldata, "PROXYFILE_LIST_END\n\n");
316
317 fprintf(dlldata, "DLLDATA_ROUTINES(aProxyFileList, GET_DLL_CLSID)\n\n");
318 end_cplusplus_guard(dlldata);
319 fclose(dlldata);
320}
unsigned int count
Definition: tools.h:176
const char ** str
Definition: tools.h:178
void start_cplusplus_guard(FILE *fp)
Definition: widl.c:268
void end_cplusplus_guard(FILE *fp)
Definition: widl.c:275

Referenced by main(), and write_dlldata().

◆ write_id_data()

void write_id_data ( const statement_list_t stmts)

Definition at line 431 of file widl.c.

432{
433 if (!do_idfile) return;
434
435 idfile = fopen(idfile_name, "w");
436 if (! idfile) {
437 error("Could not open %s for output\n", idfile_name);
438 return;
439 }
440
441 fprintf(idfile, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION);
442 fprintf(idfile, "from %s - Do not edit ***/\n\n", idl_name);
443#ifdef __REACTOS__
444 fprintf(idfile, "#ifdef __REACTOS__\n");
445 fprintf(idfile, "#define WIN32_NO_STATUS\n");
446 fprintf(idfile, "#define WIN32_LEAN_AND_MEAN\n");
447 fprintf(idfile, "#endif\n\n");
448#endif
449 fprintf(idfile, "#include <rpc.h>\n");
450 fprintf(idfile, "#include <rpcndr.h>\n\n");
451
452 fprintf(idfile, "#ifdef _MIDL_USE_GUIDDEF_\n\n");
453
454 fprintf(idfile, "#ifndef INITGUID\n");
455 fprintf(idfile, "#define INITGUID\n");
456 fprintf(idfile, "#include <guiddef.h>\n");
457 fprintf(idfile, "#undef INITGUID\n");
458 fprintf(idfile, "#else\n");
459 fprintf(idfile, "#include <guiddef.h>\n");
460 fprintf(idfile, "#endif\n\n");
461
462 fprintf(idfile, "#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\n");
463 fprintf(idfile, " DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)\n\n");
464
465 fprintf(idfile, "#elif defined(__cplusplus)\n\n");
466
467 fprintf(idfile, "#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\n");
468 fprintf(idfile, " EXTERN_C const type DECLSPEC_SELECTANY name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\n\n");
469
470 fprintf(idfile, "#else\n\n");
471
472 fprintf(idfile, "#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\n");
473 fprintf(idfile, " const type DECLSPEC_SELECTANY name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\n\n");
474
475 fprintf(idfile, "#endif\n\n");
477
478 write_id_data_stmts(stmts);
479
480 fprintf(idfile, "\n");
482 fprintf(idfile, "#undef MIDL_DEFINE_GUID\n" );
483
484 fclose(idfile);
485}
static void write_id_data_stmts(const statement_list_t *stmts)
Definition: widl.c:394
static FILE * idfile
Definition: widl.c:144

◆ write_id_data_stmts()

static void write_id_data_stmts ( const statement_list_t stmts)
static

Definition at line 394 of file widl.c.

395{
396 const statement_t *stmt;
397 if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry )
398 {
399 if (stmt->type == STMT_TYPE)
400 {
401 const type_t *type = stmt->u.type;
403 {
404 const struct uuid *uuid;
405 if (!is_object(type) && !is_attr(type->attrs, ATTR_DISPINTERFACE))
406 continue;
407 uuid = get_attrp(type->attrs, ATTR_UUID);
408 write_id_guid(idfile, "IID", is_attr(type->attrs, ATTR_DISPINTERFACE) ? "DIID" : "IID",
409 type->name, uuid);
411 {
414 }
415 }
416 else if (type_get_type(type) == TYPE_COCLASS)
417 {
418 const struct uuid *uuid = get_attrp(type->attrs, ATTR_UUID);
419 write_id_guid(idfile, "CLSID", "CLSID", type->name, uuid);
420 }
421 }
422 else if (stmt->type == STMT_LIBRARY)
423 {
424 const struct uuid *uuid = get_attrp(stmt->u.lib->attrs, ATTR_UUID);
425 write_id_guid(idfile, "IID", "LIBID", stmt->u.lib->name, uuid);
427 }
428 }
429}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
Definition: msctf.idl:532
uint32_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
void * get_attrp(const attr_list_t *list, enum attr_type attr_type)
Definition: attribute.c:87
int is_attr(const attr_list_t *list, enum attr_type attr_type)
Definition: attribute.c:45
int is_object(const type_t *iface)
Definition: header.c:972
statement_type_t type
Definition: parser.h:124
typelib_t * lib
Definition: widltypes.h:632
union _statement_t::@5358 u
statement_list_t * stmts
Definition: widltypes.h:613
const attr_list_t * attrs
Definition: widltypes.h:611
char * name
Definition: widltypes.h:610
static enum type_type type_get_type(const type_t *type)
Definition: typetree.h:113
static type_t * type_iface_get_async_iface(const type_t *type)
Definition: typetree.h:222
static void write_id_guid(FILE *f, const char *type, const char *guid_prefix, const char *name, const struct uuid *uuid)
Definition: widl.c:384
@ TYPE_COCLASS
Definition: widltypes.h:486
@ TYPE_INTERFACE
Definition: widltypes.h:488
@ ATTR_UUID
Definition: widltypes.h:182
@ ATTR_DISPINTERFACE
Definition: widltypes.h:103
@ STMT_TYPE
Definition: widltypes.h:267
@ STMT_LIBRARY
Definition: widltypes.h:265

Referenced by write_id_data(), and write_id_data_stmts().

◆ write_id_guid()

static void write_id_guid ( FILE f,
const char type,
const char guid_prefix,
const char name,
const struct uuid uuid 
)
static

Definition at line 384 of file widl.c.

385{
386 if (!uuid) return;
387 fprintf(f, "MIDL_DEFINE_GUID(%s, %s_%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
388 "0x%02x,0x%02x,0x%02x,0x%02x,0x%02x);\n",
389 type, guid_prefix, name, uuid->Data1, uuid->Data2, uuid->Data3, uuid->Data4[0],
390 uuid->Data4[1], uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5],
391 uuid->Data4[6], uuid->Data4[7]);
392}
GLfloat f
Definition: glext.h:7540
unsigned short Data3
Definition: widltypes.h:34
unsigned int Data1
Definition: widltypes.h:32
unsigned char Data4[8]
Definition: widltypes.h:35
unsigned short Data2
Definition: widltypes.h:33

Referenced by write_id_data_stmts().

Variable Documentation

◆ acf_name

char* acf_name

Definition at line 118 of file widl.c.

Referenced by option_callback().

◆ bindir

const char* bindir
static

Definition at line 137 of file widl.c.

Referenced by get_nlsdir(), and main().

◆ client_name

char* client_name

Definition at line 126 of file widl.c.

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

◆ client_token

char* client_token

Definition at line 127 of file widl.c.

Referenced by main(), and write_client_routines().

◆ debuglevel

int debuglevel = DEBUGLEVEL_NONE

Definition at line 94 of file widl.c.

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

◆ dlldata_name

char* dlldata_name

Definition at line 123 of file widl.c.

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

◆ dlldirs

struct strarray dlldirs
static

Definition at line 140 of file widl.c.

Referenced by open_typelib(), and option_callback().

◆ do_client

int do_client = 0

Definition at line 103 of file widl.c.

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

◆ do_dlldata

int do_dlldata = 0

Definition at line 107 of file widl.c.

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

◆ do_everything

int do_everything = 1

Definition at line 98 of file widl.c.

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

◆ do_header

int do_header = 0

Definition at line 100 of file widl.c.

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

◆ do_idfile

int do_idfile = 0

Definition at line 106 of file widl.c.

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

◆ do_proxies

int do_proxies = 0

Definition at line 102 of file widl.c.

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

◆ do_regscript

int do_regscript = 0

Definition at line 105 of file widl.c.

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

◆ do_server

int do_server = 0

Definition at line 104 of file widl.c.

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

◆ do_typelib

int do_typelib = 0

Definition at line 101 of file widl.c.

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

◆ header_name

◆ header_token

char* header_token

Definition at line 121 of file widl.c.

Referenced by main(), and write_header().

◆ idfile

FILE* idfile
static

Definition at line 144 of file widl.c.

Referenced by write_id_data(), and write_id_data_stmts().

◆ idfile_name

char* idfile_name
static

Definition at line 132 of file widl.c.

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

◆ idl_name

char* idl_name

Definition at line 117 of file widl.c.

Referenced by main(), and write_id_data().

◆ includedir

const char* includedir
static

Definition at line 139 of file widl.c.

Referenced by main().

◆ input_name

char* input_name

Definition at line 116 of file widl.c.

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

◆ interpreted_mode

◆ libdir

const char* libdir
static

Definition at line 138 of file widl.c.

Referenced by main(), and open_typelib().

◆ local_stubs_name

char* local_stubs_name

Definition at line 120 of file widl.c.

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

◆ long_options

const struct long_option long_options[]
static
Initial value:
= {
{ "acf", 1, ACF_OPTION },
{ "align", 1, PACKING_OPTION },
{ "app_config", 0, APP_CONFIG_OPTION },
{ "dlldata", 1, DLLDATA_OPTION },
{ "dlldata-only", 0, DLLDATA_ONLY_OPTION },
{ "help", 0, PRINT_HELP },
{ "local-stubs", 1, LOCAL_STUBS_OPTION },
{ "nostdinc", 0, NOSTDINC_OPTION },
{ "ns_prefix", 0, RT_NS_PREFIX },
{ "oldnames", 0, OLDNAMES_OPTION },
{ "oldtlb", 0, OLD_TYPELIB_OPTION },
{ "output", 0, 'o' },
{ "packing", 1, PACKING_OPTION },
{ "prefix-all", 1, PREFIX_ALL_OPTION },
{ "prefix-client", 1, PREFIX_CLIENT_OPTION },
{ "prefix-server", 1, PREFIX_SERVER_OPTION },
{ "robust", 0, ROBUST_OPTION },
{ "sysroot", 1, SYSROOT_OPTION },
{ "target", 0, 'b' },
{ "winrt", 0, RT_OPTION },
{ "win32", 0, WIN32_OPTION },
{ "win64", 0, WIN64_OPTION },
{ NULL }
}

Definition at line 175 of file widl.c.

Referenced by _getopt_long_only_r(), _getopt_long_r(), getopt_long(), getopt_long_only(), and main().

◆ no_preprocess

int no_preprocess = 0
static

Definition at line 108 of file widl.c.

Referenced by open_input_file(), and option_callback().

◆ now

time_t now

Definition at line 149 of file widl.c.

Referenced by main().

◆ old_names

◆ old_typelib

int old_typelib = 0

Definition at line 110 of file widl.c.

Referenced by option_callback(), and write_typelib_regscript().

◆ output_name

char* output_name
static

Definition at line 141 of file widl.c.

Referenced by main(), option_callback(), and QCAP_createAVIMux().

◆ packing

unsigned int packing = 8

◆ parser_debug

int parser_debug

Definition at line 95 of file widl.c.

Referenced by main(), and wpp_set_debug().

◆ pedantic

int pedantic = 0

Definition at line 97 of file widl.c.

Referenced by option_callback(), pp_add_define(), pp_add_macro(), pp_del_define(), and tt_loader_init().

◆ pointer_size

◆ prefix_client

◆ prefix_server

◆ preprocess_only

int preprocess_only = 0
static

Definition at line 99 of file widl.c.

Referenced by main(), and option_callback().

◆ proxy_name

char* proxy_name

Definition at line 124 of file widl.c.

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

◆ proxy_token

char* proxy_token

Definition at line 125 of file widl.c.

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

◆ regscript_name

char* regscript_name

Definition at line 130 of file widl.c.

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

◆ regscript_token

char* regscript_token

Definition at line 131 of file widl.c.

Referenced by main(), and write_regscript().

◆ server_name

◆ server_token

char* server_token

Definition at line 129 of file widl.c.

Referenced by main(), and write_server_routines().

◆ short_options

const char short_options[]
static
Initial value:
=
"b:cC:d:D:EhH:I:L:m:No:O:pP:rsS:tT:uU:VW"

Definition at line 173 of file widl.c.

Referenced by main().

◆ stdinc

int stdinc = 1
static

Definition at line 114 of file widl.c.

Referenced by main(), open_typelib(), and option_callback().

◆ sysroot

const char* sysroot = ""
static

Definition at line 142 of file widl.c.

Referenced by main(), and option_callback().

◆ target

struct target target = { 0 }

Definition at line 92 of file widl.c.

◆ temp_dir

const char* temp_dir = NULL

Definition at line 134 of file widl.c.

Referenced by create_file(), make_temp_file(), and remove_temp_files().

◆ temp_files

struct strarray temp_files = { 0 }

Definition at line 133 of file widl.c.

Referenced by make_temp_file(), and remove_temp_files().

◆ typelib_name

◆ usage

const char usage[] ( void  )
static

Definition at line 40 of file widl.c.

◆ use_abi_namespace

◆ version_string

const char version_string[]
static
Initial value:
= "Wine IDL Compiler version " PACKAGE_VERSION "\n"
"Copyright 2002 Ove Kaaven\n"

Definition at line 89 of file widl.c.

Referenced by option_callback().

◆ winrt_mode

◆ yy_flex_debug

int yy_flex_debug

Definition at line 95 of file widl.c.

Referenced by main().