kernel-doc (6967963d6d5cac40a091d075326f0e3ccb95c58a) kernel-doc (56afb0f8823650f53a5f0e96d69a282e8892c61b)
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-2008 Randy Dunlap ##

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

1822 @sectionlist = ();
1823 $sectcheck = "";
1824 $struct_actual = "";
1825 $prototype = "";
1826
1827 $state = 0;
1828}
1829
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-2008 Randy Dunlap ##

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

1822 @sectionlist = ();
1823 $sectcheck = "";
1824 $struct_actual = "";
1825 $prototype = "";
1826
1827 $state = 0;
1828}
1829
1830sub tracepoint_munge($) {
1831 my $file = shift;
1832 my $tracepointname = 0;
1833 my $tracepointargs = 0;
1834
1835 if($prototype =~ m/TRACE_EVENT\((.*?),/) {
1836 $tracepointname = $1;
1837 }
1838 if($prototype =~ m/TP_PROTO\((.*?)\)/) {
1839 $tracepointargs = $1;
1840 }
1841 if (($tracepointname eq 0) || ($tracepointargs eq 0)) {
1842 print STDERR "Warning(${file}:$.): Unrecognized tracepoint format: \n".
1843 "$prototype\n";
1844 } else {
1845 $prototype = "static inline void trace_$tracepointname($tracepointargs)";
1846 }
1847}
1848
1830sub syscall_munge() {
1831 my $void = 0;
1832
1833 $prototype =~ s@[\r\n\t]+@ @gos; # strip newlines/CR's/tabs
1834## if ($prototype =~ m/SYSCALL_DEFINE0\s*\(\s*(a-zA-Z0-9_)*\s*\)/) {
1835 if ($prototype =~ m/SYSCALL_DEFINE0/) {
1836 $void = 1;
1837## $prototype = "long sys_$1(void)";

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

1876
1877 if (($x =~ /\{/) || ($x =~ /\#\s*define/) || ($x =~ /;/)) {
1878 $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
1879 $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
1880 $prototype =~ s@^\s+@@gos; # strip leading spaces
1881 if ($prototype =~ /SYSCALL_DEFINE/) {
1882 syscall_munge();
1883 }
1849sub syscall_munge() {
1850 my $void = 0;
1851
1852 $prototype =~ s@[\r\n\t]+@ @gos; # strip newlines/CR's/tabs
1853## if ($prototype =~ m/SYSCALL_DEFINE0\s*\(\s*(a-zA-Z0-9_)*\s*\)/) {
1854 if ($prototype =~ m/SYSCALL_DEFINE0/) {
1855 $void = 1;
1856## $prototype = "long sys_$1(void)";

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

1895
1896 if (($x =~ /\{/) || ($x =~ /\#\s*define/) || ($x =~ /;/)) {
1897 $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
1898 $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
1899 $prototype =~ s@^\s+@@gos; # strip leading spaces
1900 if ($prototype =~ /SYSCALL_DEFINE/) {
1901 syscall_munge();
1902 }
1903 if ($prototype =~ /TRACE_EVENT/) {
1904 tracepoint_munge($file);
1905 }
1884 dump_function($prototype, $file);
1885 reset_state();
1886 }
1887}
1888
1889sub process_state3_type($$) {
1890 my $x = shift;
1891 my $file = shift;

--- 285 unchanged lines hidden ---
1906 dump_function($prototype, $file);
1907 reset_state();
1908 }
1909}
1910
1911sub process_state3_type($$) {
1912 my $x = shift;
1913 my $file = shift;

--- 285 unchanged lines hidden ---