kernel-doc (d3c55a710f95e11e2369a57cb53d4a7f3280aa57) kernel-doc (9f6f4c110c95a96942004547c84ab22384d9e723)
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 $is_macro = 0;
824
825 my $signature = "";
826 if ($args{'functiontype'} ne "") {
827 $signature = $args{'functiontype'} . " " . $args{'function'} . " (";
828 } else {
829 $signature = $args{'function'} . " (";
830 }
831

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

849
850 if ($sphinx_major < 3) {
851 if ($args{'typedef'}) {
852 print ".. c:type:: ". $args{'function'} . "\n\n";
853 print_lineno($declaration_start_line);
854 print " **Typedef**: ";
855 $lineprefix = "";
856 output_highlight_rst($args{'purpose'});
823
824 my $signature = "";
825 if ($args{'functiontype'} ne "") {
826 $signature = $args{'functiontype'} . " " . $args{'function'} . " (";
827 } else {
828 $signature = $args{'function'} . " (";
829 }
830

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

848
849 if ($sphinx_major < 3) {
850 if ($args{'typedef'}) {
851 print ".. c:type:: ". $args{'function'} . "\n\n";
852 print_lineno($declaration_start_line);
853 print " **Typedef**: ";
854 $lineprefix = "";
855 output_highlight_rst($args{'purpose'});
857 print "\n\n**Syntax**\n\n ``";
858 $is_macro = 1;
856 print "\n\n**Syntax**\n\n";
857 print " ``$signature``\n\n";
859 } else {
858 } else {
860 print ".. c:function:: ";
859 print ".. c:function:: $signature\n\n";
861 }
862 } else {
863 if ($args{'typedef'} || $args{'functiontype'} eq "") {
860 }
861 } else {
862 if ($args{'typedef'} || $args{'functiontype'} eq "") {
864 $is_macro = 1;
865 print ".. c:macro:: ". $args{'function'} . "\n\n";
863 print ".. c:macro:: ". $args{'function'} . "\n\n";
866 } else {
867 print ".. c:function:: ";
868 }
869
864
870 if ($args{'typedef'}) {
871 print_lineno($declaration_start_line);
872 print " **Typedef**: ";
873 $lineprefix = "";
874 output_highlight_rst($args{'purpose'});
875 print "\n\n**Syntax**\n\n ``";
865 if ($args{'typedef'}) {
866 print_lineno($declaration_start_line);
867 print " **Typedef**: ";
868 $lineprefix = "";
869 output_highlight_rst($args{'purpose'});
870 print "\n\n**Syntax**\n\n";
871 print " ``$signature``\n\n";
872 } else {
873 print "``$signature``\n\n";
874 }
876 } else {
875 } else {
877 print "``" if ($is_macro);
876 print ".. c:function:: $signature\n\n";
878 }
879 }
880
877 }
878 }
879
881 print $signature;
882
883 if ($is_macro) {
884 print "``\n\n";
885 } else {
886 print "\n\n";
887 }
888 if (!$args{'typedef'}) {
889 print_lineno($declaration_start_line);
890 $lineprefix = " ";
891 output_highlight_rst($args{'purpose'});
892 print "\n";
893 }
894
895 #

--- 1654 unchanged lines hidden ---
880 if (!$args{'typedef'}) {
881 print_lineno($declaration_start_line);
882 $lineprefix = " ";
883 output_highlight_rst($args{'purpose'});
884 print "\n";
885 }
886
887 #

--- 1654 unchanged lines hidden ---