2 # SPDX-License-Identifier: GPL-2.0-only
9 # sort comparison function
16 # This always sorts last
17 $a =~ s/THE REST/ZZZZZZ/g;
18 $b =~ s/THE REST/ZZZZZZ/g;
25 my $sort_method = \
&by_category
;
28 foreach $key (sort $sort_method keys %map) {
30 print $sep . $key . "\n";
53 if ($line =~ m/^([A-Z]):\s*(.*)/) {
54 $line = $1 . ":\t" . trim
($2) . "\n";
55 if ($lastline eq "") {
56 $map{$case} = $map{$case} . $line;
59 $case = trim
($lastline);
60 exists $map{$case} and die "Header '$case' already exists";
67 $map{$case} = $map{$case} . $lastline;
71 trim
($lastline) eq "" or die ("Odd non-pattern line '$lastline' for '$case'");
74 $map{$case} = $map{$case} . $lastline;