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
31 for my $m (sort keys %macros) {
32 my @docs = @{$macros{$m}};
33 my $heading = shift @docs;
34 # Strip leading and trailing blanks
35 while(@docs > 0 and $docs[0] eq '') {
38 while(@docs > 0 and $docs[$#docs] eq '') {
42 print ".B $heading\n";
44 if($d =~ /^-\s*([^:]+):\s+(.*)/) {
69 # Keep sentence-ending full stops at end of line