kernel-doc (0fc4f78f44e6c6148cee32456f0d0023ec1c1fd8) | kernel-doc (c950a1739eaef2ab64372fc35af7301fcef2c9a7) |
---|---|
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 ## --- 190 unchanged lines hidden (view full) --- 199# 'funcname()' - function 200# '$ENVVAR' - environmental variable 201# '&struct_name' - name of a structure (up to two words including 'struct') 202# '@parameter' - name of a parameter 203# '%CONST' - name of a constant. 204 205## init lots of data 206 | 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 ## --- 190 unchanged lines hidden (view full) --- 199# 'funcname()' - function 200# '$ENVVAR' - environmental variable 201# '&struct_name' - name of a structure (up to two words including 'struct') 202# '@parameter' - name of a parameter 203# '%CONST' - name of a constant. 204 205## init lots of data 206 |
207 |
|
207my $errors = 0; 208my $warnings = 0; 209my $anon_struct_union = 0; 210 211# match expressions used to find embedded type information 212my $type_constant = '\%([-_\w]+)'; 213my $type_func = '(\w+)\(\)'; | 208my $errors = 0; 209my $warnings = 0; 210my $anon_struct_union = 0; 211 212# match expressions used to find embedded type information 213my $type_constant = '\%([-_\w]+)'; 214my $type_func = '(\w+)\(\)'; |
214my $type_param = '\@(\w+)'; | 215my $type_param = '\@(\w+(\.\.\.)?)'; |
215my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params 216my $type_struct = '\&((struct\s*)*[_\w]+)'; 217my $type_struct_xml = '\\&((struct\s*)*[_\w]+)'; 218my $type_env = '(\$\w+)'; 219my $type_enum_full = '\&(enum)\s*([_\w]+)'; 220my $type_struct_full = '\&(struct)\s*([_\w]+)'; 221my $type_typedef_full = '\&(typedef)\s*([_\w]+)'; 222my $type_union_full = '\&(union)\s*([_\w]+)'; --- 2125 unchanged lines hidden (view full) --- 2348 } 2349 2350 $anon_struct_union = 0; 2351 my $param_name = $param; 2352 $param_name =~ s/\[.*//; 2353 2354 if ($type eq "" && $param =~ /\.\.\.$/) 2355 { | 216my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params 217my $type_struct = '\&((struct\s*)*[_\w]+)'; 218my $type_struct_xml = '\\&((struct\s*)*[_\w]+)'; 219my $type_env = '(\$\w+)'; 220my $type_enum_full = '\&(enum)\s*([_\w]+)'; 221my $type_struct_full = '\&(struct)\s*([_\w]+)'; 222my $type_typedef_full = '\&(typedef)\s*([_\w]+)'; 223my $type_union_full = '\&(union)\s*([_\w]+)'; --- 2125 unchanged lines hidden (view full) --- 2349 } 2350 2351 $anon_struct_union = 0; 2352 my $param_name = $param; 2353 $param_name =~ s/\[.*//; 2354 2355 if ($type eq "" && $param =~ /\.\.\.$/) 2356 { |
2356 $param = "..."; | 2357 if (!$param =~ /\w\.\.\.$/) { 2358 # handles unnamed variable parameters 2359 $param = "..."; 2360 } |
2357 if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") { 2358 $parameterdescs{$param} = "variable arguments"; 2359 } 2360 } 2361 elsif ($type eq "" && ($param eq "" or $param eq "void")) 2362 { 2363 $param="void"; 2364 $parameterdescs{void} = "no arguments"; --- 778 unchanged lines hidden --- | 2361 if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") { 2362 $parameterdescs{$param} = "variable arguments"; 2363 } 2364 } 2365 elsif ($type eq "" && ($param eq "" or $param eq "void")) 2366 { 2367 $param="void"; 2368 $parameterdescs{void} = "no arguments"; --- 778 unchanged lines hidden --- |