kernel-doc (b6a4b7de4cb45ccf7157fc58de09c96f84d67108) kernel-doc (890c78c2d681a8dc89c78eb9177990cad3a77dc3)
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 ##

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

1643 $prototype =~ s/^asmlinkage +//;
1644 $prototype =~ s/^inline +//;
1645 $prototype =~ s/^__inline__ +//;
1646 $prototype =~ s/^__inline +//;
1647 $prototype =~ s/^__always_inline +//;
1648 $prototype =~ s/^noinline +//;
1649 $prototype =~ s/__devinit +//;
1650 $prototype =~ s/__init +//;
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 ##

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

1643 $prototype =~ s/^asmlinkage +//;
1644 $prototype =~ s/^inline +//;
1645 $prototype =~ s/^__inline__ +//;
1646 $prototype =~ s/^__inline +//;
1647 $prototype =~ s/^__always_inline +//;
1648 $prototype =~ s/^noinline +//;
1649 $prototype =~ s/__devinit +//;
1650 $prototype =~ s/__init +//;
1651 $prototype =~ s/^#define\s+//; #ak added
1651 $prototype =~ s/^#\s*define\s+//; #ak added
1652 $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//;
1653
1654 # Yes, this truly is vile. We are looking for:
1655 # 1. Return type (may be nothing if we're looking at a macro)
1656 # 2. Function name
1657 # 3. Function parameters.
1658 #
1659 # All the while we have to watch out for function pointer parameters

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

1759}
1760
1761sub process_state3_function($$) {
1762 my $x = shift;
1763 my $file = shift;
1764
1765 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line
1766
1652 $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//;
1653
1654 # Yes, this truly is vile. We are looking for:
1655 # 1. Return type (may be nothing if we're looking at a macro)
1656 # 2. Function name
1657 # 3. Function parameters.
1658 #
1659 # All the while we have to watch out for function pointer parameters

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

1759}
1760
1761sub process_state3_function($$) {
1762 my $x = shift;
1763 my $file = shift;
1764
1765 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line
1766
1767 if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#define/)) {
1767 if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#\s*define/)) {
1768 # do nothing
1769 }
1770 elsif ($x =~ /([^\{]*)/) {
1771 $prototype .= $1;
1772 }
1768 # do nothing
1769 }
1770 elsif ($x =~ /([^\{]*)/) {
1771 $prototype .= $1;
1772 }
1773 if (($x =~ /\{/) || ($x =~ /\#define/) || ($x =~ /;/)) {
1773 if (($x =~ /\{/) || ($x =~ /\#\s*define/) || ($x =~ /;/)) {
1774 $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
1775 $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
1776 $prototype =~ s@^\s+@@gos; # strip leading spaces
1777 dump_function($prototype,$file);
1778 reset_state();
1779 }
1780}
1781

--- 288 unchanged lines hidden ---
1774 $prototype =~ s@/\*.*?\*/@@gos; # strip comments.
1775 $prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
1776 $prototype =~ s@^\s+@@gos; # strip leading spaces
1777 dump_function($prototype,$file);
1778 reset_state();
1779 }
1780}
1781

--- 288 unchanged lines hidden ---