kernel-doc (3a80a766328fe73df5951639b5c9013ddba6efec) kernel-doc (837664528e17380cfacfb766de37df31572f07a0)
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 ##

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

1864 }
1865}
1866
1867sub dump_typedef($$) {
1868 my $x = shift;
1869 my $file = shift;
1870
1871 $x =~ s@/\*.*?\*/@@gos; # strip comments.
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 ##

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

1864 }
1865}
1866
1867sub dump_typedef($$) {
1868 my $x = shift;
1869 my $file = shift;
1870
1871 $x =~ s@/\*.*?\*/@@gos; # strip comments.
1872 while (($x =~ /\(*.\)\s*;$/) || ($x =~ /\[*.\]\s*;$/)) {
1873 $x =~ s/\(*.\)\s*;$/;/;
1874 $x =~ s/\[*.\]\s*;$/;/;
1875 }
1876
1872
1877 if ($x =~ /typedef.*\s+(\w+)\s*;/) {
1878 $declaration_name = $1;
1873 # Parse function prototypes
1874 if ($x =~ /typedef\s+(\w+)\s*\(\*\s*(\w\S+)\s*\)\s*\((.*)\);/) {
1875 # Function typedefs
1876 $return_type = $1;
1877 $declaration_name = $2;
1878 my $args = $3;
1879
1879
1880 create_parameterlist($args, ',', $file);
1881
1880 output_declaration($declaration_name,
1882 output_declaration($declaration_name,
1881 'typedef',
1882 {'typedef' => $declaration_name,
1883 'function',
1884 {'function' => $declaration_name,
1883 'module' => $modulename,
1885 'module' => $modulename,
1886 'functiontype' => $return_type,
1887 'parameterlist' => \@parameterlist,
1888 'parameterdescs' => \%parameterdescs,
1889 'parametertypes' => \%parametertypes,
1884 'sectionlist' => \@sectionlist,
1885 'sections' => \%sections,
1886 'purpose' => $declaration_purpose
1887 });
1890 'sectionlist' => \@sectionlist,
1891 'sections' => \%sections,
1892 'purpose' => $declaration_purpose
1893 });
1894 return;
1888 }
1895 }
1889 elsif ($x =~ /typedef\s+\w+\s*\(\*\s*(\w\S+)\s*\)\s*\(/) { # functions
1896
1897 while (($x =~ /\(*.\)\s*;$/) || ($x =~ /\[*.\]\s*;$/)) {
1898 $x =~ s/\(*.\)\s*;$/;/;
1899 $x =~ s/\[*.\]\s*;$/;/;
1900 }
1901
1902 if ($x =~ /typedef.*\s+(\w+)\s*;/) {
1890 $declaration_name = $1;
1891
1892 output_declaration($declaration_name,
1893 'typedef',
1894 {'typedef' => $declaration_name,
1895 'module' => $modulename,
1896 'sectionlist' => \@sectionlist,
1897 'sections' => \%sections,

--- 818 unchanged lines hidden ---
1903 $declaration_name = $1;
1904
1905 output_declaration($declaration_name,
1906 'typedef',
1907 {'typedef' => $declaration_name,
1908 'module' => $modulename,
1909 'sectionlist' => \@sectionlist,
1910 'sections' => \%sections,

--- 818 unchanged lines hidden ---