kernel-doc (a3a23d360cdd853b1038deda05e8d8c134a49a90) kernel-doc (e8ebb853eb5751168cfd87c706fb1c38e053d4fb)
1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0
3# vim: softtabstop=4
4
5use warnings;
6use strict;
7
8## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##

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

815 print $lineprefix . $line . "\n";
816 }
817}
818
819sub output_function_rst(%) {
820 my %args = %{$_[0]};
821 my ($parameter, $section);
822 my $oldprefix = $lineprefix;
1#!/usr/bin/env perl
2# SPDX-License-Identifier: GPL-2.0
3# vim: softtabstop=4
4
5use warnings;
6use strict;
7
8## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##

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

815 print $lineprefix . $line . "\n";
816 }
817}
818
819sub output_function_rst(%) {
820 my %args = %{$_[0]};
821 my ($parameter, $section);
822 my $oldprefix = $lineprefix;
823 my $start = "";
824 my $is_macro = 0;
825
826 if ($sphinx_major < 3) {
827 if ($args{'typedef'}) {
828 print ".. c:type:: ". $args{'function'} . "\n\n";
829 print_lineno($declaration_start_line);
830 print " **Typedef**: ";
831 $lineprefix = "";
832 output_highlight_rst($args{'purpose'});
823 my $is_macro = 0;
824
825 if ($sphinx_major < 3) {
826 if ($args{'typedef'}) {
827 print ".. c:type:: ". $args{'function'} . "\n\n";
828 print_lineno($declaration_start_line);
829 print " **Typedef**: ";
830 $lineprefix = "";
831 output_highlight_rst($args{'purpose'});
833 $start = "\n\n**Syntax**\n\n ``";
832 print "\n\n**Syntax**\n\n ``";
834 $is_macro = 1;
835 } else {
836 print ".. c:function:: ";
837 }
838 } else {
839 if ($args{'typedef'} || $args{'functiontype'} eq "") {
840 $is_macro = 1;
841 print ".. c:macro:: ". $args{'function'} . "\n\n";
842 } else {
843 print ".. c:function:: ";
844 }
845
846 if ($args{'typedef'}) {
847 print_lineno($declaration_start_line);
848 print " **Typedef**: ";
849 $lineprefix = "";
850 output_highlight_rst($args{'purpose'});
833 $is_macro = 1;
834 } else {
835 print ".. c:function:: ";
836 }
837 } else {
838 if ($args{'typedef'} || $args{'functiontype'} eq "") {
839 $is_macro = 1;
840 print ".. c:macro:: ". $args{'function'} . "\n\n";
841 } else {
842 print ".. c:function:: ";
843 }
844
845 if ($args{'typedef'}) {
846 print_lineno($declaration_start_line);
847 print " **Typedef**: ";
848 $lineprefix = "";
849 output_highlight_rst($args{'purpose'});
851 $start = "\n\n**Syntax**\n\n ``";
850 print "\n\n**Syntax**\n\n ``";
852 } else {
853 print "``" if ($is_macro);
854 }
855 }
856 if ($args{'functiontype'} ne "") {
851 } else {
852 print "``" if ($is_macro);
853 }
854 }
855 if ($args{'functiontype'} ne "") {
857 $start .= $args{'functiontype'} . " " . $args{'function'} . " (";
856 print $args{'functiontype'} . " " . $args{'function'} . " (";
858 } else {
857 } else {
859 $start .= $args{'function'} . " (";
858 print $args{'function'} . " (";
860 }
859 }
861 print $start;
862
863 my $count = 0;
864 foreach my $parameter (@{$args{'parameterlist'}}) {
865 if ($count ne 0) {
866 print ", ";
867 }
868 $count++;
869 $type = $args{'parametertypes'}{$parameter};

--- 1675 unchanged lines hidden ---
860
861 my $count = 0;
862 foreach my $parameter (@{$args{'parameterlist'}}) {
863 if ($count ne 0) {
864 print ", ";
865 }
866 $count++;
867 $type = $args{'parametertypes'}{$parameter};

--- 1675 unchanged lines hidden ---