kernel-doc (346282db9c6bc7ce2dad8ae640494f3f88d23889) kernel-doc (ee2aa7590398ecc0877552191e38d8a282f21cb8)
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> ##

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

208my $warnings = 0;
209my $anon_struct_union = 0;
210
211# match expressions used to find embedded type information
212my $type_constant = '\b``([^\`]+)``\b';
213my $type_constant2 = '\%([-_\w]+)';
214my $type_func = '(\w+)\(\)';
215my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
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> ##

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

208my $warnings = 0;
209my $anon_struct_union = 0;
210
211# match expressions used to find embedded type information
212my $type_constant = '\b``([^\`]+)``\b';
213my $type_constant2 = '\%([-_\w]+)';
214my $type_func = '(\w+)\(\)';
215my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
216my $type_param_ref = '([\!]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
216my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params
217my $type_fp_param2 = '\@(\w+->\S+)\(\)'; # Special RST handling for structs with func ptr params
218my $type_env = '(\$\w+)';
219my $type_enum = '\&(enum\s*([_\w]+))';
220my $type_struct = '\&(struct\s*([_\w]+))';
221my $type_typedef = '\&(typedef\s*([_\w]+))';
222my $type_union = '\&(union\s*([_\w]+))';
223my $type_member = '\&([_\w]+)(\.|->)([_\w]+)';

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

232 [$type_constant, "\$1"],
233 [$type_constant2, "\$1"],
234 [$type_func, "\\\\fB\$1\\\\fP"],
235 [$type_enum, "\\\\fI\$1\\\\fP"],
236 [$type_struct, "\\\\fI\$1\\\\fP"],
237 [$type_typedef, "\\\\fI\$1\\\\fP"],
238 [$type_union, "\\\\fI\$1\\\\fP"],
239 [$type_param, "\\\\fI\$1\\\\fP"],
217my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params
218my $type_fp_param2 = '\@(\w+->\S+)\(\)'; # Special RST handling for structs with func ptr params
219my $type_env = '(\$\w+)';
220my $type_enum = '\&(enum\s*([_\w]+))';
221my $type_struct = '\&(struct\s*([_\w]+))';
222my $type_typedef = '\&(typedef\s*([_\w]+))';
223my $type_union = '\&(union\s*([_\w]+))';
224my $type_member = '\&([_\w]+)(\.|->)([_\w]+)';

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

233 [$type_constant, "\$1"],
234 [$type_constant2, "\$1"],
235 [$type_func, "\\\\fB\$1\\\\fP"],
236 [$type_enum, "\\\\fI\$1\\\\fP"],
237 [$type_struct, "\\\\fI\$1\\\\fP"],
238 [$type_typedef, "\\\\fI\$1\\\\fP"],
239 [$type_union, "\\\\fI\$1\\\\fP"],
240 [$type_param, "\\\\fI\$1\\\\fP"],
241 [$type_param_ref, "\\\\fI\$1\$2\\\\fP"],
240 [$type_member, "\\\\fI\$1\$2\$3\\\\fP"],
241 [$type_fallback, "\\\\fI\$1\\\\fP"]
242 );
243my $blankline_man = "";
244
245# rst-mode
246my @highlights_rst = (
247 [$type_constant, "``\$1``"],

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

253 [$type_fp_param2, "**\$1\\\\(\\\\)**"],
254 [$type_func, "\$1()"],
255 [$type_enum, "\\:c\\:type\\:`\$1 <\$2>`"],
256 [$type_struct, "\\:c\\:type\\:`\$1 <\$2>`"],
257 [$type_typedef, "\\:c\\:type\\:`\$1 <\$2>`"],
258 [$type_union, "\\:c\\:type\\:`\$1 <\$2>`"],
259 # in rst this can refer to any type
260 [$type_fallback, "\\:c\\:type\\:`\$1`"],
242 [$type_member, "\\\\fI\$1\$2\$3\\\\fP"],
243 [$type_fallback, "\\\\fI\$1\\\\fP"]
244 );
245my $blankline_man = "";
246
247# rst-mode
248my @highlights_rst = (
249 [$type_constant, "``\$1``"],

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

255 [$type_fp_param2, "**\$1\\\\(\\\\)**"],
256 [$type_func, "\$1()"],
257 [$type_enum, "\\:c\\:type\\:`\$1 <\$2>`"],
258 [$type_struct, "\\:c\\:type\\:`\$1 <\$2>`"],
259 [$type_typedef, "\\:c\\:type\\:`\$1 <\$2>`"],
260 [$type_union, "\\:c\\:type\\:`\$1 <\$2>`"],
261 # in rst this can refer to any type
262 [$type_fallback, "\\:c\\:type\\:`\$1`"],
261 [$type_param, "**\$1**"]
263 [$type_param_ref, "**\$1\$2**"]
262 );
263my $blankline_rst = "\n";
264
265# read arguments
266if ($#ARGV == -1) {
267 usage();
268}
269

--- 1976 unchanged lines hidden ---
264 );
265my $blankline_rst = "\n";
266
267# read arguments
268if ($#ARGV == -1) {
269 usage();
270}
271

--- 1976 unchanged lines hidden ---