kernel-doc (1724c7c0c9494dcbdd7f630f29e1e8427cb231d1) kernel-doc (463a0fdc3e800c04ec62b31627909baf4611716a)
1#!/usr/bin/env perl
2
3use warnings;
4use strict;
5
6## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
7## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##
8## Copyright (C) 2001 Simon Huggins ##

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

2221
2222 $x =~ s@/\*.*?\*/@@gos; # strip comments.
2223 # strip #define macros inside enums
2224 $x =~ s@#\s*((define|ifdef)\s+|endif)[^;]*;@@gos;
2225
2226 if ($x =~ /enum\s+(\w+)\s*{(.*)}/) {
2227 $declaration_name = $1;
2228 my $members = $2;
1#!/usr/bin/env perl
2
3use warnings;
4use strict;
5
6## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
7## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##
8## Copyright (C) 2001 Simon Huggins ##

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

2221
2222 $x =~ s@/\*.*?\*/@@gos; # strip comments.
2223 # strip #define macros inside enums
2224 $x =~ s@#\s*((define|ifdef)\s+|endif)[^;]*;@@gos;
2225
2226 if ($x =~ /enum\s+(\w+)\s*{(.*)}/) {
2227 $declaration_name = $1;
2228 my $members = $2;
2229 $members =~ s/\s+$//;
2229
2230 foreach my $arg (split ',', $members) {
2231 $arg =~ s/^\s*(\w+).*/$1/;
2232 push @parameterlist, $arg;
2233 if (!$parameterdescs{$arg}) {
2234 $parameterdescs{$arg} = $undescribed;
2235 print STDERR "${file}:$.: warning: Enum value '$arg' ".
2236 "not described in enum '$declaration_name'\n";

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

2761
2762 if ($x =~ /^#/) {
2763 # To distinguish preprocessor directive from regular declaration later.
2764 $x .= ";";
2765 }
2766
2767 while (1) {
2768 if ( $x =~ /([^{};]*)([{};])(.*)/ ) {
2230
2231 foreach my $arg (split ',', $members) {
2232 $arg =~ s/^\s*(\w+).*/$1/;
2233 push @parameterlist, $arg;
2234 if (!$parameterdescs{$arg}) {
2235 $parameterdescs{$arg} = $undescribed;
2236 print STDERR "${file}:$.: warning: Enum value '$arg' ".
2237 "not described in enum '$declaration_name'\n";

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

2762
2763 if ($x =~ /^#/) {
2764 # To distinguish preprocessor directive from regular declaration later.
2765 $x .= ";";
2766 }
2767
2768 while (1) {
2769 if ( $x =~ /([^{};]*)([{};])(.*)/ ) {
2770 if( length $prototype ) {
2771 $prototype .= " "
2772 }
2769 $prototype .= $1 . $2;
2770 ($2 eq '{') && $brcount++;
2771 ($2 eq '}') && $brcount--;
2772 if (($2 eq ';') && ($brcount == 0)) {
2773 dump_declaration($prototype, $file);
2774 reset_state();
2775 last;
2776 }

--- 441 unchanged lines hidden ---
2773 $prototype .= $1 . $2;
2774 ($2 eq '{') && $brcount++;
2775 ($2 eq '}') && $brcount--;
2776 if (($2 eq ';') && ($brcount == 0)) {
2777 dump_declaration($prototype, $file);
2778 reset_state();
2779 last;
2780 }

--- 441 unchanged lines hidden ---