kernel-doc (891dcd2f7ab15e2aaad07f6925b3a53fd8d5c02f) | kernel-doc (996a07bcb62c5935248e238a1150089f3d99a6fb) |
---|---|
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## ## --- 1419 unchanged lines hidden (view full) --- 1428 if ($arg =~ /^#/) { 1429 # Treat preprocessor directive as a typeless variable just to fill 1430 # corresponding data structures "correctly". Catch it later in 1431 # output_* subs. 1432 push_parameter($arg, "", $file); 1433 } elsif ($arg =~ m/\(.*\*/) { 1434 # pointer-to-function 1435 $arg =~ tr/#/,/; | 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## ## --- 1419 unchanged lines hidden (view full) --- 1428 if ($arg =~ /^#/) { 1429 # Treat preprocessor directive as a typeless variable just to fill 1430 # corresponding data structures "correctly". Catch it later in 1431 # output_* subs. 1432 push_parameter($arg, "", $file); 1433 } elsif ($arg =~ m/\(.*\*/) { 1434 # pointer-to-function 1435 $arg =~ tr/#/,/; |
1436 $arg =~ m/[^\(]+\(\*([^\)]+)\)/; | 1436 $arg =~ m/[^\(]+\(\*\s*([^\)]+)\)/; |
1437 $param = $1; 1438 $type = $arg; 1439 $type =~ s/([^\(]+\(\*)$param/$1/; 1440 push_parameter($param, $type, $file); 1441 } elsif ($arg) { 1442 $arg =~ s/\s*:\s*/:/g; 1443 $arg =~ s/\s*\[/\[/g; 1444 --- 86 unchanged lines hidden (view full) --- 1531 $prototype =~ s/^fastcall +//; 1532 $prototype =~ s/^asmlinkage +//; 1533 $prototype =~ s/^inline +//; 1534 $prototype =~ s/^__inline__ +//; 1535 $prototype =~ s/^__inline +//; 1536 $prototype =~ s/^__always_inline +//; 1537 $prototype =~ s/^noinline +//; 1538 $prototype =~ s/__devinit +//; | 1437 $param = $1; 1438 $type = $arg; 1439 $type =~ s/([^\(]+\(\*)$param/$1/; 1440 push_parameter($param, $type, $file); 1441 } elsif ($arg) { 1442 $arg =~ s/\s*:\s*/:/g; 1443 $arg =~ s/\s*\[/\[/g; 1444 --- 86 unchanged lines hidden (view full) --- 1531 $prototype =~ s/^fastcall +//; 1532 $prototype =~ s/^asmlinkage +//; 1533 $prototype =~ s/^inline +//; 1534 $prototype =~ s/^__inline__ +//; 1535 $prototype =~ s/^__inline +//; 1536 $prototype =~ s/^__always_inline +//; 1537 $prototype =~ s/^noinline +//; 1538 $prototype =~ s/__devinit +//; |
1539 $prototype =~ s/^#define +//; #ak added | 1539 $prototype =~ s/^#define\s+//; #ak added |
1540 $prototype =~ s/__attribute__ \(\([a-z,]*\)\)//; 1541 1542 # Yes, this truly is vile. We are looking for: 1543 # 1. Return type (may be nothing if we're looking at a macro) 1544 # 2. Function name 1545 # 3. Function parameters. 1546 # 1547 # All the while we have to watch out for function pointer parameters --- 373 unchanged lines hidden --- | 1540 $prototype =~ s/__attribute__ \(\([a-z,]*\)\)//; 1541 1542 # Yes, this truly is vile. We are looking for: 1543 # 1. Return type (may be nothing if we're looking at a macro) 1544 # 2. Function name 1545 # 3. Function parameters. 1546 # 1547 # All the while we have to watch out for function pointer parameters --- 373 unchanged lines hidden --- |