X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tools%2Fprotoparse.h;h=7b449be63d0aefbfee2069aa928097acdce5ff0f;hb=354f5504799c060e73037aa5de26da9ab75c2289;hp=549c9031c7f7a420b029d91c23525d3c0d58e7ef;hpb=b62264bc4262d6f0e35ebb089ee6b9151bd378f8;p=ia32rtools.git diff --git a/tools/protoparse.h b/tools/protoparse.h index 549c903..7b449be 100644 --- a/tools/protoparse.h +++ b/tools/protoparse.h @@ -42,8 +42,10 @@ struct parsed_proto { unsigned int is_fastcall:1; unsigned int is_vararg:1; // vararg func unsigned int is_fptr:1; + unsigned int is_import:1; // data import unsigned int is_noreturn:1; unsigned int is_unresolved:1; + unsigned int is_guessed:1; // for extra checking unsigned int is_userstack:1; unsigned int is_include:1; // not from top-level header unsigned int is_osinc:1; // OS/system library func @@ -214,6 +216,7 @@ static const char *known_ptr_types[] = { "HRSRC", "HKEY", "HMENU", + "HMONITOR", "HWAVEOUT", "HWND", "PAPPBARDATA", @@ -234,7 +237,10 @@ static const char *known_ptr_types[] = { "PCVOID", "PWORD", "REFCLSID", + "REFGUID", "REFIID", + "SC_HANDLE", + "SERVICE_STATUS_HANDLE", "HOOKPROC", "DLGPROC", "TIMERPROC", @@ -401,6 +407,9 @@ static int parse_arg(char **p_, struct parsed_proto_arg *arg, int xarg) if (ret < 0) return -1; + if (IS_START(arg->pp->name, "guess")) + arg->pp->is_guessed = 1; + // we don't use actual names right now... snprintf(arg->pp->name, sizeof(arg->pp->name), "a%d", xarg); @@ -461,6 +470,11 @@ static int parse_protostr(char *protostr, struct parsed_proto *pp) p = sskip(p + l + 1); } + if (IS_START(p, "DECL_IMPORT ")) { + pp->is_import = 1; + p = sskip(p + 12); + } + ret = check_type(p, &pp->ret_type); if (ret <= 0) { printf("%s:%d:%zd: unhandled return in '%s'\n",