kernel-doc (88c2b57da4ce3c8b5f849dc5356bdea9e2ed1134) kernel-doc (c9b2cfb3faece55df7f50b4ab76bc00ac8e06700)
1#!/usr/bin/perl -w
2
3use strict;
4
5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##
7## Copyright (C) 2001 Simon Huggins ##
8## Copyright (C) 2005-2012 Randy Dunlap ##

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

56 -list Output symbol list format. This is for use by docproc.
57 -man Output troff manual page format. This is the default.
58 -rst Output reStructuredText format.
59 -text Output plain text format.
60
61Output selection (mutually exclusive):
62 -export Only output documentation for symbols that have been
63 exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
1#!/usr/bin/perl -w
2
3use strict;
4
5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
6## Copyright (C) 2000, 1 Tim Waugh <twaugh@redhat.com> ##
7## Copyright (C) 2001 Simon Huggins ##
8## Copyright (C) 2005-2012 Randy Dunlap ##

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

56 -list Output symbol list format. This is for use by docproc.
57 -man Output troff manual page format. This is the default.
58 -rst Output reStructuredText format.
59 -text Output plain text format.
60
61Output selection (mutually exclusive):
62 -export Only output documentation for symbols that have been
63 exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
64 in the same FILE or any -export-file FILE.
64 in any input FILE or -export-file FILE.
65 -internal Only output documentation for symbols that have NOT been
66 exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
65 -internal Only output documentation for symbols that have NOT been
66 exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL()
67 in the same FILE or any -export-file FILE.
67 in any input FILE or -export-file FILE.
68 -function NAME Only output documentation for the given function(s)
69 or DOC: section title(s). All other functions and DOC:
70 sections are ignored. May be specified multiple times.
71 -nofunction NAME Do NOT output documentation for the given function(s);
72 only output documentation for the other functions and
73 DOC: sections. May be specified multiple times.
74
75Output selection modifiers:

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

2787 $file = map_filename($orig_file);
2788
2789 if (!open(IN,"<$file")) {
2790 print STDERR "Error: Cannot open file $file\n";
2791 ++$errors;
2792 return;
2793 }
2794
68 -function NAME Only output documentation for the given function(s)
69 or DOC: section title(s). All other functions and DOC:
70 sections are ignored. May be specified multiple times.
71 -nofunction NAME Do NOT output documentation for the given function(s);
72 only output documentation for the other functions and
73 DOC: sections. May be specified multiple times.
74
75Output selection modifiers:

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

2787 $file = map_filename($orig_file);
2788
2789 if (!open(IN,"<$file")) {
2790 print STDERR "Error: Cannot open file $file\n";
2791 ++$errors;
2792 return;
2793 }
2794
2795 # two passes for -export and -internal
2796 if ($output_selection == OUTPUT_EXPORTED ||
2797 $output_selection == OUTPUT_INTERNAL) {
2798 while (<IN>) {
2799 if (/$export_symbol/o) {
2800 $function_table{$2} = 1;
2801 }
2802 }
2803 seek(IN, 0, 0);
2804 }
2805
2806 $. = 1;
2807
2808 $section_counter = 0;
2809 while (<IN>) {
2810 while (s/\\\s*$//) {
2811 $_ .= <IN>;
2812 }
2813 if ($state == STATE_NORMAL) {

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

3105 $relname =~ s:^/+::;
3106 $source_map{$relname} = $absname;
3107 }
3108 close(SOURCE_MAP);
3109}
3110
3111if ($output_selection == OUTPUT_EXPORTED ||
3112 $output_selection == OUTPUT_INTERNAL) {
2795 $. = 1;
2796
2797 $section_counter = 0;
2798 while (<IN>) {
2799 while (s/\\\s*$//) {
2800 $_ .= <IN>;
2801 }
2802 if ($state == STATE_NORMAL) {

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

3094 $relname =~ s:^/+::;
3095 $source_map{$relname} = $absname;
3096 }
3097 close(SOURCE_MAP);
3098}
3099
3100if ($output_selection == OUTPUT_EXPORTED ||
3101 $output_selection == OUTPUT_INTERNAL) {
3102
3103 push(@export_file_list, @ARGV);
3104
3113 foreach (@export_file_list) {
3114 chomp;
3115 process_export_file($_);
3116 }
3117}
3118
3119foreach (@ARGV) {
3120 chomp;
3121 process_file($_);
3122}
3123if ($verbose && $errors) {
3124 print STDERR "$errors errors\n";
3125}
3126if ($verbose && $warnings) {
3127 print STDERR "$warnings warnings\n";
3128}
3129
3130exit($errors);
3105 foreach (@export_file_list) {
3106 chomp;
3107 process_export_file($_);
3108 }
3109}
3110
3111foreach (@ARGV) {
3112 chomp;
3113 process_file($_);
3114}
3115if ($verbose && $errors) {
3116 print STDERR "$errors errors\n";
3117}
3118if ($verbose && $warnings) {
3119 print STDERR "$warnings warnings\n";
3120}
3121
3122exit($errors);