ReactOS 0.4.16-dev-889-g9563c07
widl.c File Reference
#include "config.h"
#include "wine/port.h"
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <ctype.h>
#include <signal.h>
#include "widl.h"
#include "utils.h"
#include "parser.h"
#include "wine/wpp.h"
#include "header.h"
Include dependency graph for widl.c:

Go to the source code of this file.

Classes

struct  filename_node_t
 

Enumerations

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

Functions

static void rm_tempfile (void)
 
enum stub_mode get_stub_mode (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 set_target (const char *target)
 
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 add_filename_node (struct list *list, const char *name)
 
static void free_filename_nodes (struct list *list)
 
static void write_dlldata_list (struct list *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 UUID *uuid)
 
static void write_id_data_stmts (const statement_list_t *stmts)
 
void write_id_data (const statement_list_t *stmts)
 
int main (int argc, char *argv[])
 

Variables

static const char usage []
 
static const char version_string []
 
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_old_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 win32_packing = 8
 
int win64_packing = 8
 
int winrt_mode = 0
 
int use_abi_namespace = 0
 
static enum stub_mode stub_mode = MODE_Os
 
charinput_name
 
charinput_idl_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
 
chartemp_name
 
const charprefix_client = ""
 
const charprefix_server = ""
 
int line_number = 1
 
static FILEidfile
 
unsigned int pointer_size = 0
 
time_t now
 
static const char short_options []
 
static const struct option long_options []
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OLDNAMES_OPTION 
ACF_OPTION 
APP_CONFIG_OPTION 
DLLDATA_OPTION 
DLLDATA_ONLY_OPTION 
LOCAL_STUBS_OPTION 
OLD_TYPELIB_OPTION 
PREFIX_ALL_OPTION 
PREFIX_CLIENT_OPTION 
PREFIX_SERVER_OPTION 
PRINT_HELP 
RT_NS_PREFIX 
RT_OPTION 
ROBUST_OPTION 
WIN32_OPTION 
WIN64_OPTION 
WIN32_ALIGN_OPTION 
WIN64_ALIGN_OPTION 

Definition at line 161 of file widl.c.

161 {
174 RT_OPTION,
180};
#define CHAR_MAX
Definition: limits.h:32
@ DLLDATA_ONLY_OPTION
Definition: widl.c:166
@ LOCAL_STUBS_OPTION
Definition: widl.c:167
@ WIN32_ALIGN_OPTION
Definition: widl.c:178
@ OLD_TYPELIB_OPTION
Definition: widl.c:168
@ OLDNAMES_OPTION
Definition: widl.c:162
@ ACF_OPTION
Definition: widl.c:163
@ WIN64_ALIGN_OPTION
Definition: widl.c:179
@ RT_NS_PREFIX
Definition: widl.c:173
@ APP_CONFIG_OPTION
Definition: widl.c:164
@ PREFIX_SERVER_OPTION
Definition: widl.c:171
@ PREFIX_ALL_OPTION
Definition: widl.c:169
@ ROBUST_OPTION
Definition: widl.c:175
@ PREFIX_CLIENT_OPTION
Definition: widl.c:170
@ PRINT_HELP
Definition: widl.c:172
@ WIN64_OPTION
Definition: widl.c:177
@ DLLDATA_OPTION
Definition: widl.c:165
@ WIN32_OPTION
Definition: widl.c:176
@ RT_OPTION
Definition: widl.c:174

Function Documentation

◆ add_filename_node()

static void add_filename_node ( struct list list,
const char name 
)
static

Definition at line 359 of file widl.c.

360{
361 filename_node_t *node = xmalloc(sizeof *node);
362 node->filename = dup_basename( name, ".idl" );
363 list_add_tail(list, &node->link);
364}
void * xmalloc(int size)
Definition: uimain.c:747
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
Definition: list.h:37
char * dup_basename(const char *name, const char *ext)
Definition: utils.c:143
Definition: name.c:39
Definition: dlist.c:348

Referenced by main(), and write_dlldata().

◆ add_widl_version_define()

static void add_widl_version_define ( void  )
static

Definition at line 246 of file widl.c.

247{
248 unsigned int version;
249 const char *p = PACKAGE_VERSION;
250
251 /* major */
252 version = atoi(p) * 0x10000;
253 p = strchr(p, '.');
254
255 /* minor */
256 if (p)
257 {
258 version += atoi(p + 1) * 0x100;
259 p = strchr(p + 1, '.');
260 }
261
262 /* build */
263 if (p)
264 version += atoi(p + 1);
265
266 if (version != 0)
267 {
268 char version_str[11];
269 snprintf(version_str, sizeof(version_str), "0x%x", version);
270 wpp_add_define("__WIDL__", version_str);
271 }
272 else
273 wpp_add_define("__WIDL__", NULL);
274}
char * strchr(const char *String, int ch)
Definition: utclib.c:501
int wpp_add_define(const char *name, const char *value)
Definition: compiler.c:377
#define NULL
Definition: types.h:112
static const WCHAR version[]
Definition: asmname.c:66
GLfloat GLfloat p
Definition: glext.h:8902
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
#define PACKAGE_VERSION
Definition: config.h:835
#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 238 of file widl.c.

239{
240 char *p, *ret = dup_basename( name, ext );
241 /* map invalid characters to '_' */
242 for (p = ret; *p; p++) if (!isalnum(*p)) *p = '_';
243 return ret;
244}
static const WCHAR *const ext[]
Definition: module.c:53
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
int ret

Referenced by main().

◆ eat_space()

static char * eat_space ( char s)
static

Definition at line 414 of file widl.c.

415{
416 while (isspace((unsigned char) *s))
417 ++s;
418 return s;
419}
#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 346 of file widl.c.

347{
348 fprintf(fp, "#ifdef __cplusplus\n");
349 fprintf(fp, "}\n");
350 fprintf(fp, "#endif\n\n");
351}
_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 321 of file widl.c.

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

Referenced by main().

◆ free_filename_nodes()

static void free_filename_nodes ( struct list list)
static

Definition at line 366 of file widl.c.

367{
370 list_remove(&node->link);
371 free(node->filename);
372 free(node);
373 }
374}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
const WCHAR * link
Definition: db.cpp:997
#define free
Definition: debug_ros.c:5
static unsigned __int64 next
Definition: rand_nt.c:6
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204

Referenced by main(), and write_dlldata().

◆ get_stub_mode()

enum stub_mode get_stub_mode ( void  )

Definition at line 210 of file widl.c.

211{
212 /* old-style interpreted stubs are not supported on 64-bit */
213 if (stub_mode == MODE_Oi && pointer_size == 8) return MODE_Oif;
214 return stub_mode;
215}
unsigned int pointer_size
Definition: widl.c:157
static enum stub_mode stub_mode
Definition: widl.c:130
stub_mode
Definition: widl.h:86
@ MODE_Oif
Definition: widl.h:89
@ MODE_Oi
Definition: widl.h:88

Referenced by gen_proxy(), is_interpreted_func(), need_inline_stubs(), need_proxy_and_inline_stubs(), write_client_call_routine(), write_dispatchtable(), write_nonsimple_pointer(), write_proc_func_header(), write_procformatstring_func(), write_proxy(), write_proxy_routines(), write_serialize_function(), write_simple_pointer(), write_stub_methods(), write_stubdesc(), and write_stubdescriptor().

◆ main()

int main ( int argc  ,
char argv[] 
)

Definition at line 584 of file widl.c.

585{
586 int optc;
587 int ret = 0;
588 int opti = 0;
589 char *output_name = NULL;
590
593#ifdef SIGHUP
595#endif
596
597 now = time(NULL);
598
599 while((optc = getopt_long_only(argc, argv, short_options, long_options, &opti)) != EOF) {
600 switch(optc) {
601 case DLLDATA_OPTION:
603 break;
605 do_everything = 0;
606 do_dlldata = 1;
607 break;
609 do_everything = 0;
611 break;
612 case OLDNAMES_OPTION:
613 old_names = 1;
614 break;
618 break;
621 break;
624 break;
625 case PRINT_HELP:
626 fprintf(stderr, "%s", usage);
627 return 0;
628 case RT_OPTION:
629 winrt_mode = 1;
630 break;
631 case RT_NS_PREFIX:
633 break;
634 case WIN32_OPTION:
635 pointer_size = 4;
636 break;
637 case WIN64_OPTION:
638 pointer_size = 8;
639 break;
642 if(win32_packing != 2 && win32_packing != 4 && win32_packing != 8)
643 error("Packing must be one of 2, 4 or 8\n");
644 break;
647 if(win64_packing != 2 && win64_packing != 4 && win64_packing != 8)
648 error("Packing must be one of 2, 4 or 8\n");
649 break;
650 case ACF_OPTION:
652 break;
654 /* widl does not distinguish between app_mode and default mode,
655 but we ignore this option for midl compatibility */
656 break;
657 case ROBUST_OPTION:
658 /* FIXME: Support robust option */
659 break;
660 case 'b':
662 break;
663 case 'c':
664 do_everything = 0;
665 do_client = 1;
666 break;
667 case 'C':
669 break;
670 case 'd':
672 break;
673 case 'D':
675 break;
676 case 'E':
677 do_everything = 0;
678 preprocess_only = 1;
679 break;
680 case 'h':
681 do_everything = 0;
682 do_header = 1;
683 break;
684 case 'H':
686 break;
687 case 'I':
689 break;
690 case 'm':
691 if (!strcmp( optarg, "32" )) pointer_size = 4;
692 else if (!strcmp( optarg, "64" )) pointer_size = 8;
693 break;
694 case 'N':
695 no_preprocess = 1;
696 break;
697 case 'o':
698 output_name = xstrdup(optarg);
699 break;
700 case 'O':
701 if (!strcmp( optarg, "s" )) stub_mode = MODE_Os;
702 else if (!strcmp( optarg, "i" )) stub_mode = MODE_Oi;
703 else if (!strcmp( optarg, "ic" )) stub_mode = MODE_Oif;
704 else if (!strcmp( optarg, "if" )) stub_mode = MODE_Oif;
705 else if (!strcmp( optarg, "icf" )) stub_mode = MODE_Oif;
706 else error( "Invalid argument '-O%s'\n", optarg );
707 break;
708 case 'p':
709 do_everything = 0;
710 do_proxies = 1;
711 break;
712 case 'P':
714 break;
715 case 'r':
716 do_everything = 0;
717 do_regscript = 1;
718 break;
719 case 's':
720 do_everything = 0;
721 do_server = 1;
722 break;
723 case 'S':
725 break;
726 case 't':
727 do_everything = 0;
728 do_typelib = 1;
729 break;
731 do_old_typelib = 1;
732 break;
733 case 'T':
735 break;
736 case 'u':
737 do_everything = 0;
738 do_idfile = 1;
739 break;
740 case 'U':
742 break;
743 case 'V':
744 printf("%s", version_string);
745 return 0;
746 case 'W':
747 pedantic = 1;
748 break;
749 default:
750 fprintf(stderr, "%s", usage);
751 return 1;
752 }
753 }
754
755#ifdef DEFAULT_INCLUDE_DIR
756 wpp_add_include_path(DEFAULT_INCLUDE_DIR);
757#endif
758
759 switch (target_cpu)
760 {
761 case CPU_x86:
763 else pointer_size = 4;
764 break;
765 case CPU_x86_64:
766 if (pointer_size == 4) target_cpu = CPU_x86;
767 else pointer_size = 8;
768 break;
769 case CPU_ARM64:
770 if (pointer_size == 4) error( "Cannot build 32-bit code for this CPU\n" );
771 pointer_size = 8;
772 break;
773 default:
774 if (pointer_size == 8) error( "Cannot build 64-bit code for this CPU\n" );
775 pointer_size = 4;
776 break;
777 }
778
779 /* if nothing specified, try to guess output type from the output file name */
780 if (output_name && do_everything && !do_header && !do_typelib && !do_proxies &&
782 {
783 do_everything = 0;
784 if (strendswith( output_name, ".h" )) do_header = 1;
785 else if (strendswith( output_name, ".tlb" )) do_typelib = 1;
786 else if (strendswith( output_name, "_p.c" )) do_proxies = 1;
787 else if (strendswith( output_name, "_c.c" )) do_client = 1;
788 else if (strendswith( output_name, "_s.c" )) do_server = 1;
789 else if (strendswith( output_name, "_i.c" )) do_idfile = 1;
790 else if (strendswith( output_name, "_r.res" )) do_regscript = 1;
791 else if (strendswith( output_name, "_t.res" )) do_typelib = 1;
792 else if (strendswith( output_name, "dlldata.c" )) do_dlldata = 1;
793 else do_everything = 1;
794 }
795
796 if(do_everything) {
798 }
799
800 if (!output_name) output_name = dup_basename(input_name, ".idl");
801
804 {
805 if (do_header) header_name = output_name;
806 else if (do_typelib) typelib_name = output_name;
807 else if (do_proxies) proxy_name = output_name;
808 else if (do_client) client_name = output_name;
809 else if (do_server) server_name = output_name;
810 else if (do_regscript) regscript_name = output_name;
811 else if (do_idfile) idfile_name = output_name;
812 else if (do_dlldata) dlldata_name = output_name;
813 }
814
815 if (!dlldata_name && do_dlldata)
816 dlldata_name = xstrdup("dlldata.c");
817
818 if(optind < argc) {
819 if (do_dlldata && !do_everything) {
820 struct list filenames = LIST_INIT(filenames);
821 for ( ; optind < argc; ++optind)
822 add_filename_node(&filenames, argv[optind]);
823
824 write_dlldata_list(&filenames, 0 /* FIXME */ );
825 free_filename_nodes(&filenames);
826 return 0;
827 }
828 else if (optind != argc - 1) {
829 fprintf(stderr, "%s", usage);
830 return 1;
831 }
832 else
834 }
835 else {
836 fprintf(stderr, "%s", usage);
837 return 1;
838 }
839
840 if(debuglevel)
841 {
844 }
845
848
851 (debuglevel & DEBUGLEVEL_PPMSG) != 0 );
852
853 if (!header_name) {
855 strcat(header_name, ".h");
856 }
857
858 if (!typelib_name && do_typelib) {
860 strcat(typelib_name, ".tlb");
861 }
862
863 if (!proxy_name && do_proxies) {
865 strcat(proxy_name, "_p.c");
866 }
867
868 if (!client_name && do_client) {
870 strcat(client_name, "_c.c");
871 }
872
873 if (!server_name && do_server) {
875 strcat(server_name, "_s.c");
876 }
877
880 strcat(regscript_name, "_r.rgs");
881 }
882
883 if (!idfile_name && do_idfile) {
885 strcat(idfile_name, "_i.c");
886 }
887
892
894 wpp_add_define("_WIN32", NULL);
895
897 if (!no_preprocess)
898 {
899 chat("Starting preprocess\n");
900
901 if (!preprocess_only)
902 {
903 FILE *output;
904 int fd;
905 char *name = xmalloc( strlen(header_name) + 8 );
906
908 strcat( name, ".XXXXXX" );
909
910 if ((fd = mkstemps( name, 0 )) == -1)
911 error("Could not generate a temp name from %s\n", name);
912
913 temp_name = name;
914 if (!(output = fdopen(fd, "wt")))
915 error("Could not open fd %s for writing\n", name);
916
917 ret = wpp_parse( input_name, output );
918 fclose( output );
919 }
920 else
921 {
923 }
924
925 if(ret) exit(1);
926 if(preprocess_only) exit(0);
927 if(!(parser_in = fopen(temp_name, "r"))) {
928 fprintf(stderr, "Could not open %s for input\n", temp_name);
929 return 1;
930 }
931 }
932 else {
933 if(!(parser_in = fopen(input_name, "r"))) {
934 fprintf(stderr, "Could not open %s for input\n", input_name);
935 return 1;
936 }
937 }
938
940
941 init_types();
942 ret = parser_parse();
943
945
946 if(ret) {
947 exit(1);
948 }
949
950 /* Everything has been done successfully, don't delete any files. */
953
954 return 0;
955}
static int argc
Definition: ServiceArgs.c:12
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * xstrdup(const char *s)
Definition: uimain.c:768
const char * optarg
Definition: getopt.c:49
int optind
Definition: getopt.c:47
int wpp_parse(const char *input, FILE *output)
Definition: compiler.c:437
#define SIGHUP
Definition: signal.h:22
#define SIGINT
Definition: signal.h:23
#define SIGTERM
Definition: signal.h:39
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
int __cdecl atexit(void(__cdecl *function)(void))
Definition: stubs.c:10
int getopt_long_only(optarg_ctx *o, int argc, WCHAR *const *argv, const WCHAR *shortopts, const struct option *longopts, int *longind)
#define printf
Definition: freeldr.h:97
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
#define stdout
Definition: stdio.h:99
#define EOF
Definition: stdio.h:24
#define stderr
Definition: stdio.h:100
_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_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
__u16 time
Definition: mkdosfs.c:8
#define error(str)
Definition: mkdosfs.c:1605
int mkstemps(char *template, int suffix_len)
Definition: mkstemps.c:73
#define argv
Definition: mplay32.c:18
int wpp_add_cmdline_define(const char *value)
Definition: wpp.c:153
void wpp_set_debug(int lex_debug, int parser_debug, int msg_debug)
Definition: wpp.c:168
int wpp_add_include_path(const char *path)
Definition: preproc.c:460
strcat
Definition: string.h:92
strcpy
Definition: string.h:131
int signal
Definition: except.c:84
static int fd
Definition: io.c:51
int parser_parse(void)
FILE * parser_in
void chat(const char *s,...)
Definition: utils.c:131
int strendswith(const char *str, const char *end)
Definition: utils.c:238
#define LIST_INIT(head)
Definition: queue.h:197
char * acf_name
Definition: widl.c:134
int do_header
Definition: widl.c:115
const char * prefix_server
Definition: widl.c:151
int use_abi_namespace
Definition: widl.c:129
static const char short_options[]
Definition: widl.c:182
int parser_debug
Definition: widl.c:110
int do_idfile
Definition: widl.c:122
static void free_filename_nodes(struct list *list)
Definition: widl.c:366
int do_regscript
Definition: widl.c:121
char * client_token
Definition: widl.c:143
time_t now
Definition: widl.c:159
char * typelib_name
Definition: widl.c:138
static void rm_tempfile(void)
Definition: widl.c:957
int do_server
Definition: widl.c:120
char * dlldata_name
Definition: widl.c:139
char * server_name
Definition: widl.c:144
static void set_target(const char *target)
Definition: widl.c:277
int do_everything
Definition: widl.c:113
char * proxy_name
Definition: widl.c:140
static void exit_on_signal(int sig)
Definition: widl.c:321
char * input_idl_name
Definition: widl.c:133
char * local_stubs_name
Definition: widl.c:136
int yy_flex_debug
Definition: widl.c:110
char * regscript_name
Definition: widl.c:146
static void add_filename_node(struct list *list, const char *name)
Definition: widl.c:359
char * header_token
Definition: widl.c:137
int do_typelib
Definition: widl.c:116
static const char version_string[]
Definition: widl.c:92
static char * dup_basename_token(const char *name, const char *ext)
Definition: widl.c:238
int old_names
Definition: widl.c:125
char * server_token
Definition: widl.c:145
int win64_packing
Definition: widl.c:127
int winrt_mode
Definition: widl.c:128
int win32_packing
Definition: widl.c:126
int do_old_typelib
Definition: widl.c:117
static const struct option long_options[]
Definition: widl.c:184
static void add_widl_version_define(void)
Definition: widl.c:246
int do_proxies
Definition: widl.c:118
char * regscript_token
Definition: widl.c:147
char * client_name
Definition: widl.c:142
static int no_preprocess
Definition: widl.c:124
char * proxy_token
Definition: widl.c:141
static char * make_token(const char *name)
Definition: widl.c:217
static void set_everything(int x)
Definition: widl.c:326
static char * idfile_name
Definition: widl.c:148
static void write_dlldata_list(struct list *filenames, int define_proxy_delegation)
Definition: widl.c:376
int do_client
Definition: widl.c:119
int debuglevel
Definition: widl.c:109
int pedantic
Definition: widl.c:112
int do_dlldata
Definition: widl.c:123
static int preprocess_only
Definition: widl.c:114
char * header_name
Definition: widl.c:135
char * input_name
Definition: widl.c:132
const char * prefix_client
Definition: widl.c:150
char * temp_name
Definition: widl.c:149
#define DEBUGLEVEL_PPMSG
Definition: widl.h:33
#define DEBUGLEVEL_PPTRACE
Definition: widl.h:35
@ MODE_Os
Definition: widl.h:87
target_cpu
Definition: widl.h:79
@ CPU_x86_64
Definition: widl.h:80
@ CPU_x86
Definition: widl.h:80
@ CPU_ARM64
Definition: widl.h:80
#define DEBUGLEVEL_PPLEX
Definition: widl.h:34
#define DEBUGLEVEL_TRACE
Definition: widl.h:32
void init_types(void)

◆ make_token()

static char * make_token ( const char name)
static

Definition at line 217 of file widl.c.

218{
219 char *token;
220 char *slash;
221 int i;
222
223 slash = strrchr(name, '/');
224 if(!slash)
225 slash = strrchr(name, '\\');
226
227 if (slash) name = slash + 1;
228
229 token = xstrdup(name);
230 for (i=0; token[i]; i++) {
231 if (!isalnum(token[i])) token[i] = '_';
232 else token[i] = tolower(token[i]);
233 }
234 return token;
235}
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 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
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
_CRT_RESTORE_GCC_WARNINGS _CRT_DISABLE_GCC_WARNINGS _Check_return_ _CRTIMP _CONST_RETURN char *__cdecl strrchr(_In_z_ const char *_Str, _In_ int _Ch)

Referenced by main().

◆ rm_tempfile()

static void rm_tempfile ( void  )
static

Definition at line 957 of file widl.c.

958{
959 abort_import();
960 if(temp_name)
962 if (do_header)
966 if (do_client)
968 if (do_server)
970 if (do_regscript)
972 if (do_idfile)
974 if (do_proxies)
976 if (do_typelib)
978}
#define unlink
Definition: syshdrs.h:54
void abort_import(void)

Referenced by main().

◆ set_everything()

static void set_everything ( int  x)
static

Definition at line 326 of file widl.c.

327{
328 do_header = x;
329 do_typelib = x;
331 do_proxies = x;
332 do_client = x;
333 do_server = x;
334 do_regscript = x;
335 do_idfile = x;
336 do_dlldata = x;
337}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

Referenced by main().

◆ set_target()

static void set_target ( const char target)
static

Definition at line 277 of file widl.c.

278{
279 static const struct
280 {
281 const char *name;
282 enum target_cpu cpu;
283 } cpu_names[] =
284 {
285 { "i386", CPU_x86 },
286 { "i486", CPU_x86 },
287 { "i586", CPU_x86 },
288 { "i686", CPU_x86 },
289 { "i786", CPU_x86 },
290 { "amd64", CPU_x86_64 },
291 { "x86_64", CPU_x86_64 },
292 { "powerpc", CPU_POWERPC },
293 { "arm", CPU_ARM },
294 { "armv5", CPU_ARM },
295 { "armv6", CPU_ARM },
296 { "armv7", CPU_ARM },
297 { "arm64", CPU_ARM64 },
298 { "aarch64", CPU_ARM64 },
299 };
300
301 unsigned int i;
302 char *p, *spec = xstrdup( target );
303
304 /* target specification is in the form CPU-MANUFACTURER-OS or CPU-MANUFACTURER-KERNEL-OS */
305
306 if (!(p = strchr( spec, '-' ))) error( "Invalid target specification '%s'\n", target );
307 *p++ = 0;
308 for (i = 0; i < sizeof(cpu_names)/sizeof(cpu_names[0]); i++)
309 {
310 if (!strcmp( cpu_names[i].name, spec ))
311 {
312 target_cpu = cpu_names[i].cpu;
313 free( spec );
314 return;
315 }
316 }
317 error( "Unrecognized CPU '%s'\n", spec );
318}
GLenum target
Definition: glext.h:7315
@ CPU_ARM
Definition: widl.h:80
@ CPU_POWERPC
Definition: widl.h:80

Referenced by main().

◆ start_cplusplus_guard()

void start_cplusplus_guard ( FILE fp)

Definition at line 339 of file widl.c.

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

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

◆ write_dlldata()

void write_dlldata ( const statement_list_t stmts)

Definition at line 421 of file widl.c.

422{
423 struct list filenames = LIST_INIT(filenames);
424 int define_proxy_delegation = 0;
426 FILE *dlldata;
427
428 if (!do_dlldata || !need_proxy_file(stmts))
429 return;
430
431 define_proxy_delegation = need_proxy_delegation(stmts);
432
433 dlldata = fopen(dlldata_name, "r");
434 if (dlldata) {
435 static const char marker[] = "REFERENCE_PROXY_FILE";
436 static const char delegation_define[] = "#define PROXY_DELEGATION";
437 char *line = NULL;
438 size_t len = 0;
439
440 while (widl_getline(&line, &len, dlldata)) {
441 char *start, *end;
443 if (strncmp(start, marker, sizeof marker - 1) == 0) {
444 start = eat_space(start + sizeof marker - 1);
445 if (*start != '(')
446 continue;
447 end = start = eat_space(start + 1);
448 while (*end && *end != ')')
449 ++end;
450 if (*end != ')')
451 continue;
452 while (isspace((unsigned char) end[-1]))
453 --end;
454 *end = '\0';
455 if (start < end)
456 add_filename_node(&filenames, start);
457 }else if (!define_proxy_delegation && strncmp(start, delegation_define, sizeof(delegation_define)-1)) {
458 define_proxy_delegation = 1;
459 }
460 }
461
462 if (ferror(dlldata))
463 error("couldn't read from %s: %s\n", dlldata_name, strerror(errno));
464
465 free(line);
466 fclose(dlldata);
467 }
468
470 if (strcmp(proxy_token, node->filename) == 0) {
471 /* We're already in the list, no need to regenerate this file. */
472 free_filename_nodes(&filenames);
473 return;
474 }
475
476 add_filename_node(&filenames, proxy_token);
477 write_dlldata_list(&filenames, define_proxy_delegation);
478 free_filename_nodes(&filenames);
479}
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
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)
int marker
Definition: jpeglib.h:1030
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
static char * eat_space(char *s)
Definition: widl.c:414

◆ write_dlldata_list()

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

Definition at line 376 of file widl.c.

377{
378 FILE *dlldata;
380
381 dlldata = fopen(dlldata_name, "w");
382 if (!dlldata)
383 error("couldn't open %s: %s\n", dlldata_name, strerror(errno));
384
385 fprintf(dlldata, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION);
386 fprintf(dlldata, "- Do not edit ***/\n\n");
387 if (define_proxy_delegation)
388 fprintf(dlldata, "#define PROXY_DELEGATION\n");
389
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");
394
395 fprintf(dlldata, "#include <objbase.h>\n");
396 fprintf(dlldata, "#include <rpcproxy.h>\n\n");
397 start_cplusplus_guard(dlldata);
398
400 fprintf(dlldata, "EXTERN_PROXY_FILE(%s)\n", node->filename);
401
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");
408
409 fprintf(dlldata, "DLLDATA_ROUTINES(aProxyFileList, GET_DLL_CLSID)\n\n");
410 end_cplusplus_guard(dlldata);
411 fclose(dlldata);
412}
void start_cplusplus_guard(FILE *fp)
Definition: widl.c:339
void end_cplusplus_guard(FILE *fp)
Definition: widl.c:346

Referenced by main(), and write_dlldata().

◆ write_id_data()

void write_id_data ( const statement_list_t stmts)

Definition at line 528 of file widl.c.

529{
530 if (!do_idfile) return;
531
532 idfile = fopen(idfile_name, "w");
533 if (! idfile) {
534 error("Could not open %s for output\n", idfile_name);
535 return;
536 }
537
538 fprintf(idfile, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION);
539 fprintf(idfile, "from %s - Do not edit ***/\n\n", input_idl_name);
540
541 fprintf(idfile, "#ifdef __REACTOS__\n");
542 fprintf(idfile, "#define WIN32_NO_STATUS\n");
543 fprintf(idfile, "#define WIN32_LEAN_AND_MEAN\n");
544 fprintf(idfile, "#endif\n\n");
545
546 fprintf(idfile, "#include <rpc.h>\n");
547 fprintf(idfile, "#include <rpcndr.h>\n\n");
548
549 fprintf(idfile, "#ifdef _MIDL_USE_GUIDDEF_\n\n");
550
551 fprintf(idfile, "#ifndef INITGUID\n");
552 fprintf(idfile, "#define INITGUID\n");
553 fprintf(idfile, "#include <guiddef.h>\n");
554 fprintf(idfile, "#undef INITGUID\n");
555 fprintf(idfile, "#else\n");
556 fprintf(idfile, "#include <guiddef.h>\n");
557 fprintf(idfile, "#endif\n\n");
558
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");
561
562 fprintf(idfile, "#elif defined(__cplusplus)\n\n");
563
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");
566
567 fprintf(idfile, "#else\n\n");
568
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");
571
572 fprintf(idfile, "#endif\n\n");
574
575 write_id_data_stmts(stmts);
576
577 fprintf(idfile, "\n");
579 fprintf(idfile, "#undef MIDL_DEFINE_GUID\n" );
580
581 fclose(idfile);
582}
static void write_id_data_stmts(const statement_list_t *stmts)
Definition: widl.c:491
static FILE * idfile
Definition: widl.c:155

◆ write_id_data_stmts()

static void write_id_data_stmts ( const statement_list_t stmts)
static

Definition at line 491 of file widl.c.

492{
493 const statement_t *stmt;
494 if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry )
495 {
496 if (stmt->type == STMT_TYPE)
497 {
498 const type_t *type = stmt->u.type;
500 {
501 const UUID *uuid;
502 if (!is_object(type) && !is_attr(type->attrs, ATTR_DISPINTERFACE))
503 continue;
504 uuid = get_attrp(type->attrs, ATTR_UUID);
505 write_id_guid(idfile, "IID", is_attr(type->attrs, ATTR_DISPINTERFACE) ? "DIID" : "IID",
506 type->name, uuid);
507 if (type->details.iface->async_iface)
508 {
509 uuid = get_attrp(type->details.iface->async_iface->attrs, ATTR_UUID);
510 write_id_guid(idfile, "IID", "IID", type->details.iface->async_iface->name, uuid);
511 }
512 }
513 else if (type_get_type(type) == TYPE_COCLASS)
514 {
515 const UUID *uuid = get_attrp(type->attrs, ATTR_UUID);
516 write_id_guid(idfile, "CLSID", "CLSID", type->name, uuid);
517 }
518 }
519 else if (stmt->type == STMT_LIBRARY)
520 {
521 const UUID *uuid = get_attrp(stmt->u.lib->attrs, ATTR_UUID);
522 write_id_guid(idfile, "IID", "LIBID", stmt->u.lib->name, uuid);
524 }
525 }
526}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
Definition: msctf.idl:550
uint32_t entry
Definition: isohybrid.c:63
int is_attr(const attr_list_t *list, enum attr_type t)
Definition: header.c:99
void * get_attrp(const attr_list_t *list, enum attr_type t)
Definition: header.c:107
int is_object(const type_t *iface)
Definition: header.c:928
statement_type_t type
Definition: parser.h:124
typelib_t * lib
Definition: widltypes.h:540
union _statement_t::@5172 u
statement_list_t * stmts
Definition: widltypes.h:518
const attr_list_t * attrs
Definition: widltypes.h:516
char * name
Definition: widltypes.h:515
static enum type_type type_get_type(const type_t *type)
Definition: typetree.h:68
static void write_id_guid(FILE *f, const char *type, const char *guid_prefix, const char *name, const UUID *uuid)
Definition: widl.c:481
@ TYPE_COCLASS
Definition: widltypes.h:410
@ TYPE_INTERFACE
Definition: widltypes.h:412
@ ATTR_UUID
Definition: widltypes.h:166
@ ATTR_DISPINTERFACE
Definition: widltypes.h:94
@ STMT_TYPE
Definition: widltypes.h:242
@ STMT_LIBRARY
Definition: widltypes.h:240

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 UUID uuid 
)
static

Definition at line 481 of file widl.c.

482{
483 if (!uuid) return;
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",
486 type, guid_prefix, name, uuid->Data1, uuid->Data2, uuid->Data3, uuid->Data4[0],
487 uuid->Data4[1], uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5],
488 uuid->Data4[6], uuid->Data4[7]);
489}
GLfloat f
Definition: glext.h:7540

Referenced by write_id_data_stmts().

Variable Documentation

◆ acf_name

char* acf_name

Definition at line 134 of file widl.c.

Referenced by main().

◆ client_name

char* client_name

Definition at line 142 of file widl.c.

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

◆ client_token

char* client_token

Definition at line 143 of file widl.c.

Referenced by main(), and write_client_routines().

◆ debuglevel

int debuglevel = DEBUGLEVEL_NONE

Definition at line 109 of file widl.c.

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

◆ dlldata_name

char* dlldata_name

Definition at line 139 of file widl.c.

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

◆ do_client

int do_client = 0

Definition at line 119 of file widl.c.

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

◆ do_dlldata

int do_dlldata = 0

Definition at line 123 of file widl.c.

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

◆ do_everything

int do_everything = 1

Definition at line 113 of file widl.c.

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

◆ do_header

int do_header = 0

Definition at line 115 of file widl.c.

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

◆ do_idfile

int do_idfile = 0

Definition at line 122 of file widl.c.

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

◆ do_old_typelib

int do_old_typelib = 0

Definition at line 117 of file widl.c.

Referenced by main(), and set_everything().

◆ do_proxies

int do_proxies = 0

Definition at line 118 of file widl.c.

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

◆ do_regscript

int do_regscript = 0

Definition at line 121 of file widl.c.

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

◆ do_server

int do_server = 0

Definition at line 120 of file widl.c.

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

◆ do_typelib

int do_typelib = 0

Definition at line 116 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

Definition at line 137 of file widl.c.

Referenced by main(), and write_header().

◆ idfile

FILE* idfile
static

Definition at line 155 of file widl.c.

Referenced by write_id_data(), and write_id_data_stmts().

◆ idfile_name

char* idfile_name
static

Definition at line 148 of file widl.c.

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

◆ input_idl_name

char* input_idl_name

Definition at line 133 of file widl.c.

Referenced by main(), and write_id_data().

◆ input_name

char* input_name

Definition at line 132 of file widl.c.

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

◆ line_number

int line_number = 1

Definition at line 153 of file widl.c.

◆ local_stubs_name

char* local_stubs_name

Definition at line 136 of file widl.c.

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

◆ long_options

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

Definition at line 184 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 124 of file widl.c.

Referenced by main().

◆ now

time_t now

Definition at line 159 of file widl.c.

Referenced by main().

◆ old_names

int old_names = 0

◆ parser_debug

int parser_debug

Definition at line 110 of file widl.c.

Referenced by main(), and wpp_set_debug().

◆ pedantic

int pedantic = 0

Definition at line 112 of file widl.c.

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

◆ pointer_size

◆ prefix_client

◆ prefix_server

◆ preprocess_only

int preprocess_only = 0
static

Definition at line 114 of file widl.c.

Referenced by main().

◆ proxy_name

char* proxy_name

Definition at line 140 of file widl.c.

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

◆ proxy_token

char* proxy_token

Definition at line 141 of file widl.c.

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

◆ regscript_name

char* regscript_name

Definition at line 146 of file widl.c.

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

◆ regscript_token

char* regscript_token

Definition at line 147 of file widl.c.

Referenced by main(), and write_regscript().

◆ server_name

◆ server_token

char* server_token

Definition at line 145 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:m:No:O:pP:rsS:tT:uU:VW"

Definition at line 182 of file widl.c.

Referenced by main().

◆ stub_mode

Definition at line 130 of file widl.c.

Referenced by get_stub_mode().

◆ temp_name

char* temp_name

Definition at line 149 of file widl.c.

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

◆ typelib_name

char* typelib_name

◆ usage

const char usage[] ( void  )
static

Definition at line 46 of file widl.c.

◆ use_abi_namespace

int use_abi_namespace = 0

◆ version_string

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

Definition at line 92 of file widl.c.

Referenced by main().

◆ win32_packing

int win32_packing = 8

Definition at line 126 of file widl.c.

Referenced by clamp_align(), and main().

◆ win64_packing

int win64_packing = 8

Definition at line 127 of file widl.c.

Referenced by clamp_align(), and main().

◆ winrt_mode

int winrt_mode = 0

Definition at line 128 of file widl.c.

Referenced by main(), and write_com_interface_end().

◆ yy_flex_debug

int yy_flex_debug

Definition at line 110 of file widl.c.

Referenced by main().