Branch: refs/heads/yves/header_parser_format_fixes Home: https://github.com/Perl/perl5 Commit: 51fe66e25189b3051ef3d89d4cec851030f550b3 https://github.com/Perl/perl5/commit/51fe66e25189b3051ef3d89d4cec851030f550b3 Author: Yves Orton <demer...@gmail.com> Date: 2023-04-02 (Sun, 02 Apr 2023)
Changed paths: M embed.fnc M embed.h M proto.h M regen/HeaderParser.pm Log Message: ----------- regen/HeaderParser.pm - with multi-term expressions put least first if we have defined(X) && (defined(Y) || defined(Z)) put the defined(X) first because it has less operations in it. Commit: f12e8d1035bcac281350647d6b2139e1400710e0 https://github.com/Perl/perl5/commit/f12e8d1035bcac281350647d6b2139e1400710e0 Author: Yves Orton <demer...@gmail.com> Date: 2023-04-02 (Sun, 02 Apr 2023) Changed paths: M embed.fnc Log Message: ----------- embed.fnc - remove incorrect comment which in turn allows the nested if clauses to be merged Commit: 3e238e7ccfb4c1f5e13f2092da2e1328573690d7 https://github.com/Perl/perl5/commit/3e238e7ccfb4c1f5e13f2092da2e1328573690d7 Author: Yves Orton <demer...@gmail.com> Date: 2023-04-02 (Sun, 02 Apr 2023) Changed paths: M embed.fnc M embed.h M embedvar.h M proto.h M regen/HeaderParser.pm Log Message: ----------- regen/HeaderParser.pm - remove comments from elif/else/endif when the contents is short it is a bit "noisy" to have comments that duplication the conditions when the original line with the condition is visible on the screen at the same time. this patch changes the rules so we only add these comments when the clause is 10 lines or more from its prior Commit: 6a3f45496a43bf43eb8dba1cd5361127faa5d1a9 https://github.com/Perl/perl5/commit/6a3f45496a43bf43eb8dba1cd5361127faa5d1a9 Author: Yves Orton <demer...@gmail.com> Date: 2023-04-02 (Sun, 02 Apr 2023) Changed paths: M embed.fnc M embed.h M proto.h M regen/HeaderParser.pm M t/porting/header_parser.t Log Message: ----------- regen/HeaderParser.pm - improved expression formatting and wrapping Karl complained about some of the wrapping logic we use for expressions. This tweaks the rules in a number of different ways in an attempt to produce more legible expressions. For instance if we have a complex expression with different parenthesized sub expressions, then try to put each sub expression on its own line. A previous patch ensures that we put shorter sub expressions first, and this patch builds on that to put each sub expression on its own line. We also use different logic to wrap the expressions, with the end result that each line should have the same number of defined() operations on it (with the exception of the last). We also try harder to line up logical operators and defined() functions. Compare: https://github.com/Perl/perl5/compare/51fe66e25189%5E...6a3f45496a43