7 while(defined($_ = <>)) {
9 if(!defined $name and m,^/\* (\@([a-z\-]+).*),) {
13 $macros{$name} = $docs;
17 # Identify and strip trailing */
20 # Strip trailing spaces
22 # Strip leading comment indicator and spaces
29 # Generate docs in name order
30 for my $m (sort keys %macros) {
31 my @docs = @{$macros{$m}};
32 my $heading = shift @docs;
33 # Strip leading and trailing blanks
34 while(@docs > 0 and $docs[0] eq '') {
37 while(@docs > 0 and $docs[$#docs] eq '') {
41 print ".B $heading\n";
51 # Keep sentence-ending full stops at end of line