unsigned int is_struct:1; // split for args
unsigned int is_retreg:1; // register to return to caller
unsigned int is_va_list:1;
+ unsigned int is_64bit:1;
};
struct parsed_proto_arg {
"HACCEL",
"HANDLE",
"HBITMAP",
+ "HBRUSH",
"HCALL",
"HCURSOR",
"HDC",
"HFONT",
"HGDIOBJ",
"HGLOBAL",
+ "HHOOK",
"HICON",
"HINSTANCE",
"HIMC", // DWORD in mingw, ptr in wine..
"PDWORD",
"PFILETIME",
"PLARGE_INTEGER",
+ "PHANDLE",
"PHKEY",
"PLONG",
"PMEMORY_BASIC_INFORMATION",
"PUINT",
+ "PULARGE_INTEGER",
+ "PULONG_PTR",
"PVOID",
"PCVOID",
"PWORD",
+ "REFCLSID",
+ "REFIID",
+ "HOOKPROC",
"DLGPROC",
"TIMERPROC",
"WNDENUMPROC",
pp->is_stdcall = 0; // custom
pp->is_userstack = 1;
}
- else if (IS(cconv, "WINAPI"))
+ else if (IS(cconv, "WINAPI") || IS(cconv, "PASCAL"))
pp->is_stdcall = 1;
else {
printf("%s:%d:%zd: unhandled cconv: '%s'\n",
pp->has_retreg |= is_retreg;
}
- if (strstr(arg->type.name, "int64")
- || IS(arg->type.name, "double"))
+ if (!arg->type.is_ptr && (strstr(arg->type.name, "int64")
+ || IS(arg->type.name, "double")))
{
+ arg->type.is_64bit = 1;
// hack..
- free(arg->type.name);
- arg->type.name = strdup("int");
pp_copy_arg(&pp->arg[xarg], arg);
+ arg = &pp->arg[xarg];
xarg++;
+ free(arg->type.name);
+ arg->type.name = strdup("dummy");
}
ret = check_struct_arg(arg);
if (pp_cache == NULL)
build_caches(fhdr);
- if (sym[0] == '_') // && strncmp(fname, "stdc", 4) == 0)
+ // ugh...
+ if (sym[0] == '_' && !IS_START(sym, "__W"))
sym++;
strcpy(pp_search.name, sym);