widl: Make sure format strings for structure and union types are only output once.

oldstable
Alexandre Julliard 2008-11-25 21:47:47 +01:00
parent f552c90c30
commit 0b7478a79f
1 changed files with 5 additions and 2 deletions

View File

@ -1864,8 +1864,9 @@ static size_t write_struct_tfs(FILE *file, type_t *type,
nothing is written to file yet. On the actual writing pass,
this will have been updated. */
unsigned int absoff = type->ptrdesc ? type->ptrdesc : *tfsoff;
short reloff = absoff - *tfsoff;
print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n",
int reloff = absoff - *tfsoff;
assert( reloff >= 0 );
print_file(file, 2, "NdrFcShort(0x%x),\t/* Offset= %d (%u) */\n",
reloff, reloff, absoff);
*tfsoff += 2;
}
@ -2254,6 +2255,8 @@ static size_t write_typeformatstring_var(FILE *file, int indent, const func_t *f
if (is_base_type(type->type))
return 0;
if (processed(type)) return type->typestring_offset;
switch (type->type)
{
case RPC_FC_STRUCT: