kernel-doc (15936ca13dac032a3f4e6b4ba78add3880bddcf3) | kernel-doc (7d2c6b1edf790d96e9017a0b27be2425e1af1532) |
---|---|
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> ## --- 1376 unchanged lines hidden (view full) --- 1385 if ($x =~ /typedef\s+enum\s*\{(.*)\}\s*(\w*)\s*;/) { 1386 $declaration_name = $2; 1387 $members = $1; 1388 } elsif ($x =~ /enum\s+(\w*)\s*\{(.*)\}/) { 1389 $declaration_name = $1; 1390 $members = $2; 1391 } 1392 | 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> ## --- 1376 unchanged lines hidden (view full) --- 1385 if ($x =~ /typedef\s+enum\s*\{(.*)\}\s*(\w*)\s*;/) { 1386 $declaration_name = $2; 1387 $members = $1; 1388 } elsif ($x =~ /enum\s+(\w*)\s*\{(.*)\}/) { 1389 $declaration_name = $1; 1390 $members = $2; 1391 } 1392 |
1393 if ($declaration_name) { | 1393 if ($members) { |
1394 my %_members; 1395 1396 $members =~ s/\s+$//; 1397 1398 foreach my $arg (split ',', $members) { 1399 $arg =~ s/^\s*(\w+).*/$1/; 1400 push @parameterlist, $arg; 1401 if (!$parameterdescs{$arg}) { --- 24 unchanged lines hidden (view full) --- 1426 'purpose' => $declaration_purpose 1427 }); 1428 } else { 1429 print STDERR "${file}:$.: error: Cannot parse enum!\n"; 1430 ++$errors; 1431 } 1432} 1433 | 1394 my %_members; 1395 1396 $members =~ s/\s+$//; 1397 1398 foreach my $arg (split ',', $members) { 1399 $arg =~ s/^\s*(\w+).*/$1/; 1400 push @parameterlist, $arg; 1401 if (!$parameterdescs{$arg}) { --- 24 unchanged lines hidden (view full) --- 1426 'purpose' => $declaration_purpose 1427 }); 1428 } else { 1429 print STDERR "${file}:$.: error: Cannot parse enum!\n"; 1430 ++$errors; 1431 } 1432} 1433 |
1434my $typedef_type = qr { ((?:\s+[\w\*]+){1,8})\s* }x; | 1434my $typedef_type = qr { ((?:\s+[\w\*]+\b){1,8})\s* }x; |
1435my $typedef_ident = qr { \*?\s*(\w\S+)\s* }x; 1436my $typedef_args = qr { \s*\((.*)\); }x; 1437 1438my $typedef1 = qr { typedef$typedef_type\($typedef_ident\)$typedef_args }x; 1439my $typedef2 = qr { typedef$typedef_type$typedef_ident$typedef_args }x; 1440 1441sub dump_typedef($$) { 1442 my $x = shift; --- 997 unchanged lines hidden --- | 1435my $typedef_ident = qr { \*?\s*(\w\S+)\s* }x; 1436my $typedef_args = qr { \s*\((.*)\); }x; 1437 1438my $typedef1 = qr { typedef$typedef_type\($typedef_ident\)$typedef_args }x; 1439my $typedef2 = qr { typedef$typedef_type$typedef_ident$typedef_args }x; 1440 1441sub dump_typedef($$) { 1442 my $x = shift; --- 997 unchanged lines hidden --- |