kernel-doc (6450c8957ee3a8f58191c2ed6c5b71c7b7d1b310) kernel-doc (ecbcfba126e857de8dd4996fe31fad782dd6bae0)
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 ##

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

1818 print $type . " " . $parameter;
1819 }
1820 }
1821 print ")\n\n";
1822 $lineprefix = " ";
1823 output_highlight_rst($args{'purpose'});
1824 print "\n";
1825
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 ##

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

1818 print $type . " " . $parameter;
1819 }
1820 }
1821 print ")\n\n";
1822 $lineprefix = " ";
1823 output_highlight_rst($args{'purpose'});
1824 print "\n";
1825
1826 print ":Parameters:\n\n";
1827 $lineprefix = " ";
1826 print "**Parameters**\n\n";
1827 $lineprefix = " ";
1828 foreach $parameter (@{$args{'parameterlist'}}) {
1829 my $parameter_name = $parameter;
1830 #$parameter_name =~ s/\[.*//;
1831 $type = $args{'parametertypes'}{$parameter};
1832
1833 if ($type ne "") {
1828 foreach $parameter (@{$args{'parameterlist'}}) {
1829 my $parameter_name = $parameter;
1830 #$parameter_name =~ s/\[.*//;
1831 $type = $args{'parametertypes'}{$parameter};
1832
1833 if ($type ne "") {
1834 print " ``$type $parameter``\n";
1834 print "``$type $parameter``\n";
1835 } else {
1835 } else {
1836 print " ``$parameter``\n";
1836 print "``$parameter``\n";
1837 }
1838 if (defined($args{'parameterdescs'}{$parameter_name}) &&
1839 $args{'parameterdescs'}{$parameter_name} ne $undescribed) {
1840 output_highlight_rst($args{'parameterdescs'}{$parameter_name});
1841 } else {
1837 }
1838 if (defined($args{'parameterdescs'}{$parameter_name}) &&
1839 $args{'parameterdescs'}{$parameter_name} ne $undescribed) {
1840 output_highlight_rst($args{'parameterdescs'}{$parameter_name});
1841 } else {
1842 print "\n _undescribed_\n";
1842 print " _undescribed_\n";
1843 }
1844 print "\n";
1845 }
1846
1847 $lineprefix = $oldprefix;
1848 output_section_rst(@_);
1849}
1850
1851sub output_section_rst(%) {
1852 my %args = %{$_[0]};
1853 my $section;
1854 my $oldprefix = $lineprefix;
1843 }
1844 print "\n";
1845 }
1846
1847 $lineprefix = $oldprefix;
1848 output_section_rst(@_);
1849}
1850
1851sub output_section_rst(%) {
1852 my %args = %{$_[0]};
1853 my $section;
1854 my $oldprefix = $lineprefix;
1855 $lineprefix = " ";
1855 $lineprefix = "";
1856
1857 foreach $section (@{$args{'sectionlist'}}) {
1856
1857 foreach $section (@{$args{'sectionlist'}}) {
1858 print ":$section:\n\n";
1858 print "**$section**\n\n";
1859 output_highlight_rst($args{'sections'}{$section});
1860 print "\n";
1861 }
1862 print "\n";
1863 $lineprefix = $oldprefix;
1864}
1865
1866sub output_enum_rst(%) {
1867 my %args = %{$_[0]};
1868 my ($parameter);
1869 my $oldprefix = $lineprefix;
1870 my $count;
1871 my $name = "enum " . $args{'enum'};
1872
1873 print "\n\n.. c:type:: " . $name . "\n\n";
1874 $lineprefix = " ";
1875 output_highlight_rst($args{'purpose'});
1876 print "\n";
1877
1859 output_highlight_rst($args{'sections'}{$section});
1860 print "\n";
1861 }
1862 print "\n";
1863 $lineprefix = $oldprefix;
1864}
1865
1866sub output_enum_rst(%) {
1867 my %args = %{$_[0]};
1868 my ($parameter);
1869 my $oldprefix = $lineprefix;
1870 my $count;
1871 my $name = "enum " . $args{'enum'};
1872
1873 print "\n\n.. c:type:: " . $name . "\n\n";
1874 $lineprefix = " ";
1875 output_highlight_rst($args{'purpose'});
1876 print "\n";
1877
1878 print "..\n\n:Constants:\n\n";
1879 $lineprefix = " ";
1878 print "**Constants**\n\n";
1879 $lineprefix = " ";
1880 foreach $parameter (@{$args{'parameterlist'}}) {
1880 foreach $parameter (@{$args{'parameterlist'}}) {
1881 print " `$parameter`\n";
1881 print "``$parameter``\n";
1882 if ($args{'parameterdescs'}{$parameter} ne $undescribed) {
1883 output_highlight_rst($args{'parameterdescs'}{$parameter});
1884 } else {
1882 if ($args{'parameterdescs'}{$parameter} ne $undescribed) {
1883 output_highlight_rst($args{'parameterdescs'}{$parameter});
1884 } else {
1885 print " undescribed\n";
1885 print " _undescribed_\n";
1886 }
1887 print "\n";
1888 }
1889
1890 $lineprefix = $oldprefix;
1891 output_section_rst(@_);
1892}
1893

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

1913 my $oldprefix = $lineprefix;
1914 my $name = $args{'type'} . " " . $args{'struct'};
1915
1916 print "\n\n.. c:type:: " . $name . "\n\n";
1917 $lineprefix = " ";
1918 output_highlight_rst($args{'purpose'});
1919 print "\n";
1920
1886 }
1887 print "\n";
1888 }
1889
1890 $lineprefix = $oldprefix;
1891 output_section_rst(@_);
1892}
1893

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

1913 my $oldprefix = $lineprefix;
1914 my $name = $args{'type'} . " " . $args{'struct'};
1915
1916 print "\n\n.. c:type:: " . $name . "\n\n";
1917 $lineprefix = " ";
1918 output_highlight_rst($args{'purpose'});
1919 print "\n";
1920
1921 print ":Definition:\n\n";
1922 print " ::\n\n";
1921 print "**Definition**\n\n";
1922 print "::\n\n";
1923 print " " . $args{'type'} . " " . $args{'struct'} . " {\n";
1924 foreach $parameter (@{$args{'parameterlist'}}) {
1925 if ($parameter =~ /^#/) {
1923 print " " . $args{'type'} . " " . $args{'struct'} . " {\n";
1924 foreach $parameter (@{$args{'parameterlist'}}) {
1925 if ($parameter =~ /^#/) {
1926 print " " . "$parameter\n";
1926 print " " . "$parameter\n";
1927 next;
1928 }
1929
1930 my $parameter_name = $parameter;
1931 $parameter_name =~ s/\[.*//;
1932
1933 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
1934 $type = $args{'parametertypes'}{$parameter};

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

1939 # bitfield
1940 print " $1 $parameter$2;\n";
1941 } else {
1942 print " " . $type . " " . $parameter . ";\n";
1943 }
1944 }
1945 print " };\n\n";
1946
1927 next;
1928 }
1929
1930 my $parameter_name = $parameter;
1931 $parameter_name =~ s/\[.*//;
1932
1933 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
1934 $type = $args{'parametertypes'}{$parameter};

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

1939 # bitfield
1940 print " $1 $parameter$2;\n";
1941 } else {
1942 print " " . $type . " " . $parameter . ";\n";
1943 }
1944 }
1945 print " };\n\n";
1946
1947 print ":Members:\n\n";
1948 $lineprefix = " ";
1947 print "**Members**\n\n";
1948 $lineprefix = " ";
1949 foreach $parameter (@{$args{'parameterlist'}}) {
1950 ($parameter =~ /^#/) && next;
1951
1952 my $parameter_name = $parameter;
1953 $parameter_name =~ s/\[.*//;
1954
1955 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
1956 $type = $args{'parametertypes'}{$parameter};
1949 foreach $parameter (@{$args{'parameterlist'}}) {
1950 ($parameter =~ /^#/) && next;
1951
1952 my $parameter_name = $parameter;
1953 $parameter_name =~ s/\[.*//;
1954
1955 ($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
1956 $type = $args{'parametertypes'}{$parameter};
1957 print " `$type $parameter`" . "\n";
1957 print "``$type $parameter``\n";
1958 output_highlight_rst($args{'parameterdescs'}{$parameter_name});
1959 print "\n";
1960 }
1961 print "\n";
1962
1963 $lineprefix = $oldprefix;
1964 output_section_rst(@_);
1965}

--- 1063 unchanged lines hidden ---
1958 output_highlight_rst($args{'parameterdescs'}{$parameter_name});
1959 print "\n";
1960 }
1961 print "\n";
1962
1963 $lineprefix = $oldprefix;
1964 output_section_rst(@_);
1965}

--- 1063 unchanged lines hidden ---