kernel-doc (bdfe2be34b37d988a525d5559fe132728510735a) kernel-doc (7c9aa0157ef4b4cc28c98b08a971dc8344e64aab)
1#!/usr/bin/env perl
2
3use warnings;
4use strict;
5
6## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
7## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##
8## Copyright (C) 2001 Simon Huggins ##

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

1574 } else {
1575 $prototype = "static inline void trace_$tracepointname($tracepointargs)";
1576 }
1577}
1578
1579sub syscall_munge() {
1580 my $void = 0;
1581
1#!/usr/bin/env perl
2
3use warnings;
4use strict;
5
6## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
7## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##
8## Copyright (C) 2001 Simon Huggins ##

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

1574 } else {
1575 $prototype = "static inline void trace_$tracepointname($tracepointargs)";
1576 }
1577}
1578
1579sub syscall_munge() {
1580 my $void = 0;
1581
1582 $prototype =~ s@[\r\n\t]+@ @gos; # strip newlines/CR's/tabs
1582 $prototype =~ s@[\r\n]+@ @gos; # strip newlines/CR's
1583## if ($prototype =~ m/SYSCALL_DEFINE0\s*\(\s*(a-zA-Z0-9_)*\s*\)/) {
1584 if ($prototype =~ m/SYSCALL_DEFINE0/) {
1585 $void = 1;
1586## $prototype = "long sys_$1(void)";
1587 }
1588
1589 $prototype =~ s/SYSCALL_DEFINE.*\(/long sys_/; # fix return type & func name
1590 if ($prototype =~ m/long (sys_.*?),/) {

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

1773
1774 $. = 1;
1775
1776 $section_counter = 0;
1777 while (<IN>) {
1778 while (s/\\\s*$//) {
1779 $_ .= <IN>;
1780 }
1583## if ($prototype =~ m/SYSCALL_DEFINE0\s*\(\s*(a-zA-Z0-9_)*\s*\)/) {
1584 if ($prototype =~ m/SYSCALL_DEFINE0/) {
1585 $void = 1;
1586## $prototype = "long sys_$1(void)";
1587 }
1588
1589 $prototype =~ s/SYSCALL_DEFINE.*\(/long sys_/; # fix return type & func name
1590 if ($prototype =~ m/long (sys_.*?),/) {

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

1773
1774 $. = 1;
1775
1776 $section_counter = 0;
1777 while (<IN>) {
1778 while (s/\\\s*$//) {
1779 $_ .= <IN>;
1780 }
1781 # Replace tabs by spaces
1782 while ($_ =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e) {};
1781 if ($state == STATE_NORMAL) {
1782 if (/$doc_start/o) {
1783 $state = STATE_NAME; # next line is always the function name
1784 $in_doc_sect = 0;
1785 $declaration_start_line = $. + 1;
1786 }
1787 } elsif ($state == STATE_NAME) {# this line is the function name (always)
1788 if (/$doc_block/o) {

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

1872 dump_section($file, $section, xml_escape($contents));
1873 $section = $section_default;
1874 }
1875
1876 $in_doc_sect = 1;
1877 $in_purpose = 0;
1878 $contents = $newcontents;
1879 $new_start_line = $.;
1783 if ($state == STATE_NORMAL) {
1784 if (/$doc_start/o) {
1785 $state = STATE_NAME; # next line is always the function name
1786 $in_doc_sect = 0;
1787 $declaration_start_line = $. + 1;
1788 }
1789 } elsif ($state == STATE_NAME) {# this line is the function name (always)
1790 if (/$doc_block/o) {

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

1874 dump_section($file, $section, xml_escape($contents));
1875 $section = $section_default;
1876 }
1877
1878 $in_doc_sect = 1;
1879 $in_purpose = 0;
1880 $contents = $newcontents;
1881 $new_start_line = $.;
1880 while ((substr($contents, 0, 1) eq " ") ||
1881 substr($contents, 0, 1) eq "\t") {
1882 while (substr($contents, 0, 1) eq " ") {
1882 $contents = substr($contents, 1);
1883 }
1884 if ($contents ne "") {
1885 $contents .= "\n";
1886 }
1887 $section = $newsection;
1888 $leading_space = undef;
1889 } elsif (/$doc_end/) {

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

1942 }
1943 } elsif ($state == STATE_INLINE) { # scanning for inline parameters
1944 # First line (state 1) needs to be a @parameter
1945 if ($inline_doc_state == STATE_INLINE_NAME && /$doc_inline_sect/o) {
1946 $section = $1;
1947 $contents = $2;
1948 $new_start_line = $.;
1949 if ($contents ne "") {
1883 $contents = substr($contents, 1);
1884 }
1885 if ($contents ne "") {
1886 $contents .= "\n";
1887 }
1888 $section = $newsection;
1889 $leading_space = undef;
1890 } elsif (/$doc_end/) {

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

1943 }
1944 } elsif ($state == STATE_INLINE) { # scanning for inline parameters
1945 # First line (state 1) needs to be a @parameter
1946 if ($inline_doc_state == STATE_INLINE_NAME && /$doc_inline_sect/o) {
1947 $section = $1;
1948 $contents = $2;
1949 $new_start_line = $.;
1950 if ($contents ne "") {
1950 while ((substr($contents, 0, 1) eq " ") ||
1951 substr($contents, 0, 1) eq "\t") {
1951 while (substr($contents, 0, 1) eq " ") {
1952 $contents = substr($contents, 1);
1953 }
1954 $contents .= "\n";
1955 }
1956 $inline_doc_state = STATE_INLINE_TEXT;
1957 # Documentation block end */
1958 } elsif (/$doc_inline_end/) {
1959 if (($contents ne "") && ($contents ne "\n")) {

--- 125 unchanged lines hidden ---
1952 $contents = substr($contents, 1);
1953 }
1954 $contents .= "\n";
1955 }
1956 $inline_doc_state = STATE_INLINE_TEXT;
1957 # Documentation block end */
1958 } elsif (/$doc_inline_end/) {
1959 if (($contents ne "") && ($contents ne "\n")) {

--- 125 unchanged lines hidden ---