X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tools%2Fprotoparse.h;h=037c3f4260417db7430bb35ac9258a9ae14f28f1;hb=27ebfaed5dcb3fa037438d8a13404c6b957c6c11;hp=26b0e0048cd5728b442df0ae3c64b9e8ab6302bb;hpb=b0d802b2ddecf36d2c76a7647e16c80cb55c5bb2;p=ia32rtools.git diff --git a/tools/protoparse.h b/tools/protoparse.h index 26b0e00..037c3f4 100644 --- a/tools/protoparse.h +++ b/tools/protoparse.h @@ -742,6 +742,30 @@ struct parsed_proto *proto_clone(const struct parsed_proto *pp_c) return pp; } + +static inline int pp_cmp_func(const struct parsed_proto *pp1, + const struct parsed_proto *pp2) +{ + int i; + + if (pp1->argc != pp2->argc || pp1->argc_reg != pp2->argc_reg) + return 1; + else { + for (i = 0; i < pp1->argc; i++) { + if ((pp1->arg[i].reg != NULL) != (pp2->arg[i].reg != NULL)) + return 1; + + if ((pp1->arg[i].reg != NULL) + && !IS(pp1->arg[i].reg, pp2->arg[i].reg)) + { + return 1; + } + } + } + + return 0; +} + static inline void pp_print(char *buf, size_t buf_size, const struct parsed_proto *pp) {