1
1
# !/usr/bin/perl -w
2
2
3
3
use v5.41;
4
- no feature ' signatures' ; # For the time being, to avoid converting
5
4
use Text::Tabs;
6
5
7
6
# Unconditionally regenerate:
470
469
' vutil.c' => $versioning_scn ,
471
470
);
472
471
473
- sub where_from_string ($;$) {
474
- my ($file , $line_num ) = @_ ;
472
+ sub where_from_string ($file , $line_num = 0) {
475
473
476
474
# Returns a string of hopefully idiomatic text about the location given by
477
475
# the input parameters. The line number is not always available, and this
@@ -632,8 +630,7 @@ sub check_and_add_proto_defn {
632
630
return \$elements {$element };
633
631
}
634
632
635
- sub classify_input_line ($$$$) {
636
- my ($file , $line_num , $input , $is_file_C ) = @_ ;
633
+ sub classify_input_line ($file , $line_num , $input , $is_file_C ) {
637
634
638
635
# Looks at an input line and classifies it as to if it is of use to us or
639
636
# not, and if so, what class of apidoc line it is. It looks for common
@@ -761,8 +758,7 @@ ($$$$)
761
758
EOS
762
759
}
763
760
764
- sub handle_apidoc_line ($$$$) {
765
- my ($file , $line_num , $type , $arg ) = @_ ;
761
+ sub handle_apidoc_line ($file , $line_num , $type , $arg ) {
766
762
767
763
# This just does a couple of checks that would otherwise have to be
768
764
# duplicated in the calling code, and calls check_and_add_proto_defn() to
@@ -806,16 +802,14 @@ ($$$$)
806
802
return $updated ;
807
803
}
808
804
809
- sub destination_pod ($) { # Into which pod should the element go whose flags
810
- # are $1
811
- my $flags = shift ;
805
+ sub destination_pod ($flags ) { # Into which pod should the element go whose
806
+ # flags are $1
812
807
return " unknown" if $flags eq " " ;
813
808
return $api if $flags =~ / A/ ;
814
809
return $intern ;
815
810
}
816
811
817
- sub autodoc ($$) { # parse a file and extract documentation info
818
- my ($fh , $file ) = @_ ;
812
+ sub autodoc ($fh , $file ) { # parse a file and extract documentation info
819
813
820
814
my $section = $initial_file_section {$file }
821
815
if defined $initial_file_section {$file };
@@ -1584,8 +1578,7 @@ sub parse_config_h {
1584
1578
}
1585
1579
}
1586
1580
1587
- sub format_pod_indexes ($) {
1588
- my $entries_ref = shift ;
1581
+ sub format_pod_indexes ($entries_ref ) {
1589
1582
1590
1583
# Output the X<> references to the names, packed since they don't get
1591
1584
# displayed, but not too many per line so that when someone is editing the
@@ -1612,9 +1605,8 @@ ($)
1612
1605
return $text ;
1613
1606
}
1614
1607
1615
- sub docout ($$$) { # output the docs for one function group
1616
- my ($fh , $element_name , $docref ) = @_ ;
1617
-
1608
+ sub docout ($fh , $element_name , $docref ) { # output the docs for one function
1609
+ # group
1618
1610
# Trim trailing space
1619
1611
$element_name =~ s /\s *$// ;
1620
1612
@@ -2160,8 +2152,7 @@ ($$$)
2160
2152
print $fh " \n " ;
2161
2153
}
2162
2154
2163
- sub construct_missings_section {
2164
- my ($missings_hdr , $missings_ref ) = @_ ;
2155
+ sub construct_missings_section ($missings_hdr , $missings_ref ) {
2165
2156
my $text = " " ;
2166
2157
2167
2158
$text .= " $missings_hdr \n " . format_pod_indexes($missings_ref );
@@ -2239,8 +2230,7 @@ sub dictionary_order {
2239
2230
return $a cmp $b ;
2240
2231
}
2241
2232
2242
- sub output ($) { # Output a complete pod file
2243
- my $destpod = shift ;
2233
+ sub output ($destpod ) { # Output a complete pod file
2244
2234
my $podname = $destpod -> {podname };
2245
2235
my $dochash = $destpod -> {docs };
2246
2236
0 commit comments