#!/usr/bin/env perl
# SPDX-License-Identifier: GPL-2.0

use warnings;
use strict;

## Copyright (c) 1998 Michael Zucchi, All Rights Reserved        ##
## Copyright (C) 2000, 1  Tim Waugh <twaugh@redhat.com>          ##
## Copyright (C) 2001  Simon Huggins                             ##
## Copyright (C) 2005-2012  Randy Dunlap                         ##
## Copyright (C) 2012  Dan Luedtke                               ##
## 								 ##
## #define enhancements by Armin Kuster <akuster@mvista.com>	 ##
## Copyright (c) 2000 MontaVista Software, Inc.			 ##
#
# Copyright (C) 2022 Tomasz Warniełło (POD)

use Pod::Usage qw/pod2usage/;

=head1 NAME

kernel-doc - Print formatted kernel documentation to stdout

=head1 SYNOPSIS

 kernel-doc [-h] [-v] [-Werror]
   [ -man |
     -rst [-sphinx-version VERSION] [-enable-lineno] |
     -none
   ]
   [
     -export |
     -internal |
     [-function NAME] ... |
     [-nosymbol NAME] ...
   ]
   [-no-doc-sections]
   [-export-file FILE] ...
   FILE ...

Run `kernel-doc -h` for details.

=head1 DESCRIPTION

Read C language source or header FILEs, extract embedded documentation comments,
and print formatted documentation to standard output.

The documentation comments are identified by the "/**" opening comment mark.

See Documentation/doc-guide/kernel-doc.rst for the documentation comment syntax.

=cut

# more perldoc at the end of the file

## init lots of data

my $errors = 0;
my $warnings = 0;
my $anon_struct_union = 0;

# match expressions used to find embedded type information
my $type_constant = '\b``([^\`]+)``\b';
my $type_constant2 = '\%([-_\w]+)';
my $type_func = '(\w+)\(\)';
my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
my $type_param_ref = '([\!]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
my $type_fp_param = '\@(\w+)\(\)';  # Special RST handling for func ptr params
my $type_fp_param2 = '\@(\w+->\S+)\(\)';  # Special RST handling for structs with func ptr params
my $type_env = '(\$\w+)';
my $type_enum = '\&(enum\s*([_\w]+))';
my $type_struct = '\&(struct\s*([_\w]+))';
my $type_typedef = '\&(typedef\s*([_\w]+))';
my $type_union = '\&(union\s*([_\w]+))';
my $type_member = '\&([_\w]+)(\.|->)([_\w]+)';
my $type_fallback = '\&([_\w]+)';
my $type_member_func = $type_member . '\(\)';

# Output conversion substitutions.
#  One for each output format

# these are pretty rough
my @highlights_man = (
                      [$type_constant, "\$1"],
                      [$type_constant2, "\$1"],
                      [$type_func, "\\\\fB\$1\\\\fP"],
                      [$type_enum, "\\\\fI\$1\\\\fP"],
                      [$type_struct, "\\\\fI\$1\\\\fP"],
                      [$type_typedef, "\\\\fI\$1\\\\fP"],
                      [$type_union, "\\\\fI\$1\\\\fP"],
                      [$type_param, "\\\\fI\$1\\\\fP"],
                      [$type_param_ref, "\\\\fI\$1\$2\\\\fP"],
                      [$type_member, "\\\\fI\$1\$2\$3\\\\fP"],
                      [$type_fallback, "\\\\fI\$1\\\\fP"]
		     );
my $blankline_man = "";

# rst-mode
my @highlights_rst = (
                       [$type_constant, "``\$1``"],
                       [$type_constant2, "``\$1``"],
                       # Note: need to escape () to avoid func matching later
                       [$type_member_func, "\\:c\\:type\\:`\$1\$2\$3\\\\(\\\\) <\$1>`"],
                       [$type_member, "\\:c\\:type\\:`\$1\$2\$3 <\$1>`"],
		       [$type_fp_param, "**\$1\\\\(\\\\)**"],
		       [$type_fp_param2, "**\$1\\\\(\\\\)**"],
                       [$type_func, "\$1()"],
                       [$type_enum, "\\:c\\:type\\:`\$1 <\$2>`"],
                       [$type_struct, "\\:c\\:type\\:`\$1 <\$2>`"],
                       [$type_typedef, "\\:c\\:type\\:`\$1 <\$2>`"],
                       [$type_union, "\\:c\\:type\\:`\$1 <\$2>`"],
                       # in rst this can refer to any type
                       [$type_fallback, "\\:c\\:type\\:`\$1`"],
                       [$type_param_ref, "**\$1\$2**"]
		      );
my $blankline_rst = "\n";

# read arguments
if ($#ARGV == -1) {
	pod2usage(
		-message => "No arguments!\n",
		-exitval => 1,
		-verbose => 99,
		-sections => 'SYNOPSIS',
		-output => \*STDERR,
	);
}

my $kernelversion;
my ($sphinx_major, $sphinx_minor, $sphinx_patch);

my $dohighlight = "";

my $verbose = 0;
my $Werror = 0;
my $output_mode = "rst";
my $output_preformatted = 0;
my $no_doc_sections = 0;
my $enable_lineno = 0;
my @highlights = @highlights_rst;
my $blankline = $blankline_rst;
my $modulename = "Kernel API";

use constant {
    OUTPUT_ALL          => 0, # output all symbols and doc sections
    OUTPUT_INCLUDE      => 1, # output only specified symbols
    OUTPUT_EXPORTED     => 2, # output exported symbols
    OUTPUT_INTERNAL     => 3, # output non-exported symbols
};
my $output_selection = OUTPUT_ALL;
my $show_not_found = 0;	# No longer used

my @export_file_list;

my @build_time;
if (defined($ENV{'KBUILD_BUILD_TIMESTAMP'}) &&
    (my $seconds = `date -d"${ENV{'KBUILD_BUILD_TIMESTAMP'}}" +%s`) ne '') {
    @build_time = gmtime($seconds);
} else {
    @build_time = localtime;
}

my $man_date = ('January', 'February', 'March', 'April', 'May', 'June',
		'July', 'August', 'September', 'October',
		'November', 'December')[$build_time[4]] .
  " " . ($build_time[5]+1900);

# Essentially these are globals.
# They probably want to be tidied up, made more localised or something.
# CAVEAT EMPTOR!  Some of the others I localised may not want to be, which
# could cause "use of undefined value" or other bugs.
my ($function, %function_table, %parametertypes, $declaration_purpose);
my %nosymbol_table = ();
my $declaration_start_line;
my ($type, $declaration_name, $return_type);
my ($newsection, $newcontents, $prototype, $brcount, %source_map);

if (defined($ENV{'KBUILD_VERBOSE'}) && $ENV{'KBUILD_VERBOSE'} =~ '1') {
	$verbose = 1;
}

if (defined($ENV{'KCFLAGS'})) {
	my $kcflags = "$ENV{'KCFLAGS'}";

	if ($kcflags =~ /Werror/) {
		$Werror = 1;
	}
}

if (defined($ENV{'KDOC_WERROR'})) {
	$Werror = "$ENV{'KDOC_WERROR'}";
}

# Generated docbook code is inserted in a template at a point where
# docbook v3.1 requires a non-zero sequence of RefEntry's; see:
# https://www.oasis-open.org/docbook/documentation/reference/html/refentry.html
# We keep track of number of generated entries and generate a dummy
# if needs be to ensure the expanded template can be postprocessed
# into html.
my $section_counter = 0;

my $lineprefix="";

# Parser states
use constant {
    STATE_NORMAL        => 0,        # normal code
    STATE_NAME          => 1,        # looking for function name
    STATE_BODY_MAYBE    => 2,        # body - or maybe more description
    STATE_BODY          => 3,        # the body of the comment
    STATE_BODY_WITH_BLANK_LINE => 4, # the body, which has a blank line
    STATE_PROTO         => 5,        # scanning prototype
    STATE_DOCBLOCK      => 6,        # documentation block
    STATE_INLINE        => 7,        # gathering doc outside main block
};
my $state;
my $in_doc_sect;
my $leading_space;

# Inline documentation state
use constant {
    STATE_INLINE_NA     => 0, # not applicable ($state != STATE_INLINE)
    STATE_INLINE_NAME   => 1, # looking for member name (@foo:)
    STATE_INLINE_TEXT   => 2, # looking for member documentation
    STATE_INLINE_END    => 3, # done
    STATE_INLINE_ERROR  => 4, # error - Comment without header was found.
                              # Spit a warning as it's not
                              # proper kernel-doc and ignore the rest.
};
my $inline_doc_state;

#declaration types: can be
# 'function', 'struct', 'union', 'enum', 'typedef'
my $decl_type;

# Name of the kernel-doc identifier for non-DOC markups
my $identifier;

my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start.
my $doc_end = '\*/';
my $doc_com = '\s*\*\s*';
my $doc_com_body = '\s*\* ?';
my $doc_decl = $doc_com . '(\w+)';
# @params and a strictly limited set of supported section names
# Specifically:
#   Match @word:
#	  @...:
#         @{section-name}:
# while trying to not match literal block starts like "example::"
#
my $doc_sect = $doc_com .
    '\s*(\@[.\w]+|\@\.\.\.|description|context|returns?|notes?|examples?)\s*:([^:].*)?$';
my $doc_content = $doc_com_body . '(.*)';
my $doc_block = $doc_com . 'DOC:\s*(.*)?';
my $doc_inline_start = '^\s*/\*\*\s*$';
my $doc_inline_sect = '\s*\*\s*(@\s*[\w][\w\.]*\s*):(.*)';
my $doc_inline_end = '^\s*\*/\s*$';
my $doc_inline_oneline = '^\s*/\*\*\s*(@[\w\s]+):\s*(.*)\s*\*/\s*$';
my $export_symbol = '^\s*EXPORT_SYMBOL(_GPL)?\s*\(\s*(\w+)\s*\)\s*;';
my $export_symbol_ns = '^\s*EXPORT_SYMBOL_NS(_GPL)?\s*\(\s*(\w+)\s*,\s*\w+\)\s*;';
my $function_pointer = qr{([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)};
my $attribute = qr{__attribute__\s*\(\([a-z0-9,_\*\s\(\)]*\)\)}i;

my %parameterdescs;
my %parameterdesc_start_lines;
my @parameterlist;
my %sections;
my @sectionlist;
my %section_start_lines;
my $sectcheck;
my $struct_actual;

my $contents = "";
my $new_start_line = 0;

# the canonical section names. see also $doc_sect above.
my $section_default = "Description";	# default section
my $section_intro = "Introduction";
my $section = $section_default;
my $section_context = "Context";
my $section_return = "Return";

my $undescribed = "-- undescribed --";

reset_state();

while ($ARGV[0] =~ m/^--?(.*)/) {
    my $cmd = $1;
    shift @ARGV;
    if ($cmd eq "man") {
	$output_mode = "man";
	@highlights = @highlights_man;
	$blankline = $blankline_man;
    } elsif ($cmd eq "rst") {
	$output_mode = "rst";
	@highlights = @highlights_rst;
	$blankline = $blankline_rst;
    } elsif ($cmd eq "none") {
	$output_mode = "none";
    } elsif ($cmd eq "module") { # not needed for XML, inherits from calling document
	$modulename = shift @ARGV;
    } elsif ($cmd eq "function") { # to only output specific functions
	$output_selection = OUTPUT_INCLUDE;
	$function = shift @ARGV;
	$function_table{$function} = 1;
    } elsif ($cmd eq "nosymbol") { # Exclude specific symbols
	my $symbol = shift @ARGV;
	$nosymbol_table{$symbol} = 1;
    } elsif ($cmd eq "export") { # only exported symbols
	$output_selection = OUTPUT_EXPORTED;
	%function_table = ();
    } elsif ($cmd eq "internal") { # only non-exported symbols
	$output_selection = OUTPUT_INTERNAL;
	%function_table = ();
    } elsif ($cmd eq "export-file") {
	my $file = shift @ARGV;
	push(@export_file_list, $file);
    } elsif ($cmd eq "v") {
	$verbose = 1;
    } elsif ($cmd eq "Werror") {
	$Werror = 1;
    } elsif (($cmd eq "h") || ($cmd eq "help")) {
		pod2usage(-exitval => 0, -verbose => 2);
    } elsif ($cmd eq 'no-doc-sections') {
	    $no_doc_sections = 1;
    } elsif ($cmd eq 'enable-lineno') {
	    $enable_lineno = 1;
    } elsif ($cmd eq 'show-not-found') {
	$show_not_found = 1;  # A no-op but don't fail
    } elsif ($cmd eq "sphinx-version") {
	my $ver_string = shift @ARGV;
	if ($ver_string =~ m/^(\d+)(\.\d+)?(\.\d+)?/) {
	    $sphinx_major = $1;
	    if (defined($2)) {
		$sphinx_minor = substr($2,1);
	    } else {
		$sphinx_minor = 0;
	    }
	    if (defined($3)) {
		$sphinx_patch = substr($3,1)
	    } else {
		$sphinx_patch = 0;
	    }
	} else {
	    die "Sphinx version should either major.minor or major.minor.patch format\n";
	}
    } else {
	# Unknown argument
	pod2usage(
	    -message => "Argument unknown!\n",
	    -exitval => 1,
	    -verbose => 99,
	    -sections => 'SYNOPSIS',
	    -output => \*STDERR,
	    );
    }
    if ($#ARGV < 0){
	pod2usage(
	    -message => "FILE argument missing\n",
	    -exitval => 1,
	    -verbose => 99,
	    -sections => 'SYNOPSIS',
	    -output => \*STDERR,
	    );
    }
}

# continue execution near EOF;

# The C domain dialect changed on Sphinx 3. So, we need to check the
# version in order to produce the right tags.
sub findprog($)
{
	foreach(split(/:/, $ENV{PATH})) {
		return "$_/$_[0]" if(-x "$_/$_[0]");
	}
}

sub get_sphinx_version()
{
	my $ver;

	my $cmd = "sphinx-build";
	if (!findprog($cmd)) {
		my $cmd = "sphinx-build3";
		if (!findprog($cmd)) {
			$sphinx_major = 1;
			$sphinx_minor = 2;
			$sphinx_patch = 0;
			printf STDERR "Warning: Sphinx version not found. Using default (Sphinx version %d.%d.%d)\n",
			       $sphinx_major, $sphinx_minor, $sphinx_patch;
			return;
		}
	}

	open IN, "$cmd --version 2>&1 |";
	while (<IN>) {
		if (m/^\s*sphinx-build\s+([\d]+)\.([\d\.]+)(\+\/[\da-f]+)?$/) {
			$sphinx_major = $1;
			$sphinx_minor = $2;
			$sphinx_patch = $3;
			last;
		}
		# Sphinx 1.2.x uses a different format
		if (m/^\s*Sphinx.*\s+([\d]+)\.([\d\.]+)$/) {
			$sphinx_major = $1;
			$sphinx_minor = $2;
			$sphinx_patch = $3;
			last;
		}
	}
	close IN;
}

# get kernel version from env
sub get_kernel_version() {
    my $version = 'unknown kernel version';

    if (defined($ENV{'KERNELVERSION'})) {
	$version = $ENV{'KERNELVERSION'};
    }
    return $version;
}

#
sub print_lineno {
    my $lineno = shift;
    if ($enable_lineno && defined($lineno)) {
        print ".. LINENO " . $lineno . "\n";
    }
}

sub emit_warning {
    my $location = shift;
    my $msg = shift;
    print STDERR "$location: warning: $msg";
    ++$warnings;
}
##
# dumps section contents to arrays/hashes intended for that purpose.
#
sub dump_section {
    my $file = shift;
    my $name = shift;
    my $contents = join "\n", @_;

    if ($name =~ m/$type_param/) {
	$name = $1;
	$parameterdescs{$name} = $contents;
	$sectcheck = $sectcheck . $name . " ";
        $parameterdesc_start_lines{$name} = $new_start_line;
        $new_start_line = 0;
    } elsif ($name eq "@\.\.\.") {
	$name = "...";
	$parameterdescs{$name} = $contents;
	$sectcheck = $sectcheck . $name . " ";
        $parameterdesc_start_lines{$name} = $new_start_line;
        $new_start_line = 0;
    } else {
	if (defined($sections{$name}) && ($sections{$name} ne "")) {
	    # Only warn on user specified duplicate section names.
	    if ($name ne $section_default) {
		emit_warning("${file}:$.", "duplicate section name '$name'\n");
	    }
	    $sections{$name} .= $contents;
	} else {
	    $sections{$name} = $contents;
	    push @sectionlist, $name;
            $section_start_lines{$name} = $new_start_line;
            $new_start_line = 0;
	}
    }
}

##
# dump DOC: section after checking that it should go out
#
sub dump_doc_section {
    my $file = shift;
    my $name = shift;
    my $contents = join "\n", @_;

    if ($no_doc_sections) {
        return;
    }

    return if (defined($nosymbol_table{$name}));

    if (($output_selection == OUTPUT_ALL) ||
	(($output_selection == OUTPUT_INCLUDE) &&
	 defined($function_table{$name})))
    {
	dump_section($file, $name, $contents);
	output_blockhead({'sectionlist' => \@sectionlist,
			  'sections' => \%sections,
			  'module' => $modulename,
			  'content-only' => ($output_selection != OUTPUT_ALL), });
    }
}

##
# output function
#
# parameterdescs, a hash.
#  function => "function name"
#  parameterlist => @list of parameters
#  parameterdescs => %parameter descriptions
#  sectionlist => @list of sections
#  sections => %section descriptions
#

sub output_highlight {
    my $contents = join "\n",@_;
    my $line;

#   DEBUG
#   if (!defined $contents) {
#	use Carp;
#	confess "output_highlight got called with no args?\n";
#   }

#   print STDERR "contents b4:$contents\n";
    eval $dohighlight;
    die $@ if $@;
#   print STDERR "contents af:$contents\n";

    foreach $line (split "\n", $contents) {
	if (! $output_preformatted) {
	    $line =~ s/^\s*//;
	}
	if ($line eq ""){
	    if (! $output_preformatted) {
		print $lineprefix, $blankline;
	    }
	} else {
	    if ($output_mode eq "man" && substr($line, 0, 1) eq ".") {
		print "\\&$line";
	    } else {
		print $lineprefix, $line;
	    }
	}
	print "\n";
    }
}

##
# output function in man
sub output_function_man(%) {
    my %args = %{$_[0]};
    my ($parameter, $section);
    my $count;

    print ".TH \"$args{'function'}\" 9 \"$args{'function'}\" \"$man_date\" \"Kernel Hacker's Manual\" LINUX\n";

    print ".SH NAME\n";
    print $args{'function'} . " \\- " . $args{'purpose'} . "\n";

    print ".SH SYNOPSIS\n";
    if ($args{'functiontype'} ne "") {
	print ".B \"" . $args{'functiontype'} . "\" " . $args{'function'} . "\n";
    } else {
	print ".B \"" . $args{'function'} . "\n";
    }
    $count = 0;
    my $parenth = "(";
    my $post = ",";
    foreach my $parameter (@{$args{'parameterlist'}}) {
	if ($count == $#{$args{'parameterlist'}}) {
	    $post = ");";
	}
	$type = $args{'parametertypes'}{$parameter};
	if ($type =~ m/$function_pointer/) {
	    # pointer-to-function
	    print ".BI \"" . $parenth . $1 . "\" " . " \") (" . $2 . ")" . $post . "\"\n";
	} else {
	    $type =~ s/([^\*])$/$1 /;
	    print ".BI \"" . $parenth . $type . "\" " . " \"" . $post . "\"\n";
	}
	$count++;
	$parenth = "";
    }

    print ".SH ARGUMENTS\n";
    foreach $parameter (@{$args{'parameterlist'}}) {
	my $parameter_name = $parameter;
	$parameter_name =~ s/\[.*//;

	print ".IP \"" . $parameter . "\" 12\n";
	output_highlight($args{'parameterdescs'}{$parameter_name});
    }
    foreach $section (@{$args{'sectionlist'}}) {
	print ".SH \"", uc $section, "\"\n";
	output_highlight($args{'sections'}{$section});
    }
}

##
# output enum in man
sub output_enum_man(%) {
    my %args = %{$_[0]};
    my ($parameter, $section);
    my $count;

    print ".TH \"$args{'module'}\" 9 \"enum $args{'enum'}\" \"$man_date\" \"API Manual\" LINUX\n";

    print ".SH NAME\n";
    print "enum " . $args{'enum'} . " \\- " . $args{'purpose'} . "\n";

    print ".SH SYNOPSIS\n";
    print "enum " . $args{'enum'} . " {\n";
    $count = 0;
    foreach my $parameter (@{$args{'parameterlist'}}) {
	print ".br\n.BI \"    $parameter\"\n";
	if ($count == $#{$args{'parameterlist'}}) {
	    print "\n};\n";
	    last;
	}
	else {
	    print ", \n.br\n";
	}
	$count++;
    }

    print ".SH Constants\n";
    foreach $parameter (@{$args{'parameterlist'}}) {
	my $parameter_name = $parameter;
	$parameter_name =~ s/\[.*//;

	print ".IP \"" . $parameter . "\" 12\n";
	output_highlight($args{'parameterdescs'}{$parameter_name});
    }
    foreach $section (@{$args{'sectionlist'}}) {
	print ".SH \"$section\"\n";
	output_highlight($args{'sections'}{$section});
    }
}

##
# output struct in man
sub output_struct_man(%) {
    my %args = %{$_[0]};
    my ($parameter, $section);

    print ".TH \"$args{'module'}\" 9 \"" . $args{'type'} . " " . $args{'struct'} . "\" \"$man_date\" \"API Manual\" LINUX\n";

    print ".SH NAME\n";
    print $args{'type'} . " " . $args{'struct'} . " \\- " . $args{'purpose'} . "\n";

    my $declaration = $args{'definition'};
    $declaration =~ s/\t/  /g;
    $declaration =~ s/\n/"\n.br\n.BI \"/g;
    print ".SH SYNOPSIS\n";
    print $args{'type'} . " " . $args{'struct'} . " {\n.br\n";
    print ".BI \"$declaration\n};\n.br\n\n";

    print ".SH Members\n";
    foreach $parameter (@{$args{'parameterlist'}}) {
	($parameter =~ /^#/) && next;

	my $parameter_name = $parameter;
	$parameter_name =~ s/\[.*//;

	($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
	print ".IP \"" . $parameter . "\" 12\n";
	output_highlight($args{'parameterdescs'}{$parameter_name});
    }
    foreach $section (@{$args{'sectionlist'}}) {
	print ".SH \"$section\"\n";
	output_highlight($args{'sections'}{$section});
    }
}

##
# output typedef in man
sub output_typedef_man(%) {
    my %args = %{$_[0]};
    my ($parameter, $section);

    print ".TH \"$args{'module'}\" 9 \"$args{'typedef'}\" \"$man_date\" \"API Manual\" LINUX\n";

    print ".SH NAME\n";
    print "typedef " . $args{'typedef'} . " \\- " . $args{'purpose'} . "\n";

    foreach $section (@{$args{'sectionlist'}}) {
	print ".SH \"$section\"\n";
	output_highlight($args{'sections'}{$section});
    }
}

sub output_blockhead_man(%) {
    my %args = %{$_[0]};
    my ($parameter, $section);
    my $count;

    print ".TH \"$args{'module'}\" 9 \"$args{'module'}\" \"$man_date\" \"API Manual\" LINUX\n";

    foreach $section (@{$args{'sectionlist'}}) {
	print ".SH \"$section\"\n";
	output_highlight($args{'sections'}{$section});
    }
}

##
# output in restructured text
#

#
# This could use some work; it's used to output the DOC: sections, and
# starts by putting out the name of the doc section itself, but that tends
# to duplicate a header already in the template file.
#
sub output_blockhead_rst(%) {
    my %args = %{$_[0]};
    my ($parameter, $section);

    foreach $section (@{$args{'sectionlist'}}) {
	next if (defined($nosymbol_table{$section}));

	if ($output_selection != OUTPUT_INCLUDE) {
	    print ".. _$section:\n\n";
	    print "**$section**\n\n";
	}
        print_lineno($section_start_lines{$section});
	output_highlight_rst($args{'sections'}{$section});
	print "\n";
    }
}

#
# Apply the RST highlights to a sub-block of text.
#
sub highlight_block($) {
    # The dohighlight kludge requires the text be called $contents
    my $contents = shift;
    eval $dohighlight;
    die $@ if $@;
    return $contents;
}

#
# Regexes used only here.
#
my $sphinx_literal = '^[^.].*::$';
my $sphinx_cblock = '^\.\.\ +code-block::';

sub output_highlight_rst {
    my $input = join "\n",@_;
    my $output = "";
    my $line;
    my $in_literal = 0;
    my $litprefix;
    my $block = "";

    foreach $line (split "\n",$input) {
	#
	# If we're in a literal block, see if we should drop out
	# of it.  Otherwise pass the line straight through unmunged.
	#
	if ($in_literal) {
	    if (! ($line =~ /^\s*$/)) {
		#
		# If this is the first non-blank line in a literal
		# block we need to figure out what the proper indent is.
		#
		if ($litprefix eq "") {
		    $line =~ /^(\s*)/;
		    $litprefix = '^' . $1;
		    $output .= $line . "\n";
		} elsif (! ($line =~ /$litprefix/)) {
		    $in_literal = 0;
		} else {
		    $output .= $line . "\n";
		}
	    } else {
		$output .= $line . "\n";
	    }
	}
	#
	# Not in a literal block (or just dropped out)
	#
	if (! $in_literal) {
	    $block .= $line . "\n";
	    if (($line =~ /$sphinx_literal/) || ($line =~ /$sphinx_cblock/)) {
		$in_literal = 1;
		$litprefix = "";
		$output .= highlight_block($block);
		$block = ""
	    }
	}
    }

    if ($block) {
	$output .= highlight_block($block);
    }
    foreach $line (split "\n", $output) {
	print $lineprefix . $line . "\n";
    }
}

sub output_function_rst(%) {
    my %args = %{$_[0]};
    my ($parameter, $section);
    my $oldprefix = $lineprefix;
    my $start = "";
    my $is_macro = 0;

    if ($sphinx_major < 3) {
	if ($args{'typedef'}) {
	    print ".. c:type:: ". $args{'function'} . "\n\n";
	    print_lineno($declaration_start_line);
	    print "   **Typedef**: ";
	    $lineprefix = "";
	    output_highlight_rst($args{'purpose'});
	    $start = "\n\n**Syntax**\n\n  ``";
	    $is_macro = 1;
	} else {
	    print ".. c:function:: ";
	}
    } else {
	if ($args{'typedef'} || $args{'functiontype'} eq "") {
	    $is_macro = 1;
	    print ".. c:macro:: ". $args{'function'} . "\n\n";
	} else {
	    print ".. c:function:: ";
	}

	if ($args{'typedef'}) {
	    print_lineno($declaration_start_line);
	    print "   **Typedef**: ";
	    $lineprefix = "";
	    output_highlight_rst($args{'purpose'});
	    $start = "\n\n**Syntax**\n\n  ``";
	} else {
	    print "``" if ($is_macro);
	}
    }
    if ($args{'functiontype'} ne "") {
	$start .= $args{'functiontype'} . " " . $args{'function'} . " (";
    } else {
	$start .= $args{'function'} . " (";
    }
    print $start;

    my $count = 0;
    foreach my $parameter (@{$args{'parameterlist'}}) {
	if ($count ne 0) {
	    print ", ";
	}
	$count++;
	$type = $args{'parametertypes'}{$parameter};

	if ($type =~ m/$function_pointer/) {
	    # pointer-to-function
	    print $1 . $parameter . ") (" . $2 . ")";
	} else {
	    print $type;
	}
    }
    if ($is_macro) {
	print ")``\n\n";
    } else {
	print ")\n\n";
    }
    if (!$args{'typedef'}) {
	print_lineno($declaration_start_line);
	$lineprefix = "   ";
	output_highlight_rst($args{'purpose'});
	print "\n";
    }

    #
    # Put our descriptive text into a container (thus an HTML <div>) to help
    # set the function prototypes apart.
    #
    print ".. container:: kernelindent\n\n";
    $lineprefix = "  ";
    print $lineprefix . "**Parameters**\n\n";
    foreach $parameter (@{$args{'parameterlist'}}) {
	my $parameter_name = $parameter;
	$parameter_name =~ s/\[.*//;
	$type = $args{'parametertypes'}{$parameter};

	if ($type ne "") {
	    print $lineprefix . "``$type``\n";
	} else {
	    print $lineprefix . "``$parameter``\n";
	}

        print_lineno($parameterdesc_start_lines{$parameter_name});

	$lineprefix = "    ";
	if (defined($args{'parameterdescs'}{$parameter_name}) &&
	    $args{'parameterdescs'}{$parameter_name} ne $undescribed) {
	    output_highlight_rst($args{'parameterdescs'}{$parameter_name});
	} else {
	    print $lineprefix . "*undescribed*\n";
	}
	$lineprefix = "  ";
	print "\n";
    }

    output_section_rst(@_);
    $lineprefix = $oldprefix;
}

sub output_section_rst(%) {
    my %args = %{$_[0]};
    my $section;
    my $oldprefix = $lineprefix;

    foreach $section (@{$args{'sectionlist'}}) {
	print $lineprefix . "**$section**\n\n";
        print_lineno($section_start_lines{$section});
	output_highlight_rst($args{'sections'}{$section});
	print "\n";
    }
    print "\n";
}

sub output_enum_rst(%) {
    my %args = %{$_[0]};
    my ($parameter);
    my $oldprefix = $lineprefix;
    my $count;
    my $outer;

    if ($sphinx_major < 3) {
	my $name = "enum " . $args{'enum'};
	print "\n\n.. c:type:: " . $name . "\n\n";
    } else {
	my $name = $args{'enum'};
	print "\n\n.. c:enum:: " . $name . "\n\n";
    }
    print_lineno($declaration_start_line);
    $lineprefix = "  ";
    output_highlight_rst($args{'purpose'});
    print "\n";

    print ".. container:: kernelindent\n\n";
    $outer = $lineprefix . "  ";
    $lineprefix = $outer . "  ";
    print $outer . "**Constants**\n\n";
    foreach $parameter (@{$args{'parameterlist'}}) {
	print $outer . "``$parameter``\n";

	if ($args{'parameterdescs'}{$parameter} ne $undescribed) {
	    output_highlight_rst($args{'parameterdescs'}{$parameter});
	} else {
	    print $lineprefix . "*undescribed*\n";
	}
	print "\n";
    }
    print "\n";
    $lineprefix = $oldprefix;
    output_section_rst(@_);
}

sub output_typedef_rst(%) {
    my %args = %{$_[0]};
    my ($parameter);
    my $oldprefix = $lineprefix;
    my $name;

    if ($sphinx_major < 3) {
	$name = "typedef " . $args{'typedef'};
    } else {
	$name = $args{'typedef'};
    }
    print "\n\n.. c:type:: " . $name . "\n\n";
    print_lineno($declaration_start_line);
    $lineprefix = "   ";
    output_highlight_rst($args{'purpose'});
    print "\n";

    $lineprefix = $oldprefix;
    output_section_rst(@_);
}

sub output_struct_rst(%) {
    my %args = %{$_[0]};
    my ($parameter);
    my $oldprefix = $lineprefix;

    if ($sphinx_major < 3) {
	my $name = $args{'type'} . " " . $args{'struct'};
	print "\n\n.. c:type:: " . $name . "\n\n";
    } else {
	my $name = $args{'struct'};
	if ($args{'type'} eq 'union') {
	    print "\n\n.. c:union:: " . $name . "\n\n";
	} else {
	    print "\n\n.. c:struct:: " . $name . "\n\n";
	}
    }
    print_lineno($declaration_start_line);
    $lineprefix = "  ";
    output_highlight_rst($args{'purpose'});
    print "\n";

    print ".. container:: kernelindent\n\n";
    print $lineprefix . "**Definition**::\n\n";
    my $declaration = $args{'definition'};
    $lineprefix = $lineprefix . "  ";
    $declaration =~ s/\t/$lineprefix/g;
    print $lineprefix . $args{'type'} . " " . $args{'struct'} . " {\n$declaration" . $lineprefix . "};\n\n";

    $lineprefix = "  ";
    print $lineprefix . "**Members**\n\n";
    foreach $parameter (@{$args{'parameterlist'}}) {
	($parameter =~ /^#/) && next;

	my $parameter_name = $parameter;
	$parameter_name =~ s/\[.*//;

	($args{'parameterdescs'}{$parameter_name} ne $undescribed) || next;
	$type = $args{'parametertypes'}{$parameter};
        print_lineno($parameterdesc_start_lines{$parameter_name});
	print $lineprefix . "``" . $parameter . "``\n";
	$lineprefix = "    ";
	output_highlight_rst($args{'parameterdescs'}{$parameter_name});
	$lineprefix = "  ";
	print "\n";
    }
    print "\n";

    $lineprefix = $oldprefix;
    output_section_rst(@_);
}

## none mode output functions

sub output_function_none(%) {
}

sub output_enum_none(%) {
}

sub output_typedef_none(%) {
}

sub output_struct_none(%) {
}

sub output_blockhead_none(%) {
}

##
# generic output function for all types (function, struct/union, typedef, enum);
# calls the generated, variable output_ function name based on
# functype and output_mode
sub output_declaration {
    no strict 'refs';
    my $name = shift;
    my $functype = shift;
    my $func = "output_${functype}_$output_mode";

    return if (defined($nosymbol_table{$name}));

    if (($output_selection == OUTPUT_ALL) ||
	(($output_selection == OUTPUT_INCLUDE ||
	  $output_selection == OUTPUT_EXPORTED) &&
	 defined($function_table{$name})) ||
	($output_selection == OUTPUT_INTERNAL &&
	 !($functype eq "function" && defined($function_table{$name}))))
    {
	&$func(@_);
	$section_counter++;
    }
}

##
# generic output function - calls the right one based on current output mode.
sub output_blockhead {
    no strict 'refs';
    my $func = "output_blockhead_" . $output_mode;
    &$func(@_);
    $section_counter++;
}

##
# takes a declaration (struct, union, enum, typedef) and
# invokes the right handler. NOT called for functions.
sub dump_declaration($$) {
    no strict 'refs';
    my ($prototype, $file) = @_;
    my $func = "dump_" . $decl_type;
    &$func(@_);
}

sub dump_union($$) {
    dump_struct(@_);
}

sub dump_struct($$) {
    my $x = shift;
    my $file = shift;
    my $decl_type;
    my $members;
    my $type = qr{struct|union};
    # For capturing struct/union definition body, i.e. "{members*}qualifiers*"
    my $qualifiers = qr{$attribute|__packed|__aligned|____cacheline_aligned_in_smp|____cacheline_aligned};
    my $definition_body = qr{\{(.*)\}\s*$qualifiers*};
    my $struct_members = qr{($type)([^\{\};]+)\{([^\{\}]*)\}([^\{\}\;]*)\;};

    if ($x =~ /($type)\s+(\w+)\s*$definition_body/) {
	$decl_type = $1;
	$declaration_name = $2;
	$members = $3;
    } elsif ($x =~ /typedef\s+($type)\s*$definition_body\s*(\w+)\s*;/) {
	$decl_type = $1;
	$declaration_name = $3;
	$members = $2;
    }

    if ($members) {
	if ($identifier ne $declaration_name) {
	    emit_warning("${file}:$.", "expecting prototype for $decl_type $identifier. Prototype was for $decl_type $declaration_name instead\n");
	    return;
	}

	# ignore members marked private:
	$members =~ s/\/\*\s*private:.*?\/\*\s*public:.*?\*\///gosi;
	$members =~ s/\/\*\s*private:.*//gosi;
	# strip comments:
	$members =~ s/\/\*.*?\*\///gos;
	# strip attributes
	$members =~ s/\s*$attribute/ /gi;
	$members =~ s/\s*__aligned\s*\([^;]*\)/ /gos;
	$members =~ s/\s*__packed\s*/ /gos;
	$members =~ s/\s*CRYPTO_MINALIGN_ATTR/ /gos;
	$members =~ s/\s*____cacheline_aligned_in_smp/ /gos;
	$members =~ s/\s*____cacheline_aligned/ /gos;
	# unwrap struct_group():
	# - first eat non-declaration parameters and rewrite for final match
	# - then remove macro, outer parens, and trailing semicolon
	$members =~ s/\bstruct_group\s*\(([^,]*,)/STRUCT_GROUP(/gos;
	$members =~ s/\bstruct_group_(attr|tagged)\s*\(([^,]*,){2}/STRUCT_GROUP(/gos;
	$members =~ s/\b__struct_group\s*\(([^,]*,){3}/STRUCT_GROUP(/gos;
	$members =~ s/\bSTRUCT_GROUP(\(((?:(?>[^)(]+)|(?1))*)\))[^;]*;/$2/gos;

	my $args = qr{([^,)]+)};
	# replace DECLARE_BITMAP
	$members =~ s/__ETHTOOL_DECLARE_LINK_MODE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, __ETHTOOL_LINK_MODE_MASK_NBITS)/gos;
	$members =~ s/DECLARE_PHY_INTERFACE_MASK\s*\(([^\)]+)\)/DECLARE_BITMAP($1, PHY_INTERFACE_MODE_MAX)/gos;
	$members =~ s/DECLARE_BITMAP\s*\($args,\s*$args\)/unsigned long $1\[BITS_TO_LONGS($2)\]/gos;
	# replace DECLARE_HASHTABLE
	$members =~ s/DECLARE_HASHTABLE\s*\($args,\s*$args\)/unsigned long $1\[1 << (($2) - 1)\]/gos;
	# replace DECLARE_KFIFO
	$members =~ s/DECLARE_KFIFO\s*\($args,\s*$args,\s*$args\)/$2 \*$1/gos;
	# replace DECLARE_KFIFO_PTR
	$members =~ s/DECLARE_KFIFO_PTR\s*\($args,\s*$args\)/$2 \*$1/gos;
	# replace DECLARE_FLEX_ARRAY
	$members =~ s/(?:__)?DECLARE_FLEX_ARRAY\s*\($args,\s*$args\)/$1 $2\[\]/gos;
	my $declaration = $members;

	# Split nested struct/union elements as newer ones
	while ($members =~ m/$struct_members/) {
		my $newmember;
		my $maintype = $1;
		my $ids = $4;
		my $content = $3;
		foreach my $id(split /,/, $ids) {
			$newmember .= "$maintype $id; ";

			$id =~ s/[:\[].*//;
			$id =~ s/^\s*\**(\S+)\s*/$1/;
			foreach my $arg (split /;/, $content) {
				next if ($arg =~ m/^\s*$/);
				if ($arg =~ m/^([^\(]+\(\*?\s*)([\w\.]*)(\s*\).*)/) {
					# pointer-to-function
					my $type = $1;
					my $name = $2;
					my $extra = $3;
					next if (!$name);
					if ($id =~ m/^\s*$/) {
						# anonymous struct/union
						$newmember .= "$type$name$extra; ";
					} else {
						$newmember .= "$type$id.$name$extra; ";
					}
				} else {
					my $type;
					my $names;
					$arg =~ s/^\s+//;
					$arg =~ s/\s+$//;
					# Handle bitmaps
					$arg =~ s/:\s*\d+\s*//g;
					# Handle arrays
					$arg =~ s/\[.*\]//g;
					# The type may have multiple words,
					# and multiple IDs can be defined, like:
					#	const struct foo, *bar, foobar
					# So, we remove spaces when parsing the
					# names, in order to match just names
					# and commas for the names
					$arg =~ s/\s*,\s*/,/g;
					if ($arg =~ m/(.*)\s+([\S+,]+)/) {
						$type = $1;
						$names = $2;
					} else {
						$newmember .= "$arg; ";
						next;
					}
					foreach my $name (split /,/, $names) {
						$name =~ s/^\s*\**(\S+)\s*/$1/;
						next if (($name =~ m/^\s*$/));
						if ($id =~ m/^\s*$/) {
							# anonymous struct/union
							$newmember .= "$type $name; ";
						} else {
							$newmember .= "$type $id.$name; ";
						}
					}
				}
			}
		}
		$members =~ s/$struct_members/$newmember/;
	}

	# Ignore other nested elements, like enums
	$members =~ s/(\{[^\{\}]*\})//g;

	create_parameterlist($members, ';', $file, $declaration_name);
	check_sections($file, $declaration_name, $decl_type, $sectcheck, $struct_actual);

	# Adjust declaration for better display
	$declaration =~ s/([\{;])/$1\n/g;
	$declaration =~ s/\}\s+;/};/g;
	# Better handle inlined enums
	do {} while ($declaration =~ s/(enum\s+\{[^\}]+),([^\n])/$1,\n$2/);

	my @def_args = split /\n/, $declaration;
	my $level = 1;
	$declaration = "";
	foreach my $clause (@def_args) {
		$clause =~ s/^\s+//;
		$clause =~ s/\s+$//;
		$clause =~ s/\s+/ /;
		next if (!$clause);
		$level-- if ($clause =~ m/(\})/ && $level > 1);
		if (!($clause =~ m/^\s*#/)) {
			$declaration .= "\t" x $level;
		}
		$declaration .= "\t" . $clause . "\n";
		$level++ if ($clause =~ m/(\{)/ && !($clause =~m/\}/));
	}
	output_declaration($declaration_name,
			   'struct',
			   {'struct' => $declaration_name,
			    'module' => $modulename,
			    'definition' => $declaration,
			    'parameterlist' => \@parameterlist,
			    'parameterdescs' => \%parameterdescs,
			    'parametertypes' => \%parametertypes,
			    'sectionlist' => \@sectionlist,
			    'sections' => \%sections,
			    'purpose' => $declaration_purpose,
			    'type' => $decl_type
			   });
    }
    else {
	print STDERR "${file}:$.: error: Cannot parse struct or union!\n";
	++$errors;
    }
}


sub show_warnings($$) {
	my $functype = shift;
	my $name = shift;

	return 0 if (defined($nosymbol_table{$name}));

	return 1 if ($output_selection == OUTPUT_ALL);

	if ($output_selection == OUTPUT_EXPORTED) {
		if (defined($function_table{$name})) {
			return 1;
		} else {
			return 0;
		}
	}
        if ($output_selection == OUTPUT_INTERNAL) {
		if (!($functype eq "function" && defined($function_table{$name}))) {
			return 1;
		} else {
			return 0;
		}
	}
	if ($output_selection == OUTPUT_INCLUDE) {
		if (defined($function_table{$name})) {
			return 1;
		} else {
			return 0;
		}
	}
	die("Please add the new output type at show_warnings()");
}

sub dump_enum($$) {
    my $x = shift;
    my $file = shift;
    my $members;


    $x =~ s@/\*.*?\*/@@gos;	# strip comments.
    # strip #define macros inside enums
    $x =~ s@#\s*((define|ifdef)\s+|endif)[^;]*;@@gos;

    if ($x =~ /typedef\s+enum\s*\{(.*)\}\s*(\w*)\s*;/) {
	$declaration_name = $2;
	$members = $1;
    } elsif ($x =~ /enum\s+(\w*)\s*\{(.*)\}/) {
	$declaration_name = $1;
	$members = $2;
    }

    if ($members) {
	if ($identifier ne $declaration_name) {
	    if ($identifier eq "") {
		emit_warning("${file}:$.", "wrong kernel-doc identifier on line:\n");
	    } else {
		emit_warning("${file}:$.", "expecting prototype for enum $identifier. Prototype was for enum $declaration_name instead\n");
	    }
	    return;
	}
	$declaration_name = "(anonymous)" if ($declaration_name eq "");

	my %_members;

	$members =~ s/\s+$//;

	foreach my $arg (split ',', $members) {
	    $arg =~ s/^\s*(\w+).*/$1/;
	    push @parameterlist, $arg;
	    if (!$parameterdescs{$arg}) {
		$parameterdescs{$arg} = $undescribed;
	        if (show_warnings("enum", $declaration_name)) {
			emit_warning("${file}:$.", "Enum value '$arg' not described in enum '$declaration_name'\n");
		}
	    }
	    $_members{$arg} = 1;
	}

	while (my ($k, $v) = each %parameterdescs) {
	    if (!exists($_members{$k})) {
	        if (show_warnings("enum", $declaration_name)) {
		     emit_warning("${file}:$.", "Excess enum value '$k' description in '$declaration_name'\n");
		}
	    }
        }

	output_declaration($declaration_name,
			   'enum',
			   {'enum' => $declaration_name,
			    'module' => $modulename,
			    'parameterlist' => \@parameterlist,
			    'parameterdescs' => \%parameterdescs,
			    'sectionlist' => \@sectionlist,
			    'sections' => \%sections,
			    'purpose' => $declaration_purpose
			   });
    } else {
	print STDERR "${file}:$.: error: Cannot parse enum!\n";
	++$errors;
    }
}

my $typedef_type = qr { ((?:\s+[\w\*]+\b){1,8})\s* }x;
my $typedef_ident = qr { \*?\s*(\w\S+)\s* }x;
my $typedef_args = qr { \s*\((.*)\); }x;

my $typedef1 = qr { typedef$typedef_type\($typedef_ident\)$typedef_args }x;
my $typedef2 = qr { typedef$typedef_type$typedef_ident$typedef_args }x;

sub dump_typedef($$) {
    my $x = shift;
    my $file = shift;

    $x =~ s@/\*.*?\*/@@gos;	# strip comments.

    # Parse function typedef prototypes
    if ($x =~ $typedef1 || $x =~ $typedef2) {
	$return_type = $1;
	$declaration_name = $2;
	my $args = $3;
	$return_type =~ s/^\s+//;

	if ($identifier ne $declaration_name) {
	    emit_warning("${file}:$.", "expecting prototype for typedef $identifier. Prototype was for typedef $declaration_name instead\n");
	    return;
	}

	create_parameterlist($args, ',', $file, $declaration_name);

	output_declaration($declaration_name,
			   'function',
			   {'function' => $declaration_name,
			    'typedef' => 1,
			    'module' => $modulename,
			    'functiontype' => $return_type,
			    'parameterlist' => \@parameterlist,
			    'parameterdescs' => \%parameterdescs,
			    'parametertypes' => \%parametertypes,
			    'sectionlist' => \@sectionlist,
			    'sections' => \%sections,
			    'purpose' => $declaration_purpose
			   });
	return;
    }

    while (($x =~ /\(*.\)\s*;$/) || ($x =~ /\[*.\]\s*;$/)) {
	$x =~ s/\(*.\)\s*;$/;/;
	$x =~ s/\[*.\]\s*;$/;/;
    }

    if ($x =~ /typedef.*\s+(\w+)\s*;/) {
	$declaration_name = $1;

	if ($identifier ne $declaration_name) {
	    emit_warning("${file}:$.", "expecting prototype for typedef $identifier. Prototype was for typedef $declaration_name instead\n");
	    return;
	}

	output_declaration($declaration_name,
			   'typedef',
			   {'typedef' => $declaration_name,
			    'module' => $modulename,
			    'sectionlist' => \@sectionlist,
			    'sections' => \%sections,
			    'purpose' => $declaration_purpose
			   });
    }
    else {
	print STDERR "${file}:$.: error: Cannot parse typedef!\n";
	++$errors;
    }
}

sub save_struct_actual($) {
    my $actual = shift;

    # strip all spaces from the actual param so that it looks like one string item
    $actual =~ s/\s*//g;
    $struct_actual = $struct_actual . $actual . " ";
}

sub create_parameterlist($$$$) {
    my $args = shift;
    my $splitter = shift;
    my $file = shift;
    my $declaration_name = shift;
    my $type;
    my $param;

    # temporarily replace commas inside function pointer definition
    my $arg_expr = qr{\([^\),]+};
    while ($args =~ /$arg_expr,/) {
	$args =~ s/($arg_expr),/$1#/g;
    }

    foreach my $arg (split($splitter, $args)) {
	# strip comments
	$arg =~ s/\/\*.*\*\///;
	# ignore argument attributes
	$arg =~ s/\sPOS0?\s/ /;
	# strip leading/trailing spaces
	$arg =~ s/^\s*//;
	$arg =~ s/\s*$//;
	$arg =~ s/\s+/ /;

	if ($arg =~ /^#/) {
	    # Treat preprocessor directive as a typeless variable just to fill
	    # corresponding data structures "correctly". Catch it later in
	    # output_* subs.
	    push_parameter($arg, "", "", $file);
	} elsif ($arg =~ m/\(.+\)\s*\(/) {
	    # pointer-to-function
	    $arg =~ tr/#/,/;
	    $arg =~ m/[^\(]+\(\*?\s*([\w\[\]\.]*)\s*\)/;
	    $param = $1;
	    $type = $arg;
	    $type =~ s/([^\(]+\(\*?)\s*$param/$1/;
	    save_struct_actual($param);
	    push_parameter($param, $type, $arg, $file, $declaration_name);
	} elsif ($arg) {
	    $arg =~ s/\s*:\s*/:/g;
	    $arg =~ s/\s*\[/\[/g;

	    my @args = split('\s*,\s*', $arg);
	    if ($args[0] =~ m/\*/) {
		$args[0] =~ s/(\*+)\s*/ $1/;
	    }

	    my @first_arg;
	    if ($args[0] =~ /^(.*\s+)(.*?\[.*\].*)$/) {
		    shift @args;
		    push(@first_arg, split('\s+', $1));
		    push(@first_arg, $2);
	    } else {
		    @first_arg = split('\s+', shift @args);
	    }

	    unshift(@args, pop @first_arg);
	    $type = join " ", @first_arg;

	    foreach $param (@args) {
		if ($param =~ m/^(\*+)\s*(.*)/) {
		    save_struct_actual($2);

		    push_parameter($2, "$type $1", $arg, $file, $declaration_name);
		}
		elsif ($param =~ m/(.*?):(\d+)/) {
		    if ($type ne "") { # skip unnamed bit-fields
			save_struct_actual($1);
			push_parameter($1, "$type:$2", $arg, $file, $declaration_name)
		    }
		}
		else {
		    save_struct_actual($param);
		    push_parameter($param, $type, $arg, $file, $declaration_name);
		}
	    }
	}
    }
}

sub push_parameter($$$$$) {
	my $param = shift;
	my $type = shift;
	my $org_arg = shift;
	my $file = shift;
	my $declaration_name = shift;

	if (($anon_struct_union == 1) && ($type eq "") &&
	    ($param eq "}")) {
		return;		# ignore the ending }; from anon. struct/union
	}

	$anon_struct_union = 0;
	$param =~ s/[\[\)].*//;

	if ($type eq "" && $param =~ /\.\.\.$/)
	{
	    if (!$param =~ /\w\.\.\.$/) {
	      # handles unnamed variable parameters
	      $param = "...";
	    }
	    elsif ($param =~ /\w\.\.\.$/) {
	      # for named variable parameters of the form `x...`, remove the dots
	      $param =~ s/\.\.\.$//;
	    }
	    if (!defined $parameterdescs{$param} || $parameterdescs{$param} eq "") {
		$parameterdescs{$param} = "variable arguments";
	    }
	}
	elsif ($type eq "" && ($param eq "" or $param eq "void"))
	{
	    $param="void";
	    $parameterdescs{void} = "no arguments";
	}
	elsif ($type eq "" && ($param eq "struct" or $param eq "union"))
	# handle unnamed (anonymous) union or struct:
	{
		$type = $param;
		$param = "{unnamed_" . $param . "}";
		$parameterdescs{$param} = "anonymous\n";
		$anon_struct_union = 1;
	}

	# warn if parameter has no description
	# (but ignore ones starting with # as these are not parameters
	# but inline preprocessor statements);
	# Note: It will also ignore void params and unnamed structs/unions
	if (!defined $parameterdescs{$param} && $param !~ /^#/) {
		$parameterdescs{$param} = $undescribed;

	        if (show_warnings($type, $declaration_name) && $param !~ /\./) {
			emit_warning("${file}:$.", "Function parameter or member '$param' not described in '$declaration_name'\n");
		}
	}

	# strip spaces from $param so that it is one continuous string
	# on @parameterlist;
	# this fixes a problem where check_sections() cannot find
	# a parameter like "addr[6 + 2]" because it actually appears
	# as "addr[6", "+", "2]" on the parameter list;
	# but it's better to maintain the param string unchanged for output,
	# so just weaken the string compare in check_sections() to ignore
	# "[blah" in a parameter string;
	###$param =~ s/\s*//g;
	push @parameterlist, $param;
	$org_arg =~ s/\s\s+/ /g;
	$parametertypes{$param} = $org_arg;
}

sub check_sections($$$$$) {
	my ($file, $decl_name, $decl_type, $sectcheck, $prmscheck) = @_;
	my @sects = split ' ', $sectcheck;
	my @prms = split ' ', $prmscheck;
	my $err;
	my ($px, $sx);
	my $prm_clean;		# strip trailing "[array size]" and/or beginning "*"

	foreach $sx (0 .. $#sects) {
		$err = 1;
		foreach $px (0 .. $#prms) {
			$prm_clean = $prms[$px];
			$prm_clean =~ s/\[.*\]//;
			$prm_clean =~ s/$attribute//i;
			# ignore array size in a parameter string;
			# however, the original param string may contain
			# spaces, e.g.:  addr[6 + 2]
			# and this appears in @prms as "addr[6" since the
			# parameter list is split at spaces;
			# hence just ignore "[..." for the sections check;
			$prm_clean =~ s/\[.*//;

			##$prm_clean =~ s/^\**//;
			if ($prm_clean eq $sects[$sx]) {
				$err = 0;
				last;
			}
		}
		if ($err) {
			if ($decl_type eq "function") {
				emit_warning("${file}:$.",
					"Excess function parameter " .
					"'$sects[$sx]' " .
					"description in '$decl_name'\n");
			}
		}
	}
}

##
# Checks the section describing the return value of a function.
sub check_return_section {
        my $file = shift;
        my $declaration_name = shift;
        my $return_type = shift;

        # Ignore an empty return type (It's a macro)
        # Ignore functions with a "void" return type. (But don't ignore "void *")
        if (($return_type eq "") || ($return_type =~ /void\s*\w*\s*$/)) {
                return;
        }

        if (!defined($sections{$section_return}) ||
            $sections{$section_return} eq "") {
                emit_warning("${file}:$.",
                        "No description found for return value of " .
                        "'$declaration_name'\n");
        }
}

##
# takes a function prototype and the name of the current file being
# processed and spits out all the details stored in the global
# arrays/hashes.
sub dump_function($$) {
    my $prototype = shift;
    my $file = shift;
    my $noret = 0;

    print_lineno($new_start_line);

    $prototype =~ s/^static +//;
    $prototype =~ s/^extern +//;
    $prototype =~ s/^asmlinkage +//;
    $prototype =~ s/^inline +//;
    $prototype =~ s/^__inline__ +//;
    $prototype =~ s/^__inline +//;
    $prototype =~ s/^__always_inline +//;
    $prototype =~ s/^noinline +//;
    $prototype =~ s/^__FORTIFY_INLINE +//;
    $prototype =~ s/__init +//;
    $prototype =~ s/__init_or_module +//;
    $prototype =~ s/__deprecated +//;
    $prototype =~ s/__flatten +//;
    $prototype =~ s/__meminit +//;
    $prototype =~ s/__must_check +//;
    $prototype =~ s/__weak +//;
    $prototype =~ s/__sched +//;
    $prototype =~ s/__printf\s*\(\s*\d*\s*,\s*\d*\s*\) +//;
    $prototype =~ s/__(?:re)?alloc_size\s*\(\s*\d+\s*(?:,\s*\d+\s*)?\) +//;
    $prototype =~ s/__diagnose_as\s*\(\s*\S+\s*(?:,\s*\d+\s*)*\) +//;
    my $define = $prototype =~ s/^#\s*define\s+//; #ak added
    $prototype =~ s/__attribute_const__ +//;
    $prototype =~ s/__attribute__\s*\(\(
            (?:
                 [\w\s]++          # attribute name
                 (?:\([^)]*+\))?   # attribute arguments
                 \s*+,?            # optional comma at the end
            )+
          \)\)\s+//x;

    # Yes, this truly is vile.  We are looking for:
    # 1. Return type (may be nothing if we're looking at a macro)
    # 2. Function name
    # 3. Function parameters.
    #
    # All the while we have to watch out for function pointer parameters
    # (which IIRC is what the two sections are for), C types (these
    # regexps don't even start to express all the possibilities), and
    # so on.
    #
    # If you mess with these regexps, it's a good idea to check that
    # the following functions' documentation still comes out right:
    # - parport_register_device (function pointer parameters)
    # - atomic_set (macro)
    # - pci_match_device, __copy_to_user (long return type)
    my $name = qr{[a-zA-Z0-9_~:]+};
    my $prototype_end1 = qr{[^\(]*};
    my $prototype_end2 = qr{[^\{]*};
    my $prototype_end = qr{\(($prototype_end1|$prototype_end2)\)};
    my $type1 = qr{[\w\s]+};
    my $type2 = qr{$type1\*+};

    if ($define && $prototype =~ m/^()($name)\s+/) {
        # This is an object-like macro, it has no return type and no parameter
        # list.
        # Function-like macros are not allowed to have spaces between
        # declaration_name and opening parenthesis (notice the \s+).
        $return_type = $1;
        $declaration_name = $2;
        $noret = 1;
    } elsif ($prototype =~ m/^()($name)\s*$prototype_end/ ||
	$prototype =~ m/^($type1)\s+($name)\s*$prototype_end/ ||
	$prototype =~ m/^($type2+)\s*($name)\s*$prototype_end/)  {
	$return_type = $1;
	$declaration_name = $2;
	my $args = $3;

	create_parameterlist($args, ',', $file, $declaration_name);
    } else {
	emit_warning("${file}:$.", "cannot understand function prototype: '$prototype'\n");
	return;
    }

    if ($identifier ne $declaration_name) {
	emit_warning("${file}:$.", "expecting prototype for $identifier(). Prototype was for $declaration_name() instead\n");
	return;
    }

    my $prms = join " ", @parameterlist;
    check_sections($file, $declaration_name, "function", $sectcheck, $prms);

    # This check emits a lot of warnings at the moment, because many
    # functions don't have a 'Return' doc section. So until the number
    # of warnings goes sufficiently down, the check is only performed in
    # verbose mode.
    # TODO: always perform the check.
    if ($verbose && !$noret) {
	    check_return_section($file, $declaration_name, $return_type);
    }

    # The function parser can be called with a typedef parameter.
    # Handle it.
    if ($return_type =~ /typedef/) {
	output_declaration($declaration_name,
			   'function',
			   {'function' => $declaration_name,
			    'typedef' => 1,
			    'module' => $modulename,
			    'functiontype' => $return_type,
			    'parameterlist' => \@parameterlist,
			    'parameterdescs' => \%parameterdescs,
			    'parametertypes' => \%parametertypes,
			    'sectionlist' => \@sectionlist,
			    'sections' => \%sections,
			    'purpose' => $declaration_purpose
			   });
    } else {
	output_declaration($declaration_name,
			   'function',
			   {'function' => $declaration_name,
			    'module' => $modulename,
			    'functiontype' => $return_type,
			    'parameterlist' => \@parameterlist,
			    'parameterdescs' => \%parameterdescs,
			    'parametertypes' => \%parametertypes,
			    'sectionlist' => \@sectionlist,
			    'sections' => \%sections,
			    'purpose' => $declaration_purpose
			   });
    }
}

sub reset_state {
    $function = "";
    %parameterdescs = ();
    %parametertypes = ();
    @parameterlist = ();
    %sections = ();
    @sectionlist = ();
    $sectcheck = "";
    $struct_actual = "";
    $prototype = "";

    $state = STATE_NORMAL;
    $inline_doc_state = STATE_INLINE_NA;
}

sub tracepoint_munge($) {
	my $file = shift;
	my $tracepointname = 0;
	my $tracepointargs = 0;

	if ($prototype =~ m/TRACE_EVENT\((.*?),/) {
		$tracepointname = $1;
	}
	if ($prototype =~ m/DEFINE_SINGLE_EVENT\((.*?),/) {
		$tracepointname = $1;
	}
	if ($prototype =~ m/DEFINE_EVENT\((.*?),(.*?),/) {
		$tracepointname = $2;
	}
	$tracepointname =~ s/^\s+//; #strip leading whitespace
	if ($prototype =~ m/TP_PROTO\((.*?)\)/) {
		$tracepointargs = $1;
	}
	if (($tracepointname eq 0) || ($tracepointargs eq 0)) {
		emit_warning("${file}:$.", "Unrecognized tracepoint format: \n".
			     "$prototype\n");
	} else {
		$prototype = "static inline void trace_$tracepointname($tracepointargs)";
		$identifier = "trace_$identifier";
	}
}

sub syscall_munge() {
	my $void = 0;

	$prototype =~ s@[\r\n]+@ @gos; # strip newlines/CR's
##	if ($prototype =~ m/SYSCALL_DEFINE0\s*\(\s*(a-zA-Z0-9_)*\s*\)/) {
	if ($prototype =~ m/SYSCALL_DEFINE0/) {
		$void = 1;
##		$prototype = "long sys_$1(void)";
	}

	$prototype =~ s/SYSCALL_DEFINE.*\(/long sys_/; # fix return type & func name
	if ($prototype =~ m/long (sys_.*?),/) {
		$prototype =~ s/,/\(/;
	} elsif ($void) {
		$prototype =~ s/\)/\(void\)/;
	}

	# now delete all of the odd-number commas in $prototype
	# so that arg types & arg names don't have a comma between them
	my $count = 0;
	my $len = length($prototype);
	if ($void) {
		$len = 0;	# skip the for-loop
	}
	for (my $ix = 0; $ix < $len; $ix++) {
		if (substr($prototype, $ix, 1) eq ',') {
			$count++;
			if ($count % 2 == 1) {
				substr($prototype, $ix, 1) = ' ';
			}
		}
	}
}

sub process_proto_function($$) {
    my $x = shift;
    my $file = shift;

    $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line

    if ($x =~ m#\s*/\*\s+MACDOC\s*#io || ($x =~ /^#/ && $x !~ /^#\s*define/)) {
	# do nothing
    }
    elsif ($x =~ /([^\{]*)/) {
	$prototype .= $1;
    }

    if (($x =~ /\{/) || ($x =~ /\#\s*define/) || ($x =~ /;/)) {
	$prototype =~ s@/\*.*?\*/@@gos;	# strip comments.
	$prototype =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
	$prototype =~ s@^\s+@@gos; # strip leading spaces

	 # Handle prototypes for function pointers like:
	 # int (*pcs_config)(struct foo)
	$prototype =~ s@^(\S+\s+)\(\s*\*(\S+)\)@$1$2@gos;

	if ($prototype =~ /SYSCALL_DEFINE/) {
		syscall_munge();
	}
	if ($prototype =~ /TRACE_EVENT/ || $prototype =~ /DEFINE_EVENT/ ||
	    $prototype =~ /DEFINE_SINGLE_EVENT/)
	{
		tracepoint_munge($file);
	}
	dump_function($prototype, $file);
	reset_state();
    }
}

sub process_proto_type($$) {
    my $x = shift;
    my $file = shift;

    $x =~ s@[\r\n]+@ @gos; # strip newlines/cr's.
    $x =~ s@^\s+@@gos; # strip leading spaces
    $x =~ s@\s+$@@gos; # strip trailing spaces
    $x =~ s@\/\/.*$@@gos; # strip C99-style comments to end of line

    if ($x =~ /^#/) {
	# To distinguish preprocessor directive from regular declaration later.
	$x .= ";";
    }

    while (1) {
	if ( $x =~ /([^\{\};]*)([\{\};])(.*)/ ) {
            if( length $prototype ) {
                $prototype .= " "
            }
	    $prototype .= $1 . $2;
	    ($2 eq '{') && $brcount++;
	    ($2 eq '}') && $brcount--;
	    if (($2 eq ';') && ($brcount == 0)) {
		dump_declaration($prototype, $file);
		reset_state();
		last;
	    }
	    $x = $3;
	} else {
	    $prototype .= $x;
	    last;
	}
    }
}


sub map_filename($) {
    my $file;
    my ($orig_file) = @_;

    if (defined($ENV{'SRCTREE'})) {
	$file = "$ENV{'SRCTREE'}" . "/" . $orig_file;
    } else {
	$file = $orig_file;
    }

    if (defined($source_map{$file})) {
	$file = $source_map{$file};
    }

    return $file;
}

sub process_export_file($) {
    my ($orig_file) = @_;
    my $file = map_filename($orig_file);

    if (!open(IN,"<$file")) {
	print STDERR "Error: Cannot open file $file\n";
	++$errors;
	return;
    }

    while (<IN>) {
	if (/$export_symbol/) {
	    next if (defined($nosymbol_table{$2}));
	    $function_table{$2} = 1;
	}
	if (/$export_symbol_ns/) {
	    next if (defined($nosymbol_table{$2}));
	    $function_table{$2} = 1;
	}
    }

    close(IN);
}

#
# Parsers for the various processing states.
#
# STATE_NORMAL: looking for the /** to begin everything.
#
sub process_normal() {
    if (/$doc_start/o) {
	$state = STATE_NAME;	# next line is always the function name
	$in_doc_sect = 0;
	$declaration_start_line = $. + 1;
    }
}

#
# STATE_NAME: Looking for the "name - description" line
#
sub process_name($$) {
    my $file = shift;
    my $descr;

    if (/$doc_block/o) {
	$state = STATE_DOCBLOCK;
	$contents = "";
	$new_start_line = $.;

	if ( $1 eq "" ) {
	    $section = $section_intro;
	} else {
	    $section = $1;
	}
    } elsif (/$doc_decl/o) {
	$identifier = $1;
	my $is_kernel_comment = 0;
	my $decl_start = qr{$doc_com};
	# test for pointer declaration type, foo * bar() - desc
	my $fn_type = qr{\w+\s*\*\s*}; 
	my $parenthesis = qr{\(\w*\)};
	my $decl_end = qr{[-:].*};
	if (/^$decl_start([\w\s]+?)$parenthesis?\s*$decl_end?$/) {
	    $identifier = $1;
	}
	if ($identifier =~ m/^(struct|union|enum|typedef)\b\s*(\S*)/) {
	    $decl_type = $1;
	    $identifier = $2;
	    $is_kernel_comment = 1;
	}
	# Look for foo() or static void foo() - description; or misspelt
	# identifier
	elsif (/^$decl_start$fn_type?(\w+)\s*$parenthesis?\s*$decl_end?$/ ||
	    /^$decl_start$fn_type?(\w+.*)$parenthesis?\s*$decl_end$/) {
	    $identifier = $1;
	    $decl_type = 'function';
	    $identifier =~ s/^define\s+//;
	    $is_kernel_comment = 1;
	}
	$identifier =~ s/\s+$//;

	$state = STATE_BODY;
	# if there's no @param blocks need to set up default section
	# here
	$contents = "";
	$section = $section_default;
	$new_start_line = $. + 1;
	if (/[-:](.*)/) {
	    # strip leading/trailing/multiple spaces
	    $descr= $1;
	    $descr =~ s/^\s*//;
	    $descr =~ s/\s*$//;
	    $descr =~ s/\s+/ /g;
	    $declaration_purpose = $descr;
	    $state = STATE_BODY_MAYBE;
	} else {
	    $declaration_purpose = "";
	}

	if (!$is_kernel_comment) {
	    emit_warning("${file}:$.", "This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst\n$_");
	    $state = STATE_NORMAL;
	}

	if (($declaration_purpose eq "") && $verbose) {
	    emit_warning("${file}:$.", "missing initial short description on line:\n$_");
	}

	if ($identifier eq "" && $decl_type ne "enum") {
	    emit_warning("${file}:$.", "wrong kernel-doc identifier on line:\n$_");
	    $state = STATE_NORMAL;
	}

	if ($verbose) {
	    print STDERR "${file}:$.: info: Scanning doc for $decl_type $identifier\n";
	}
    } else {
	emit_warning("${file}:$.", "Cannot understand $_ on line $. - I thought it was a doc line\n");
	$state = STATE_NORMAL;
    }
}


#
# STATE_BODY and STATE_BODY_MAYBE: the bulk of a kerneldoc comment.
#
sub process_body($$) {
    my $file = shift;

    if ($state == STATE_BODY_WITH_BLANK_LINE && /^\s*\*\s?\S/) {
	dump_section($file, $section, $contents);
	$section = $section_default;
	$new_start_line = $.;
	$contents = "";
    }

    if (/$doc_sect/i) { # case insensitive for supported section names
	$newsection = $1;
	$newcontents = $2;

	# map the supported section names to the canonical names
	if ($newsection =~ m/^description$/i) {
	    $newsection = $section_default;
	} elsif ($newsection =~ m/^context$/i) {
	    $newsection = $section_context;
	} elsif ($newsection =~ m/^returns?$/i) {
	    $newsection = $section_return;
	} elsif ($newsection =~ m/^\@return$/) {
	    # special: @return is a section, not a param description
	    $newsection = $section_return;
	}

	if (($contents ne "") && ($contents ne "\n")) {
	    if (!$in_doc_sect && $verbose) {
		emit_warning("${file}:$.", "contents before sections\n");
	    }
	    dump_section($file, $section, $contents);
	    $section = $section_default;
	}

	$in_doc_sect = 1;
	$state = STATE_BODY;
	$contents = $newcontents;
	$new_start_line = $.;
	while (substr($contents, 0, 1) eq " ") {
	    $contents = substr($contents, 1);
	}
	if ($contents ne "") {
	    $contents .= "\n";
	}
	$section = $newsection;
	$leading_space = undef;
    } elsif (/$doc_end/) {
	if (($contents ne "") && ($contents ne "\n")) {
	    dump_section($file, $section, $contents);
	    $section = $section_default;
	    $contents = "";
	}
	# look for doc_com + <text> + doc_end:
	if ($_ =~ m'\s*\*\s*[a-zA-Z_0-9:\.]+\*/') {
	    emit_warning("${file}:$.", "suspicious ending line: $_");
	}

	$prototype = "";
	$state = STATE_PROTO;
	$brcount = 0;
        $new_start_line = $. + 1;
    } elsif (/$doc_content/) {
	if ($1 eq "") {
	    if ($section eq $section_context) {
		dump_section($file, $section, $contents);
		$section = $section_default;
		$contents = "";
		$new_start_line = $.;
		$state = STATE_BODY;
	    } else {
		if ($section ne $section_default) {
		    $state = STATE_BODY_WITH_BLANK_LINE;
		} else {
		    $state = STATE_BODY;
		}
		$contents .= "\n";
	    }
	} elsif ($state == STATE_BODY_MAYBE) {
	    # Continued declaration purpose
	    chomp($declaration_purpose);
	    $declaration_purpose .= " " . $1;
	    $declaration_purpose =~ s/\s+/ /g;
	} else {
	    my $cont = $1;
	    if ($section =~ m/^@/ || $section eq $section_context) {
		if (!defined $leading_space) {
		    if ($cont =~ m/^(\s+)/) {
			$leading_space = $1;
		    } else {
			$leading_space = "";
		    }
		}
		$cont =~ s/^$leading_space//;
	    }
	    $contents .= $cont . "\n";
	}
    } else {
	# i dont know - bad line?  ignore.
	emit_warning("${file}:$.", "bad line: $_");
    }
}


#
# STATE_PROTO: reading a function/whatever prototype.
#
sub process_proto($$) {
    my $file = shift;

    if (/$doc_inline_oneline/) {
	$section = $1;
	$contents = $2;
	if ($contents ne "") {
	    $contents .= "\n";
	    dump_section($file, $section, $contents);
	    $section = $section_default;
	    $contents = "";
	}
    } elsif (/$doc_inline_start/) {
	$state = STATE_INLINE;
	$inline_doc_state = STATE_INLINE_NAME;
    } elsif ($decl_type eq 'function') {
	process_proto_function($_, $file);
    } else {
	process_proto_type($_, $file);
    }
}

#
# STATE_DOCBLOCK: within a DOC: block.
#
sub process_docblock($$) {
    my $file = shift;

    if (/$doc_end/) {
	dump_doc_section($file, $section, $contents);
	$section = $section_default;
	$contents = "";
	$function = "";
	%parameterdescs = ();
	%parametertypes = ();
	@parameterlist = ();
	%sections = ();
	@sectionlist = ();
	$prototype = "";
	$state = STATE_NORMAL;
    } elsif (/$doc_content/) {
	if ( $1 eq "" )	{
	    $contents .= $blankline;
	} else {
	    $contents .= $1 . "\n";
	}
    }
}

#
# STATE_INLINE: docbook comments within a prototype.
#
sub process_inline($$) {
    my $file = shift;

    # First line (state 1) needs to be a @parameter
    if ($inline_doc_state == STATE_INLINE_NAME && /$doc_inline_sect/o) {
	$section = $1;
	$contents = $2;
	$new_start_line = $.;
	if ($contents ne "") {
	    while (substr($contents, 0, 1) eq " ") {
		$contents = substr($contents, 1);
	    }
	    $contents .= "\n";
	}
	$inline_doc_state = STATE_INLINE_TEXT;
	# Documentation block end */
    } elsif (/$doc_inline_end/) {
	if (($contents ne "") && ($contents ne "\n")) {
	    dump_section($file, $section, $contents);
	    $section = $section_default;
	    $contents = "";
	}
	$state = STATE_PROTO;
	$inline_doc_state = STATE_INLINE_NA;
	# Regular text
    } elsif (/$doc_content/) {
	if ($inline_doc_state == STATE_INLINE_TEXT) {
	    $contents .= $1 . "\n";
	    # nuke leading blank lines
	    if ($contents =~ /^\s*$/) {
		$contents = "";
	    }
	} elsif ($inline_doc_state == STATE_INLINE_NAME) {
	    $inline_doc_state = STATE_INLINE_ERROR;
	    emit_warning("${file}:$.", "Incorrect use of kernel-doc format: $_");
	}
    }
}


sub process_file($) {
    my $file;
    my $initial_section_counter = $section_counter;
    my ($orig_file) = @_;

    $file = map_filename($orig_file);

    if (!open(IN_FILE,"<$file")) {
	print STDERR "Error: Cannot open file $file\n";
	++$errors;
	return;
    }

    $. = 1;

    $section_counter = 0;
    while (<IN_FILE>) {
	while (s/\\\s*$//) {
	    $_ .= <IN_FILE>;
	}
	# Replace tabs by spaces
        while ($_ =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e) {};
	# Hand this line to the appropriate state handler
	if ($state == STATE_NORMAL) {
	    process_normal();
	} elsif ($state == STATE_NAME) {
	    process_name($file, $_);
	} elsif ($state == STATE_BODY || $state == STATE_BODY_MAYBE ||
		 $state == STATE_BODY_WITH_BLANK_LINE) {
	    process_body($file, $_);
	} elsif ($state == STATE_INLINE) { # scanning for inline parameters
	    process_inline($file, $_);
	} elsif ($state == STATE_PROTO) {
	    process_proto($file, $_);
	} elsif ($state == STATE_DOCBLOCK) {
	    process_docblock($file, $_);
	}
    }

    # Make sure we got something interesting.
    if ($initial_section_counter == $section_counter && $
	output_mode ne "none") {
	if ($output_selection == OUTPUT_INCLUDE) {
	    emit_warning("${file}:1", "'$_' not found\n")
		for keys %function_table;
	}
	else {
	    emit_warning("${file}:1", "no structured comments found\n");
	}
    }
    close IN_FILE;
}


if ($output_mode eq "rst") {
	get_sphinx_version() if (!$sphinx_major);
}

$kernelversion = get_kernel_version();

# generate a sequence of code that will splice in highlighting information
# using the s// operator.
for (my $k = 0; $k < @highlights; $k++) {
    my $pattern = $highlights[$k][0];
    my $result = $highlights[$k][1];
#   print STDERR "scanning pattern:$pattern, highlight:($result)\n";
    $dohighlight .=  "\$contents =~ s:$pattern:$result:gs;\n";
}

# Read the file that maps relative names to absolute names for
# separate source and object directories and for shadow trees.
if (open(SOURCE_MAP, "<.tmp_filelist.txt")) {
	my ($relname, $absname);
	while(<SOURCE_MAP>) {
		chop();
		($relname, $absname) = (split())[0..1];
		$relname =~ s:^/+::;
		$source_map{$relname} = $absname;
	}
	close(SOURCE_MAP);
}

if ($output_selection == OUTPUT_EXPORTED ||
    $output_selection == OUTPUT_INTERNAL) {

    push(@export_file_list, @ARGV);

    foreach (@export_file_list) {
	chomp;
	process_export_file($_);
    }
}

foreach (@ARGV) {
    chomp;
    process_file($_);
}
if ($verbose && $errors) {
  print STDERR "$errors errors\n";
}
if ($verbose && $warnings) {
  print STDERR "$warnings warnings\n";
}

if ($Werror && $warnings) {
    print STDERR "$warnings warnings as Errors\n";
    exit($warnings);
} else {
    exit($output_mode eq "none" ? 0 : $errors)
}

__END__

=head1 OPTIONS

=head2 Output format selection (mutually exclusive):

=over 8

=item -man

Output troff manual page format.

=item -rst

Output reStructuredText format. This is the default.

=item -none

Do not output documentation, only warnings.

=back

=head2 Output format modifiers

=head3 reStructuredText only

=over 8

=item -sphinx-version VERSION

Use the ReST C domain dialect compatible with a specific Sphinx Version.

If not specified, kernel-doc will auto-detect using the sphinx-build version
found on PATH.

=back

=head2 Output selection (mutually exclusive):

=over 8

=item -export

Only output documentation for the symbols that have been exported using
EXPORT_SYMBOL() and related macros in any input FILE or -export-file FILE.

=item -internal

Only output documentation for the symbols that have NOT been exported using
EXPORT_SYMBOL() and related macros in any input FILE or -export-file FILE.

=item -function NAME

Only output documentation for the given function or DOC: section title.
All other functions and DOC: sections are ignored.

May be specified multiple times.

=item -nosymbol NAME

Exclude the specified symbol from the output documentation.

May be specified multiple times.

=back

=head2 Output selection modifiers:

=over 8

=item -no-doc-sections

Do not output DOC: sections.

=item -export-file FILE

Specify an additional FILE in which to look for EXPORT_SYMBOL information.

To be used with -export or -internal.

May be specified multiple times.

=back

=head3 reStructuredText only

=over 8

=item -enable-lineno

Enable output of .. LINENO lines.

=back

=head2 Other parameters:

=over 8

=item -h, -help

Print this help.

=item -v

Verbose output, more warnings and other information.

=item -Werror

Treat warnings as errors.

=back

=cut
