mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2024-11-27 03:43:37 +08:00
Fix some type outputs.
git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@3557 4407c894-4637-0410-b4f5-ada5f102cad1
This commit is contained in:
parent
534b757bcf
commit
9ce81e1fe5
@ -537,6 +537,21 @@ TI2_typlib_forward_declare (FILE *fp, sTI2TypLib *tl, int behdr)
|
||||
char *guard = NULL;
|
||||
int befirst;
|
||||
befirst = 1;
|
||||
if (!behdr)
|
||||
{
|
||||
fprintf (fp, "/* Typedef definitions of basic types. */\n"
|
||||
"typedef unsigned short USHORT;\n"
|
||||
"typedef signed short SHORT;\n"
|
||||
"typedef unsigned char UCHAR;\n"
|
||||
"typedef signed char CHAR;\n"
|
||||
"typedef unsigned int UINT;\n"
|
||||
"typedef signed int INT;\n"
|
||||
"typedef int WINBOOL;\n"
|
||||
"typedef struct _tagVARIANT VARIANT;\n"
|
||||
"typedef unsigned short *BSTR;\n"
|
||||
"typedef int SCODE;\n"
|
||||
"typedef struct _CY CY;\n");
|
||||
}
|
||||
for (i=0;i<tl->nr_typinfos;i++)
|
||||
{
|
||||
if (tl->typb[i].kind != TKIND_INTERFACE)
|
||||
@ -564,6 +579,7 @@ TI2_typlib_forward_declare (FILE *fp, sTI2TypLib *tl, int behdr)
|
||||
befirst = 1;
|
||||
for (i=0;i<tl->nr_typinfos;i++)
|
||||
{
|
||||
char *hn;
|
||||
if (tl->typb[i].kind != TKIND_RECORD)
|
||||
continue;
|
||||
if (befirst)
|
||||
@ -575,7 +591,10 @@ TI2_typlib_forward_declare (FILE *fp, sTI2TypLib *tl, int behdr)
|
||||
guard = mk_guard (tl->typb[i].name, "_FORWARDER_DEFINED");
|
||||
if (guard && *guard != 0)
|
||||
fprintf (fp, "#ifndef %s\n#define %s\n", guard, guard);
|
||||
fprintf (fp, "%s;\n", tl->typb[i].name);
|
||||
if ((hn = strchr (tl->typb[i].name, ' ')) == NULL)
|
||||
hn = tl->typb[i].name;
|
||||
else hn++;
|
||||
fprintf (fp, "typedef %s %s;\n", tl->typb[i].name, hn);
|
||||
if (guard)
|
||||
{
|
||||
if (*guard != 0)
|
||||
@ -589,6 +608,7 @@ TI2_typlib_forward_declare (FILE *fp, sTI2TypLib *tl, int behdr)
|
||||
befirst = 1;
|
||||
for (i=0;i<tl->nr_typinfos;i++)
|
||||
{
|
||||
char *hn;
|
||||
if (tl->typb[i].kind != TKIND_UNION)
|
||||
continue;
|
||||
if (befirst)
|
||||
@ -600,7 +620,10 @@ TI2_typlib_forward_declare (FILE *fp, sTI2TypLib *tl, int behdr)
|
||||
guard = mk_guard (tl->typb[i].name, "_FORWARDER_DEFINED");
|
||||
if (guard && *guard != 0)
|
||||
fprintf (fp, "#ifndef %s\n#define %s\n", guard, guard);
|
||||
fprintf (fp, "%s;\n", tl->typb[i].name);
|
||||
if ((hn = strchr (tl->typb[i].name, ' ')) == NULL)
|
||||
hn = tl->typb[i].name;
|
||||
else hn++;
|
||||
fprintf (fp, "typedef %s %s;\n", tl->typb[i].name, hn);
|
||||
if (guard)
|
||||
{
|
||||
if (*guard != 0)
|
||||
@ -618,7 +641,7 @@ TI2_typlib_forward_declare (FILE *fp, sTI2TypLib *tl, int behdr)
|
||||
continue;
|
||||
if (befirst)
|
||||
{
|
||||
fprintf (fp, "/* Union record forward declarations. */\n");
|
||||
fprintf (fp, "/* Dispatch record forward declarations. */\n");
|
||||
befirst = 0;
|
||||
}
|
||||
if (behdr)
|
||||
@ -643,7 +666,7 @@ TI2_typlib_forward_declare (FILE *fp, sTI2TypLib *tl, int behdr)
|
||||
continue;
|
||||
if (befirst)
|
||||
{
|
||||
fprintf (fp, "/* Union record forward declarations. */\n");
|
||||
fprintf (fp, "/* Coclass record forward declarations. */\n");
|
||||
befirst = 0;
|
||||
}
|
||||
if (behdr)
|
||||
|
@ -983,7 +983,7 @@ getVTTypeName (uint32_t vt, uint32_t *dataSize)
|
||||
case 8: /* VT_BSTR */ name = "BSTR"; sz = 0xfffffffe; break;
|
||||
case 9: /* VT_DISPATCH */ name = "IDispatch *"; sz = 0xffffffff; break;
|
||||
case 10: /* VT_ERROR */ name = "SCODE"; sz = 4; break;
|
||||
case 11: /* VT_BOOL */ name = "BOOL"; sz = 2; break;
|
||||
case 11: /* VT_BOOL */ name = "WINBOOL"; sz = 2; break;
|
||||
case 12: /* VT_VARIANT */ name = "VARIANT"; sz = 0xffffffff; break;
|
||||
case 13: /* VT_UNKNOWN */ name = "IUnknown *"; sz = 0xffffffff; break;
|
||||
case 14: /* VT_DECIMAL */ name = "DECIMAL"; sz = 16; break;
|
||||
@ -1242,7 +1242,7 @@ printValue (FILE *fp, sTITyps *typs, uint32_t val)
|
||||
case 10: /* VT_ERROR */
|
||||
fprintf (fp, "(SCODE) %d", u.i4); break;
|
||||
case 11: /* VT_BOOL */
|
||||
fprintf (fp, "(BOOL) %d", u.i2); break;
|
||||
fprintf (fp, "(WINBOOL) %d", u.i2); break;
|
||||
case 12: /* VT_VARIANT */
|
||||
fprintf (fp, "(VARIANT) 0x%x", u.ui4); break;
|
||||
case 13: /* VT_UNKNOWN */
|
||||
@ -1267,7 +1267,7 @@ printValue (FILE *fp, sTITyps *typs, uint32_t val)
|
||||
#ifdef _WIN32
|
||||
fprintf (fp, "(ULONGLONG) 0x%I64xULL", u.ui8); break;
|
||||
#else
|
||||
fprintf (fp, "(LONGLONG) 0x%llxULL", u.ui8); break;
|
||||
fprintf (fp, "(ULONGLONG) 0x%llxULL", u.ui8); break;
|
||||
#endif
|
||||
case 22: /* VT_INT */
|
||||
fprintf (fp, "(int) %d", u.i4); break;
|
||||
|
Loading…
Reference in New Issue
Block a user