X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tools%2Fprotoparse.h;h=39bbd2c6921ffeab58ef4d57cd6cc075a35af72b;hb=e56ab892c4ff9eef34f85fab010d7084b9c59e81;hp=c7d41dc34a44ee18261d13e370656eb65cedc638;hpb=3ebea2cf10a8b0bdddff91b7c639afb1d56e2f0b;p=ia32rtools.git diff --git a/tools/protoparse.h b/tools/protoparse.h index c7d41dc..39bbd2c 100644 --- a/tools/protoparse.h +++ b/tools/protoparse.h @@ -28,6 +28,7 @@ struct parsed_proto { unsigned int is_stdcall:1; unsigned int is_vararg:1; unsigned int is_fptr:1; + unsigned int is_noreturn:1; }; static const char *hdrfn; @@ -121,22 +122,35 @@ static const char *known_type_mod[] = { }; static const char *known_ptr_types[] = { + "HACCEL", "HANDLE", - "HMODULE", - "HINSTANCE", - "HWND", + "HBITMAP", + "HCURSOR", "HDC", "HGDIOBJ", + "HGLOBAL", + "HINSTANCE", + "HMODULE", + "HRGN", + "HRSRC", + "HKEY", + "HMENU", + "HWND", "PLONG", "PDWORD", "PVOID", "PCVOID", + "DLGPROC", + "va_list", + "__VALIST", }; static const char *ignored_keywords[] = { "extern", "WINBASEAPI", "WINUSERAPI", + "WINGDIAPI", + "WINADVAPI", }; // returns ptr to char after type ends @@ -256,6 +270,11 @@ static int parse_protostr(char *protostr, struct parsed_proto *pp) p1[0] = p1[1] = ' '; } + if (!strncmp(p, "DECLSPEC_NORETURN ", 18)) { + pp->is_noreturn = 1; + p = sskip(p + 18); + } + for (i = 0; i < ARRAY_SIZE(ignored_keywords); i++) { l = strlen(ignored_keywords[i]); if (!strncmp(p, ignored_keywords[i], l) && my_isblank(p[l]))