kernel-doc (cbd32a1c56e36fedaa93a727699188bd3e6e6f67) | kernel-doc (15e2544ed38a1e39b702277bdcd2bb1275e78925) |
---|---|
1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 1231 unchanged lines hidden (view full) --- 1240sub dump_enum($$) { 1241 my $x = shift; 1242 my $file = shift; 1243 1244 $x =~ s@/\*.*?\*/@@gos; # strip comments. 1245 # strip #define macros inside enums 1246 $x =~ s@#\s*((define|ifdef)\s+|endif)[^;]*;@@gos; 1247 | 1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 1231 unchanged lines hidden (view full) --- 1240sub dump_enum($$) { 1241 my $x = shift; 1242 my $file = shift; 1243 1244 $x =~ s@/\*.*?\*/@@gos; # strip comments. 1245 # strip #define macros inside enums 1246 $x =~ s@#\s*((define|ifdef)\s+|endif)[^;]*;@@gos; 1247 |
1248 if ($x =~ /enum\s+(\w+)\s*\{(.*)\}/) { | 1248 if ($x =~ /enum\s+(\w*)\s*\{(.*)\}/) { |
1249 $declaration_name = $1; 1250 my $members = $2; 1251 my %_members; 1252 1253 $members =~ s/\s+$//; 1254 1255 foreach my $arg (split ',', $members) { 1256 $arg =~ s/^\s*(\w+).*/$1/; --- 318 unchanged lines hidden (view full) --- 1575 $prototype =~ s/^__always_inline +//; 1576 $prototype =~ s/^noinline +//; 1577 $prototype =~ s/__init +//; 1578 $prototype =~ s/__init_or_module +//; 1579 $prototype =~ s/__meminit +//; 1580 $prototype =~ s/__must_check +//; 1581 $prototype =~ s/__weak +//; 1582 $prototype =~ s/__sched +//; | 1249 $declaration_name = $1; 1250 my $members = $2; 1251 my %_members; 1252 1253 $members =~ s/\s+$//; 1254 1255 foreach my $arg (split ',', $members) { 1256 $arg =~ s/^\s*(\w+).*/$1/; --- 318 unchanged lines hidden (view full) --- 1575 $prototype =~ s/^__always_inline +//; 1576 $prototype =~ s/^noinline +//; 1577 $prototype =~ s/__init +//; 1578 $prototype =~ s/__init_or_module +//; 1579 $prototype =~ s/__meminit +//; 1580 $prototype =~ s/__must_check +//; 1581 $prototype =~ s/__weak +//; 1582 $prototype =~ s/__sched +//; |
1583 $prototype =~ s/__printf\s*\(\s*\d*\s*,\s*\d*\s*\) +//; |
|
1583 my $define = $prototype =~ s/^#\s*define\s+//; #ak added 1584 $prototype =~ s/__attribute__\s*\(\( 1585 (?: 1586 [\w\s]++ # attribute name 1587 (?:\([^)]*+\))? # attribute arguments 1588 \s*+,? # optional comma at the end 1589 )+ 1590 \)\)\s+//x; --- 635 unchanged lines hidden --- | 1584 my $define = $prototype =~ s/^#\s*define\s+//; #ak added 1585 $prototype =~ s/__attribute__\s*\(\( 1586 (?: 1587 [\w\s]++ # attribute name 1588 (?:\([^)]*+\))? # attribute arguments 1589 \s*+,? # optional comma at the end 1590 )+ 1591 \)\)\s+//x; --- 635 unchanged lines hidden --- |