kernel-doc (55b4d6a52195a8f277ffddf755ddaff359878f41) | kernel-doc (1d7e1d4517f11ebeb80f92e227c8fdbc3215385c) |
---|---|
1#!/usr/bin/perl -w 2 3use strict; 4 5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 7## Copyright (C) 2001 Simon Huggins ## 8## ## --- 1042 unchanged lines hidden (view full) --- 1051 $parameter_name =~ s/\[.*//; 1052 1053 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next; 1054 $type = $args{'parametertypes'}{$parameter}; 1055 if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) { 1056 # pointer-to-function 1057 print ".BI \" ".$1."\" ".$parameter." \") (".$2.")"."\"\n;\n"; 1058 } elsif ($type =~ m/^(.*?)\s*(:.*)/) { | 1#!/usr/bin/perl -w 2 3use strict; 4 5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## 7## Copyright (C) 2001 Simon Huggins ## 8## ## --- 1042 unchanged lines hidden (view full) --- 1051 $parameter_name =~ s/\[.*//; 1052 1053 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next; 1054 $type = $args{'parametertypes'}{$parameter}; 1055 if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) { 1056 # pointer-to-function 1057 print ".BI \" ".$1."\" ".$parameter." \") (".$2.")"."\"\n;\n"; 1058 } elsif ($type =~ m/^(.*?)\s*(:.*)/) { |
1059 print ".BI \" ".$1."\" ".$parameter.$2." \""."\"\n;\n"; | 1059 # bitfield 1060 print ".BI \" ".$1."\ \" ".$parameter.$2." \""."\"\n;\n"; |
1060 } else { 1061 $type =~ s/([^\*])$/$1 /; 1062 print ".BI \" ".$type."\" ".$parameter." \""."\"\n;\n"; 1063 } 1064 print "\n.br\n"; 1065 } 1066 print "};\n.br\n"; 1067 --- 96 unchanged lines hidden (view full) --- 1164 1165# output enum in text 1166sub output_enum_text(%) { 1167 my %args = %{$_[0]}; 1168 my ($parameter); 1169 my $count; 1170 print "Enum:\n\n"; 1171 | 1061 } else { 1062 $type =~ s/([^\*])$/$1 /; 1063 print ".BI \" ".$type."\" ".$parameter." \""."\"\n;\n"; 1064 } 1065 print "\n.br\n"; 1066 } 1067 print "};\n.br\n"; 1068 --- 96 unchanged lines hidden (view full) --- 1165 1166# output enum in text 1167sub output_enum_text(%) { 1168 my %args = %{$_[0]}; 1169 my ($parameter); 1170 my $count; 1171 print "Enum:\n\n"; 1172 |
1173 print "enum ".$args{'enum'}." - ".$args{'purpose'}."\n\n"; |
|
1172 print "enum ".$args{'enum'}." {\n"; 1173 $count = 0; 1174 foreach $parameter (@{$args{'parameterlist'}}) { 1175 print "\t$parameter"; 1176 if ($count != $#{$args{'parameterlist'}}) { 1177 $count++; 1178 print ","; 1179 } --- 12 unchanged lines hidden (view full) --- 1192 1193# output typedef in text 1194sub output_typedef_text(%) { 1195 my %args = %{$_[0]}; 1196 my ($parameter); 1197 my $count; 1198 print "Typedef:\n\n"; 1199 | 1174 print "enum ".$args{'enum'}." {\n"; 1175 $count = 0; 1176 foreach $parameter (@{$args{'parameterlist'}}) { 1177 print "\t$parameter"; 1178 if ($count != $#{$args{'parameterlist'}}) { 1179 $count++; 1180 print ","; 1181 } --- 12 unchanged lines hidden (view full) --- 1194 1195# output typedef in text 1196sub output_typedef_text(%) { 1197 my %args = %{$_[0]}; 1198 my ($parameter); 1199 my $count; 1200 print "Typedef:\n\n"; 1201 |
1200 print "typedef ".$args{'typedef'}."\n"; | 1202 print "typedef ".$args{'typedef'}." - ".$args{'purpose'}."\n"; |
1201 output_section_text(@_); 1202} 1203 1204# output struct as text 1205sub output_struct_text(%) { 1206 my %args = %{$_[0]}; 1207 my ($parameter); 1208 | 1203 output_section_text(@_); 1204} 1205 1206# output struct as text 1207sub output_struct_text(%) { 1208 my %args = %{$_[0]}; 1209 my ($parameter); 1210 |
1209 print $args{'type'}." ".$args{'struct'}.":\n\n"; | 1211 print $args{'type'}." ".$args{'struct'}." - ".$args{'purpose'}."\n\n"; |
1210 print $args{'type'}." ".$args{'struct'}." {\n"; 1211 foreach $parameter (@{$args{'parameterlist'}}) { 1212 if ($parameter =~ /^#/) { 1213 print "$parameter\n"; 1214 next; 1215 } 1216 1217 my $parameter_name = $parameter; --- 679 unchanged lines hidden --- | 1212 print $args{'type'}." ".$args{'struct'}." {\n"; 1213 foreach $parameter (@{$args{'parameterlist'}}) { 1214 if ($parameter =~ /^#/) { 1215 print "$parameter\n"; 1216 next; 1217 } 1218 1219 my $parameter_name = $parameter; --- 679 unchanged lines hidden --- |