Lines Matching +full:non +full:- +full:descriptive
2 # SPDX-License-Identifier: GPL-2.0
10 ## Copyright (C) 2005-2012 Randy Dunlap ##
19 # 18/01/2001 - Cleanups
22 # -- huggie@earth.li
24 # 27/06/2001 - Allowed whitespace after initial "/**" and
26 # -- Christian Kreibich <ck@whoop.org>
29 # - add perldoc documentation
30 # - Look more closely at some of the scarier bits :)
32 # 26/05/2001 - Support for separate source and object trees.
36 # 23/09/2001 - Added support for typedefs, structs, enums and unions
39 # -- Tim Jansen <tim@tjansen.de>
41 # 25/07/2012 - Added support for HTML5
42 # -- Dan Luedtke <mail@danrl.de>
52 Documentation/doc-guide/kernel-doc.rst for the documentation comment syntax.
55 -man Output troff manual page format. This is the default.
56 -rst Output reStructuredText format.
57 -none Do not output documentation, only warnings.
60 -export Only output documentation for symbols that have been
62 in any input FILE or -export-file FILE.
63 -internal Only output documentation for symbols that have NOT been
65 in any input FILE or -export-file FILE.
66 -function NAME Only output documentation for the given function(s)
69 -nofunction NAME Do NOT output documentation for the given function(s);
74 -no-doc-sections Do not output DOC: sections.
75 -enable-lineno Enable output of #define LINENO lines. Only works with
77 -export-file FILE Specify an additional FILE in which to look for
79 -export or -internal. May be specified multiple times.
82 -v Verbose output, more warnings and other information.
83 -h Print this help.
95 # * function_name(:)? (- short description)?
112 # * my_function - does my stuff
120 # * my_function - does my stuff
133 # * struct my_struct - short description
152 # * struct my_struct - short description
176 # A non-void function should have a "Return:" section describing the return
178 # Example-sections should contain the string EXAMPLE so that they are marked
183 # * user_function - function that can only be called in user context
194 # All descriptive text is further processed, scanning for the following special
197 # 'funcname()' - function
198 # '$ENVVAR' - environmental variable
199 # '&struct_name' - name of a structure (up to two words including 'struct')
200 # '&struct_name.member' - name of a structure member
201 # '@parameter' - name of a parameter
202 # '%CONST' - name of a constant.
203 # '``LITERAL``' - literal string without any spaces on it.
213 my $type_constant2 = '\%([-_\w]+)';
215 my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
222 my $type_member = '\&([_\w]+)(\.|->)([_\w]+)';
244 # rst-mode
264 if ($#ARGV == -1) {
285 OUTPUT_INTERNAL => 4, # output non-exported symbols
294 (my $seconds = `date -d"${ENV{'KBUILD_BUILD_TIMESTAMP'}}" +%s`) ne '') {
319 # docbook v3.1 requires a non-zero sequence of RefEntry's; see:
320 # http://www.oasis-open.org/docbook/documentation/reference/html/refentry.html
332 STATE_BODY_MAYBE => 2, # body - or maybe more description
348 STATE_INLINE_ERROR => 4, # error - Comment without header was found.
350 # proper kernel-doc and ignore the rest.
393 my $undescribed = "-- undescribed --";
397 while ($ARGV[0] =~ m/^--?(.*)/) {
423 } elsif ($cmd eq "internal") { # only non-exported symbols
426 } elsif ($cmd eq "export-file") {
433 } elsif ($cmd eq 'no-doc-sections') {
435 } elsif ($cmd eq 'enable-lineno') {
437 } elsif ($cmd eq 'show-not-found') {
438 $show_not_found = 1; # A no-op but don't fail
523 'content-only' => ($output_selection != OUTPUT_ALL), });
582 print $args{'function'} . " \\- " . $args{'purpose'} . "\n";
599 # pointer-to-function
633 print "enum " . $args{'enum'} . " \\- " . $args{'purpose'} . "\n";
673 print $args{'type'} . " " . $args{'struct'} . " \\- " . $args{'purpose'} . "\n";
708 print "typedef " . $args{'typedef'} . " \\- " . $args{'purpose'} . "\n";
753 # Apply the RST highlights to a sub-block of text.
767 my $sphinx_cblock = '^\.\.\ +code-block::';
785 # If this is the first non-blank line in a literal
855 # pointer-to-function
1039 # generic output function - calls the right one based on current output mode.
1065 …if ($x =~ /(struct|union)\s+(\w+)\s*\{(.*)\}(\s*(__packed|__aligned|__attribute__\s*\(\([a-z0-9,_\…
1076 $members =~ s/\s*__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)//gi;
1083 $members =~ s/DECLARE_HASHTABLE\s*\(([^,)]+),\s*([^,)]+)\)/unsigned long $1\[1 << (($2) - 1)\]/gos;
1105 # pointer-to-function
1175 $level-- if ($clause =~ m/(\})/ && $level > 1);
1383 # pointer-to-function
1418 if ($type ne "") { # skip unnamed bit-fields
1511 $prm_clean =~ s/__attribute__\s*\(\([a-z,_\*\s\(\)]*\)\)//i;
1605 # - parport_register_device (function pointer parameters)
1606 # - atomic_set (macro)
1607 # - pci_match_device, __copy_to_user (long return type)
1609 if ($define && $prototype =~ m/^()([a-zA-Z0-9_~:]+)\s+/) {
1610 # This is an object-like macro, it has no return type and no parameter
1612 # Function-like macros are not allowed to have spaces between
1617 } elsif ($prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
1618 $prototype =~ m/^(\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
1619 $prototype =~ m/^(\w+\s*\*+)\s*([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
1620 $prototype =~ m/^(\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
1621 $prototype =~ m/^(\w+\s+\w+\s*\*+)\s*([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
1622 $prototype =~ m/^(\w+\s+\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
1623 $prototype =~ m/^(\w+\s+\w+\s+\w+\s*\*+)\s*([a-zA-Z0-9_~:]+)\s*\(([^\(]*)\)/ ||
1624 $prototype =~ m/^()([a-zA-Z0-9_~:]+)\s*\(([^\{]*)\)/ ||
1625 $prototype =~ m/^(\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\{]*)\)/ ||
1626 $prototype =~ m/^(\w+\s*\*+)\s*([a-zA-Z0-9_~:]+)\s*\(([^\{]*)\)/ ||
1627 $prototype =~ m/^(\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\{]*)\)/ ||
1628 $prototype =~ m/^(\w+\s+\w+\s*\*+)\s*([a-zA-Z0-9_~:]+)\s*\(([^\{]*)\)/ ||
1629 $prototype =~ m/^(\w+\s+\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\{]*)\)/ ||
1630 $prototype =~ m/^(\w+\s+\w+\s+\w+\s*\*+)\s*([a-zA-Z0-9_~:]+)\s*\(([^\{]*)\)/ ||
1631 $prototype =~ m/^(\w+\s+\w+\s+\w+\s+\w+)\s+([a-zA-Z0-9_~:]+)\s*\(([^\{]*)\)/ ||
1632 $prototype =~ m/^(\w+\s+\w+\s+\w+\s+\w+\s*\*+)\s*([a-zA-Z0-9_~:]+)\s*\(([^\{]*)\)/ ||
1633 $prototype =~ m/^(\w+\s+\w+\s*\*+\s*\w+\s*\*+\s*)\s*([a-zA-Z0-9_~:]+)\s*\(([^\{]*)\)/) {
1715 ## if ($prototype =~ m/SYSCALL_DEFINE0\s*\(\s*(a-zA-Z0-9_)*\s*\)/) {
1728 # now delete all of the odd-number commas in $prototype
1733 $len = 0; # skip the for-loop
1749 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line
1782 $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line
1796 ($2 eq '}') && $brcount--;
1861 # STATE_NAME: Looking for the "name - description" line
1881 if (/\s*([\w\s]+?)(\(\))?\s*-/) {
1891 if (/-(.*)/) {
1926 " - I thought it was a doc line\n";
1983 if ($_ =~ m'\s*\*\s*[a-zA-Z_0-9:\.]+\*/') {
1992 # miguel-style comment kludge, look for blank lines after
2024 # i dont know - bad line? ignore.
2121 print STDERR "Incorrect use of kernel-doc format: $_";
2149 while ($_ =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e) {};