kernel-doc (efa44475b8f5c692be4c5822a659e1a96f16dacb) | kernel-doc (e3ad05fe6e6ff645aa91e9a555231ff53470daba) |
---|---|
1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 872 unchanged lines hidden (view full) --- 881} 882 883sub output_function_rst(%) { 884 my %args = %{$_[0]}; 885 my ($parameter, $section); 886 my $oldprefix = $lineprefix; 887 my $start = ""; 888 | 1#!/usr/bin/env perl 2# SPDX-License-Identifier: GPL-2.0 3 4use warnings; 5use strict; 6 7## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## 8## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ## --- 872 unchanged lines hidden (view full) --- 881} 882 883sub output_function_rst(%) { 884 my %args = %{$_[0]}; 885 my ($parameter, $section); 886 my $oldprefix = $lineprefix; 887 my $start = ""; 888 |
889 if ($args{'typedef'}) { 890 if ($sphinx_major < 3) { | 889 if ($sphinx_major < 3) { 890 if ($args{'typedef'}) { |
891 print ".. c:type:: ". $args{'function'} . "\n\n"; | 891 print ".. c:type:: ". $args{'function'} . "\n\n"; |
892 print_lineno($declaration_start_line); 893 print " **Typedef**: "; 894 $lineprefix = ""; 895 output_highlight_rst($args{'purpose'}); 896 $start = "\n\n**Syntax**\n\n ``"; |
|
892 } else { | 897 } else { |
893 print ".. c:function:: ". $args{'function'} . "\n\n"; | 898 print ".. c:function:: "; |
894 } | 899 } |
895 print_lineno($declaration_start_line); 896 print " **Typedef**: "; 897 $lineprefix = ""; 898 output_highlight_rst($args{'purpose'}); 899 $start = "\n\n**Syntax**\n\n ``"; | |
900 } else { | 900 } else { |
901 print ".. c:function:: "; | 901 print ".. c:macro:: ". $args{'function'} . "\n\n"; 902 903 if ($args{'typedef'}) { 904 print_lineno($declaration_start_line); 905 print " **Typedef**: "; 906 $lineprefix = ""; 907 output_highlight_rst($args{'purpose'}); 908 $start = "\n\n**Syntax**\n\n ``"; 909 } else { 910 print "``"; 911 } |
902 } 903 if ($args{'functiontype'} ne "") { 904 $start .= $args{'functiontype'} . " " . $args{'function'} . " ("; 905 } else { 906 $start .= $args{'function'} . " ("; 907 } 908 print $start; 909 --- 10 unchanged lines hidden (view full) --- 920 print $1 . $parameter . ") (" . $2 . ")"; 921 } else { 922 print $type . " " . $parameter; 923 } 924 } 925 if ($args{'typedef'}) { 926 print ");``\n\n"; 927 } else { | 912 } 913 if ($args{'functiontype'} ne "") { 914 $start .= $args{'functiontype'} . " " . $args{'function'} . " ("; 915 } else { 916 $start .= $args{'function'} . " ("; 917 } 918 print $start; 919 --- 10 unchanged lines hidden (view full) --- 930 print $1 . $parameter . ") (" . $2 . ")"; 931 } else { 932 print $type . " " . $parameter; 933 } 934 } 935 if ($args{'typedef'}) { 936 print ");``\n\n"; 937 } else { |
928 print ")\n\n"; | 938 if ($sphinx_major < 3) { 939 print ")\n\n"; 940 } else { 941 print ")``\n"; 942 } |
929 print_lineno($declaration_start_line); 930 $lineprefix = " "; 931 output_highlight_rst($args{'purpose'}); 932 print "\n"; 933 } 934 935 print "**Parameters**\n\n"; 936 $lineprefix = " "; --- 1419 unchanged lines hidden --- | 943 print_lineno($declaration_start_line); 944 $lineprefix = " "; 945 output_highlight_rst($args{'purpose'}); 946 print "\n"; 947 } 948 949 print "**Parameters**\n\n"; 950 $lineprefix = " "; --- 1419 unchanged lines hidden --- |