X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tools%2Fprotoparse.h;h=549c9031c7f7a420b029d91c23525d3c0d58e7ef;hb=b62264bc4262d6f0e35ebb089ee6b9151bd378f8;hp=93129a17f0ba32ae0d82350b95748e18eee29b1e;hpb=f9327ad4c893cce131ab39f91743d69ebac662d1;p=ia32rtools.git diff --git a/tools/protoparse.h b/tools/protoparse.h index 93129a1..549c903 100644 --- a/tools/protoparse.h +++ b/tools/protoparse.h @@ -15,6 +15,8 @@ struct parsed_type { 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; + unsigned int is_float:1; // float, double }; struct parsed_proto_arg { @@ -214,8 +216,10 @@ static const char *known_ptr_types[] = { "HMENU", "HWAVEOUT", "HWND", + "PAPPBARDATA", "PBYTE", "PCRITICAL_SECTION", + "PDEVMODEA", "PDWORD", "PFILETIME", "PLARGE_INTEGER", @@ -667,14 +671,22 @@ static int parse_protostr(char *protostr, struct parsed_proto *pp) pp->has_retreg |= is_retreg; } + if (IS(arg->type.name, "float") + || IS(arg->type.name, "double")) + { + arg->type.is_float = 1; + } + 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);