Sync to Wine-20050628:

Robert Shearman <rob@codeweavers.com>
- Add more struct types for TLB generation.
Stefan Huehner <stefan@huehner.org>
- Fix some -Wmissing-declarations by making functions static.
Huw Davies <huw@codeweavers.com>
- Add comments describing the first DWORD in an import table entry.
Alexandre Julliard <julliard@winehq.org>
- Workaround to allow using the async keyword as method name.

svn path=/trunk/; revision=16470
This commit is contained in:
Gé van Geldorp 2005-07-06 22:16:28 +00:00
parent 28277f305b
commit 0ddd1be07e
7 changed files with 487 additions and 457 deletions

View file

@ -748,7 +748,7 @@ void write_forward(type_t *iface)
}
}
void write_guid(const char *guid_prefix, const char *name, UUID *uuid)
static void write_guid(const char *guid_prefix, const char *name, UUID *uuid)
{
if (!uuid) return;
fprintf(header, "DEFINE_GUID(%s_%s, 0x%08lx, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x);\n",
@ -756,25 +756,25 @@ void write_guid(const char *guid_prefix, const char *name, UUID *uuid)
uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5], uuid->Data4[6], uuid->Data4[7]);
}
void write_iface_guid(type_t *iface)
static void write_iface_guid(type_t *iface)
{
UUID *uuid = get_attrp(iface->attrs, ATTR_UUID);
write_guid("IID", iface->name, uuid);
}
void write_dispiface_guid(type_t *iface)
static void write_dispiface_guid(type_t *iface)
{
UUID *uuid = get_attrp(iface->attrs, ATTR_UUID);
write_guid("DIID", iface->name, uuid);
}
void write_coclass_guid(class_t *cocl)
static void write_coclass_guid(class_t *cocl)
{
UUID *uuid = get_attrp(cocl->attrs, ATTR_UUID);
write_guid("CLSID", cocl->name, uuid);
}
void write_com_interface(type_t *iface)
static void write_com_interface(type_t *iface)
{
if (!iface->funcs && !iface->ref) {
yywarning("%s has no methods", iface->name);
@ -836,7 +836,7 @@ void write_com_interface(type_t *iface)
fprintf(header,"\n#endif /* __%s_INTERFACE_DEFINED__ */\n\n", iface->name);
}
void write_rpc_interface(type_t *iface)
static void write_rpc_interface(type_t *iface)
{
unsigned long ver = get_attrv(iface->attrs, ATTR_VERSION);
char *var = get_attrp(iface->attrs, ATTR_IMPLICIT_HANDLE);

View file

@ -545,6 +545,7 @@ t_ident: { $$ = NULL; }
ident: aIDENTIFIER { $$ = make_var($1); }
/* some "reserved words" used in attributes are also used as field names in some MS IDL files */
| aKNOWNTYPE { $$ = make_var($<str>1); }
| tASYNC { $$ = make_var($<str>1); }
| tID { $$ = make_var($<str>1); }
| tRETVAL { $$ = make_var($<str>1); }
| tVERSION { $$ = make_var($<str>1); }

View file

@ -141,7 +141,7 @@ static void write_formatstring( int proc )
print_proxy( "\n");
}
static void init_proxy()
static void init_proxy(void)
{
if (proxy) return;
if(!(proxy = fopen(proxy_name, "w")))

View file

@ -148,13 +148,18 @@ unsigned short get_type_vt(type_t *t)
case RPC_FC_ENUM16:
case RPC_FC_STRUCT:
case RPC_FC_PSTRUCT:
case RPC_FC_CSTRUCT:
case RPC_FC_CPSTRUCT:
case RPC_FC_CVSTRUCT:
case RPC_FC_BOGUS_STRUCT:
return VT_USERDEFINED;
case 0:
if(t->attrs)
return VT_USERDEFINED;
return 0;
default:
error("get_type_vt: unknown-type: %d\n", t->type);
error("get_type_vt: unknown type: 0x%02x\n", t->type);
}
return 0;
}

View file

@ -157,9 +157,12 @@ typedef struct tagMSFT_TypeInfoBase {
/* layout of an entry with information on imported types */
typedef struct tagMSFT_ImpInfo {
INT res0; /* unknown */
INT oImpFile; /* offset inthe Import File table */
INT oGuid; /* offset in Guid table */
INT res0; /* bits 0 - 15: count */
/* bit 16: if set oGuid is an offset to Guid */
/* if clear oGuid is a typeinfo index in the specified typelib */
/* bits 24 - 31: TKIND of reference */
INT oImpFile; /* offset in the Import File table */
INT oGuid; /* offset in Guid table or typeinfo index (see bit 16 of res0) */
} MSFT_ImpInfo;
/* function description data */

View file

@ -875,6 +875,11 @@ static int encode_type(
chat("encode_type: trying to ref not added type\n");
switch(type->type) {
case RPC_FC_STRUCT:
case RPC_FC_PSTRUCT:
case RPC_FC_CSTRUCT:
case RPC_FC_CPSTRUCT:
case RPC_FC_CVSTRUCT:
case RPC_FC_BOGUS_STRUCT:
add_structure_typeinfo(typelib, type);
break;
case RPC_FC_IP:

File diff suppressed because it is too large Load diff