gendef: Write ; comment after all keywords Ensure that gendef does not put some comment on the line before emitting all keywords which specify the symbol meaning or its parsing. Signed-off-by: Martin Storsjö <martin@martin.st>
diff --git a/mingw-w64-tools/gendef/src/gendef.c b/mingw-w64-tools/gendef/src/gendef.c index 8786954..35b5ebd 100644 --- a/mingw-w64-tools/gendef/src/gendef.c +++ b/mingw-w64-tools/gendef/src/gendef.c
@@ -807,14 +807,9 @@ import_name++; fprintf (fp, "%s%s%s", quote, import_name, quote); } + if (exp->retpop != (uint32_t) -1 && !exp->be64 && has_atdecoration() && exp->name[0] != '?' && !name_has_at_suffix && !name_has_fastcall) + fprintf(fp,"@%u", (unsigned int) exp->retpop); - if (exp->retpop != (uint32_t) -1 && !exp->be64 && has_atdecoration()) - { - if (exp->name[0]=='?') - fprintf(fp," ; has WINAPI (@%u)", (unsigned int) exp->retpop); - else if (!name_has_at_suffix && !name_has_fastcall) - fprintf(fp,"@%u", (unsigned int) exp->retpop); - } if (exp->func == 0 && no_forward_output == 0) fprintf (fp, " = %s", exp->forward); if (exp->name[0] == 0) @@ -831,6 +826,9 @@ fprintf(fp, " == %s%s%s", quote, exp->name, quote); } + if (exp->retpop != (uint32_t) -1 && !exp->be64 && has_atdecoration() && exp->name[0] == '?') + fprintf(fp," ; has WINAPI (@%u)", (unsigned int) exp->retpop); + if (exp->retpop != (uint32_t) -1 || (exp->retpop == 0 && exp->be64) || !has_atdecoration ()) { }