kernel-doc (c0d1b6ee780ab16f16cdbe046aa9c83a2a31f9e2) kernel-doc (6285097654725f39357527b553d03b70bfbaf4d2)
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## Copyright (C) 2005-2012 Randy Dunlap ##

--- 261 unchanged lines hidden (view full) ---

270 [$type_param, "\$1"]
271 );
272my $blankline_text = "";
273
274# rst-mode
275my @highlights_rst = (
276 [$type_constant, "``\$1``"],
277 [$type_func, "\\:c\\:func\\:`\$1`"],
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## Copyright (C) 2005-2012 Randy Dunlap ##

--- 261 unchanged lines hidden (view full) ---

270 [$type_param, "\$1"]
271 );
272my $blankline_text = "";
273
274# rst-mode
275my @highlights_rst = (
276 [$type_constant, "``\$1``"],
277 [$type_func, "\\:c\\:func\\:`\$1`"],
278 [$type_struct_full, "\\:ref\\:`\$1 \$2`"],
279 [$type_enum_full, "\\:ref\\:`\$1 \$2`"],
280 [$type_struct, "\\:ref\\:`struct \$1`"],
278 [$type_struct_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
279 [$type_enum_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
280 [$type_struct, "\\:c\\:type\\:`struct \$1 <\$1>`"],
281 [$type_param, "**\$1**"]
282 );
283my $blankline_rst = "\n";
284
285# list mode
286my @highlights_list = (
287 [$type_constant, "\$1"],
288 [$type_func, "\$1"],

--- 1541 unchanged lines hidden (view full) ---

1830 print "\n";
1831 $lineprefix = $oldprefix;
1832}
1833
1834sub output_enum_rst(%) {
1835 my %args = %{$_[0]};
1836 my ($parameter);
1837 my $count;
281 [$type_param, "**\$1**"]
282 );
283my $blankline_rst = "\n";
284
285# list mode
286my @highlights_list = (
287 [$type_constant, "\$1"],
288 [$type_func, "\$1"],

--- 1541 unchanged lines hidden (view full) ---

1830 print "\n";
1831 $lineprefix = $oldprefix;
1832}
1833
1834sub output_enum_rst(%) {
1835 my %args = %{$_[0]};
1836 my ($parameter);
1837 my $count;
1838
1839 my $name = "enum " . $args{'enum'};
1838 my $name = "enum " . $args{'enum'};
1840 print ".. _" . $name . ":\n\n";
1841 print "**$name**\n\n";
1839
1840 print "\n\n.. c:type:: " . $name . "\n\n";
1842 print " " . $args{'purpose'} . "\n\n";
1843
1844 print "..\n\n:Constants:\n\n";
1845 my $oldprefix = $lineprefix;
1846 $lineprefix = " ";
1847 foreach $parameter (@{$args{'parameterlist'}}) {
1848 print " `$parameter`\n";
1849 if ($args{'parameterdescs'}{$parameter} ne $undescribed) {

--- 8 unchanged lines hidden (view full) ---

1858}
1859
1860sub output_typedef_rst(%) {
1861 my %args = %{$_[0]};
1862 my ($parameter);
1863 my $count;
1864 my $name = "typedef " . $args{'typedef'};
1865
1841 print " " . $args{'purpose'} . "\n\n";
1842
1843 print "..\n\n:Constants:\n\n";
1844 my $oldprefix = $lineprefix;
1845 $lineprefix = " ";
1846 foreach $parameter (@{$args{'parameterlist'}}) {
1847 print " `$parameter`\n";
1848 if ($args{'parameterdescs'}{$parameter} ne $undescribed) {

--- 8 unchanged lines hidden (view full) ---

1857}
1858
1859sub output_typedef_rst(%) {
1860 my %args = %{$_[0]};
1861 my ($parameter);
1862 my $count;
1863 my $name = "typedef " . $args{'typedef'};
1864
1866 print "**$name**\n\n";
1867 print $args{'purpose'} . "\n\n";
1865 ### FIXME: should the name below contain "typedef" or not?
1866 print "\n\n.. c:type:: " . $name . "\n\n";
1867 print " " . $args{'purpose'} . "\n\n";
1868
1869 output_section_rst(@_);
1870}
1871
1872sub output_struct_rst(%) {
1873 my %args = %{$_[0]};
1874 my ($parameter);
1875 my $name = $args{'type'} . " " . $args{'struct'};
1876
1868
1869 output_section_rst(@_);
1870}
1871
1872sub output_struct_rst(%) {
1873 my %args = %{$_[0]};
1874 my ($parameter);
1875 my $name = $args{'type'} . " " . $args{'struct'};
1876
1877 print ".. _" . $name . ":\n\n";
1878 print "**$name**\n\n";
1877 print "\n\n.. c:type:: " . $name . "\n\n";
1879 print " " . $args{'purpose'} . "\n\n";
1880
1881 print ":Definition:\n\n";
1882 print " ::\n\n";
1883 print " " . $args{'type'} . " " . $args{'struct'} . " {\n";
1884 foreach $parameter (@{$args{'parameterlist'}}) {
1885 if ($parameter =~ /^#/) {
1886 print " " . "$parameter\n";

--- 1086 unchanged lines hidden ---
1878 print " " . $args{'purpose'} . "\n\n";
1879
1880 print ":Definition:\n\n";
1881 print " ::\n\n";
1882 print " " . $args{'type'} . " " . $args{'struct'} . " {\n";
1883 foreach $parameter (@{$args{'parameterlist'}}) {
1884 if ($parameter =~ /^#/) {
1885 print " " . "$parameter\n";

--- 1086 unchanged lines hidden ---