And when I corrected the spelling, I discovered that it would never have
worked if spelled correctly on perls that predate this feature. So I
used a less efficient loop.
(cherry picked from commit
e1584b7d3806e80c64225acc2dd0e4b0ee45196e)
Signed-off-by: Nicolas R <atoomic@cpan.org>
s/\b(?:auto|extern|inline|register|static|volatile|restrict)\b//g;
s/\b(?:$remove)\b//;
- s/ (?=<\*) \s+ (?=\*) //xg; # No spaces in pointer sequences
- s/ \s* ( \*+ ) \s* / $1 /xg; # Normalize pointer sequences to be surrounded
- # by a single space
- s/^\s+//; s/\s+$//; # No leading, trailing spacd
- s/\s+/ /g; # Collapse multiple space into one
+ while (s/ \* \s+ \* /**/xg) {} # No spaces within pointer sequences
+ s/ \s* ( \*+ ) \s* / $1 /xg; # Normalize pointer sequences to be surrounded
+ # by a single space
+ s/^\s+//; s/\s+$//; # No leading, trailing spacd
+ s/\s+/ /g; # Collapse multiple space into one
return ($_, $name);
}