kernel-doc (6b80975c6308b5dc93b270a2903a314d896974c4) | kernel-doc (7efc6c4295f5489e25eaef6d6fb6ceb6a6e238d0) |
---|---|
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> ## --- 1413 unchanged lines hidden (view full) --- 1422 'purpose' => $declaration_purpose 1423 }); 1424 } else { 1425 print STDERR "${file}:$.: error: Cannot parse enum!\n"; 1426 ++$errors; 1427 } 1428} 1429 | 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> ## --- 1413 unchanged lines hidden (view full) --- 1422 'purpose' => $declaration_purpose 1423 }); 1424 } else { 1425 print STDERR "${file}:$.: error: Cannot parse enum!\n"; 1426 ++$errors; 1427 } 1428} 1429 |
1430my $typedef_type = qr { ((?:\s+[\w\*]+){1,8})\s* }x; 1431my $typedef_ident = qr { \*?\s*(\w\S+)\s* }x; 1432my $typedef_args = qr { \s*\((.*)\); }x; 1433 1434my $typedef1 = qr { typedef$typedef_type\($typedef_ident\)$typedef_args }x; 1435my $typedef2 = qr { typedef$typedef_type$typedef_ident$typedef_args }x; 1436 |
|
1430sub dump_typedef($$) { 1431 my $x = shift; 1432 my $file = shift; 1433 1434 $x =~ s@/\*.*?\*/@@gos; # strip comments. 1435 | 1437sub dump_typedef($$) { 1438 my $x = shift; 1439 my $file = shift; 1440 1441 $x =~ s@/\*.*?\*/@@gos; # strip comments. 1442 |
1436 # Parse function prototypes 1437 if ($x =~ /typedef((?:\s+[\w\*]+){1,8})\s*\(\*?\s*(\w\S+)\s*\)\s*\((.*)\);/ || 1438 $x =~ /typedef((?:\s+[\w\*]+\s+){1,8})\s*\*?(\w\S+)\s*\s*\((.*)\);/) { 1439 1440 # Function typedefs | 1443 # Parse function typedef prototypes 1444 if ($x =~ $typedef1 || $x =~ $typedef2) { |
1441 $return_type = $1; 1442 $declaration_name = $2; 1443 my $args = $3; 1444 $return_type =~ s/^\s+//; 1445 1446 create_parameterlist($args, ',', $file, $declaration_name); 1447 1448 output_declaration($declaration_name, --- 983 unchanged lines hidden --- | 1445 $return_type = $1; 1446 $declaration_name = $2; 1447 my $args = $3; 1448 $return_type =~ s/^\s+//; 1449 1450 create_parameterlist($args, ',', $file, $declaration_name); 1451 1452 output_declaration($declaration_name, --- 983 unchanged lines hidden --- |