kernel-doc (97f2aab6698f3ab2552c41c1024a65ffd0763a6d) | kernel-doc (a6d3fe77dace2c41a32b9699fe78960ab0908a97) |
---|---|
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## ## --- 1391 unchanged lines hidden (view full) --- 1400 1401sub create_parameterlist($$$) { 1402 my $args = shift; 1403 my $splitter = shift; 1404 my $file = shift; 1405 my $type; 1406 my $param; 1407 | 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## ## --- 1391 unchanged lines hidden (view full) --- 1400 1401sub create_parameterlist($$$) { 1402 my $args = shift; 1403 my $splitter = shift; 1404 my $file = shift; 1405 my $type; 1406 my $param; 1407 |
1408 # temporarily replace commas inside function pointer definition |
|
1408 while ($args =~ /(\([^\),]+),/) { 1409 $args =~ s/(\([^\),]+),/$1#/g; 1410 } 1411 1412 foreach my $arg (split($splitter, $args)) { 1413 # strip comments 1414 $arg =~ s/\/\*.*\*\///; 1415 # strip leading/trailing spaces --- 44 unchanged lines hidden (view full) --- 1460sub push_parameter($$$) { 1461 my $param = shift; 1462 my $type = shift; 1463 my $file = shift; 1464 1465 my $param_name = $param; 1466 $param_name =~ s/\[.*//; 1467 | 1409 while ($args =~ /(\([^\),]+),/) { 1410 $args =~ s/(\([^\),]+),/$1#/g; 1411 } 1412 1413 foreach my $arg (split($splitter, $args)) { 1414 # strip comments 1415 $arg =~ s/\/\*.*\*\///; 1416 # strip leading/trailing spaces --- 44 unchanged lines hidden (view full) --- 1461sub push_parameter($$$) { 1462 my $param = shift; 1463 my $type = shift; 1464 my $file = shift; 1465 1466 my $param_name = $param; 1467 $param_name =~ s/\[.*//; 1468 |
1468 if ($type eq "" && $param eq "...") | 1469 if ($type eq "" && $param =~ /\.\.\.$/) |
1469 { 1470 $type=""; | 1470 { 1471 $type=""; |
1471 $param="..."; 1472 $parameterdescs{"..."} = "variable arguments"; | 1472 $parameterdescs{$param} = "variable arguments"; |
1473 } 1474 elsif ($type eq "" && ($param eq "" or $param eq "void")) 1475 { 1476 $type=""; 1477 $param="void"; 1478 $parameterdescs{void} = "no arguments"; 1479 } | 1473 } 1474 elsif ($type eq "" && ($param eq "" or $param eq "void")) 1475 { 1476 $type=""; 1477 $param="void"; 1478 $parameterdescs{void} = "no arguments"; 1479 } |
1480 if (defined $type && $type && !defined $parameterdescs{$param_name}) { | 1480 # warn if parameter has no description 1481 # (but ignore ones starting with # as these are no parameters 1482 # but inline preprocessor statements 1483 if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) { 1484 |
1481 $parameterdescs{$param_name} = $undescribed; 1482 1483 if (($type eq 'function') || ($type eq 'enum')) { 1484 print STDERR "Warning(${file}:$.): Function parameter ". 1485 "or member '$param' not " . 1486 "described in '$declaration_name'\n"; 1487 } 1488 print STDERR "Warning(${file}:$.):". --- 389 unchanged lines hidden --- | 1485 $parameterdescs{$param_name} = $undescribed; 1486 1487 if (($type eq 'function') || ($type eq 'enum')) { 1488 print STDERR "Warning(${file}:$.): Function parameter ". 1489 "or member '$param' not " . 1490 "described in '$declaration_name'\n"; 1491 } 1492 print STDERR "Warning(${file}:$.):". --- 389 unchanged lines hidden --- |