kernel-doc (1e9a328e4b35af22c23ce9357c2c2a77159e74bb) kernel-doc (857af3b775940865c215ab168212ebc96ab80f57)
1#!/usr/bin/env perl
2
3use warnings;
4use strict;
5
6## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
7## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##
8## Copyright (C) 2001 Simon Huggins ##

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

43sub usage {
44 my $message = <<"EOF";
45Usage: $0 [OPTION ...] FILE ...
46
47Read C language source or header FILEs, extract embedded documentation comments,
48and print formatted documentation to standard output.
49
50The documentation comments are identified by "/**" opening comment mark. See
1#!/usr/bin/env perl
2
3use warnings;
4use strict;
5
6## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
7## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##
8## Copyright (C) 2001 Simon Huggins ##

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

43sub usage {
44 my $message = <<"EOF";
45Usage: $0 [OPTION ...] FILE ...
46
47Read C language source or header FILEs, extract embedded documentation comments,
48and print formatted documentation to standard output.
49
50The documentation comments are identified by "/**" opening comment mark. See
51Documentation/kernel-doc-nano-HOWTO.txt for the documentation comment syntax.
51Documentation/doc-guide/kernel-doc.rst for the documentation comment syntax.
52
53Output format selection (mutually exclusive):
54 -docbook Output DocBook format.
55 -html Output HTML format.
56 -html5 Output HTML5 format.
57 -list Output symbol list format. This is for use by docproc.
58 -man Output troff manual page format. This is the default.
59 -rst Output reStructuredText format.

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

2203 # strip comments:
2204 $members =~ s/\/\*.*?\*\///gos;
2205 $nested =~ s/\/\*.*?\*\///gos;
2206 # strip attributes
2207 $members =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i;
2208 $members =~ s/__aligned\s*\([^;]*\)//gos;
2209 $members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos;
2210 # replace DECLARE_BITMAP
52
53Output format selection (mutually exclusive):
54 -docbook Output DocBook format.
55 -html Output HTML format.
56 -html5 Output HTML5 format.
57 -list Output symbol list format. This is for use by docproc.
58 -man Output troff manual page format. This is the default.
59 -rst Output reStructuredText format.

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

2203 # strip comments:
2204 $members =~ s/\/\*.*?\*\///gos;
2205 $nested =~ s/\/\*.*?\*\///gos;
2206 # strip attributes
2207 $members =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i;
2208 $members =~ s/__aligned\s*\([^;]*\)//gos;
2209 $members =~ s/\s*CRYPTO_MINALIGN_ATTR//gos;
2210 # replace DECLARE_BITMAP
2211 $members =~ s/DECLARE_BITMAP\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
2211 $members =~ s/DECLARE_BITMAP\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
2212 # replace DECLARE_HASHTABLE
2212 # replace DECLARE_HASHTABLE
2213 $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+), ([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos;
2213 $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos;
2214 # replace DECLARE_KFIFO
2215 $members =~ s/DECLARE_KFIFO\s*\(([^,)]+),\s*([^,)]+),\s*([^,)]+)\)/$2 \*$1/gos;
2216 # replace DECLARE_KFIFO_PTR
2217 $members =~ s/DECLARE_KFIFO_PTR\s*\(([^,)]+),\s*([^,)]+)\)/$2 \*$1/gos;
2214
2215 create_parameterlist($members, ';', $file);
2216 check_sections($file, $declaration_name, $decl_type, $sectcheck, $struct_actual, $nested);
2217
2218 output_declaration($declaration_name,
2219 'struct',
2220 {'struct' => $declaration_name,
2221 'module' => $modulename,

--- 1030 unchanged lines hidden ---
2218
2219 create_parameterlist($members, ';', $file);
2220 check_sections($file, $declaration_name, $decl_type, $sectcheck, $struct_actual, $nested);
2221
2222 output_declaration($declaration_name,
2223 'struct',
2224 {'struct' => $declaration_name,
2225 'module' => $modulename,

--- 1030 unchanged lines hidden ---