kernel-doc (5049d31bc34d64b255b0470cace7d0221f0d6b0f) kernel-doc (ef00028b20481647431ca8bffe5469fb86cf154f)
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## Copyright (C) 2005-2012 Randy Dunlap ##

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

407
408my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start.
409my $doc_end = '\*/';
410my $doc_com = '\s*\*\s*';
411my $doc_com_body = '\s*\* ?';
412my $doc_decl = $doc_com . '(\w+)';
413# @params and a strictly limited set of supported section names
414my $doc_sect = $doc_com .
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## Copyright (C) 2005-2012 Randy Dunlap ##

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

407
408my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start.
409my $doc_end = '\*/';
410my $doc_com = '\s*\*\s*';
411my $doc_com_body = '\s*\* ?';
412my $doc_decl = $doc_com . '(\w+)';
413# @params and a strictly limited set of supported section names
414my $doc_sect = $doc_com .
415 '\s*(\@\w+|description|context|returns?|notes?|examples?)\s*:(.*)';
415 '\s*(\@[.\w]+|\@\.\.\.|description|context|returns?|notes?|examples?)\s*:(.*)';
416my $doc_content = $doc_com_body . '(.*)';
417my $doc_block = $doc_com . 'DOC:\s*(.*)?';
418my $doc_inline_start = '^\s*/\*\*\s*$';
419my $doc_inline_sect = '\s*\*\s*(@[\w\s]+):(.*)';
420my $doc_inline_end = '^\s*\*/\s*$';
421my $export_symbol = '^\s*EXPORT_SYMBOL(_GPL)?\s*\(\s*(\w+)\s*\)\s*;';
422
423my %parameterdescs;

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

2346 }
2347
2348 $anon_struct_union = 0;
2349 my $param_name = $param;
2350 $param_name =~ s/\[.*//;
2351
2352 if ($type eq "" && $param =~ /\.\.\.$/)
2353 {
416my $doc_content = $doc_com_body . '(.*)';
417my $doc_block = $doc_com . 'DOC:\s*(.*)?';
418my $doc_inline_start = '^\s*/\*\*\s*$';
419my $doc_inline_sect = '\s*\*\s*(@[\w\s]+):(.*)';
420my $doc_inline_end = '^\s*\*/\s*$';
421my $export_symbol = '^\s*EXPORT_SYMBOL(_GPL)?\s*\(\s*(\w+)\s*\)\s*;';
422
423my %parameterdescs;

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

2346 }
2347
2348 $anon_struct_union = 0;
2349 my $param_name = $param;
2350 $param_name =~ s/\[.*//;
2351
2352 if ($type eq "" && $param =~ /\.\.\.$/)
2353 {
2354 $param = "...";
2354 if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") {
2355 $parameterdescs{$param} = "variable arguments";
2356 }
2357 }
2358 elsif ($type eq "" && ($param eq "" or $param eq "void"))
2359 {
2360 $param="void";
2361 $parameterdescs{void} = "no arguments";

--- 778 unchanged lines hidden ---
2355 if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") {
2356 $parameterdescs{$param} = "variable arguments";
2357 }
2358 }
2359 elsif ($type eq "" && ($param eq "" or $param eq "void"))
2360 {
2361 $param="void";
2362 $parameterdescs{void} = "no arguments";

--- 778 unchanged lines hidden ---