kernel-doc (ef00028b20481647431ca8bffe5469fb86cf154f) kernel-doc (5219f18aaf00f9f9ba572b3817e394043388d4ef)
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 ##

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

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+)\(\)';
214my $type_param = '\@(\w+)';
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 ##

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

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+)\(\)';
214my $type_param = '\@(\w+)';
215my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params
215my $type_struct = '\&((struct\s*)*[_\w]+)';
216my $type_struct_xml = '\\&amp;((struct\s*)*[_\w]+)';
217my $type_env = '(\$\w+)';
218my $type_enum_full = '\&(enum)\s*([_\w]+)';
219my $type_struct_full = '\&(struct)\s*([_\w]+)';
220my $type_typedef_full = '\&(typedef)\s*([_\w]+)';
221my $type_union_full = '\&(union)\s*([_\w]+)';
222my $type_member = '\&([_\w]+)((\.|->)[_\w]+)';

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

287my $blankline_text = "";
288
289# rst-mode
290my @highlights_rst = (
291 [$type_constant, "``\$1``"],
292 # Note: need to escape () to avoid func matching later
293 [$type_member_func, "\\:c\\:type\\:`\$1\$2\\\\(\\\\) <\$1>`"],
294 [$type_member, "\\:c\\:type\\:`\$1\$2 <\$1>`"],
216my $type_struct = '\&((struct\s*)*[_\w]+)';
217my $type_struct_xml = '\\&amp;((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]+)';
223my $type_member = '\&([_\w]+)((\.|->)[_\w]+)';

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

288my $blankline_text = "";
289
290# rst-mode
291my @highlights_rst = (
292 [$type_constant, "``\$1``"],
293 # Note: need to escape () to avoid func matching later
294 [$type_member_func, "\\:c\\:type\\:`\$1\$2\\\\(\\\\) <\$1>`"],
295 [$type_member, "\\:c\\:type\\:`\$1\$2 <\$1>`"],
296 [$type_fp_param, "**\$1\\\\(\\\\)**"],
295 [$type_func, "\\:c\\:func\\:`\$1()`"],
296 [$type_struct_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
297 [$type_enum_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
298 [$type_typedef_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
299 [$type_union_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
300 # in rst this can refer to any type
301 [$type_struct, "\\:c\\:type\\:`\$1`"],
302 [$type_param, "**\$1**"]

--- 2838 unchanged lines hidden ---
297 [$type_func, "\\:c\\:func\\:`\$1()`"],
298 [$type_struct_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
299 [$type_enum_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
300 [$type_typedef_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
301 [$type_union_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"],
302 # in rst this can refer to any type
303 [$type_struct, "\\:c\\:type\\:`\$1`"],
304 [$type_param, "**\$1**"]

--- 2838 unchanged lines hidden ---