kernel-doc (b05142675310d2ac80276569e151742f880e3ec3) | kernel-doc (b031ac4e7ddcd16e34cbc4fa33e340857a99d181) |
---|---|
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 ## --- 377 unchanged lines hidden (view full) --- 386my $section = $section_default; 387my $section_context = "Context"; 388my $section_return = "Return"; 389 390my $undescribed = "-- undescribed --"; 391 392reset_state(); 393 | 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 ## --- 377 unchanged lines hidden (view full) --- 386my $section = $section_default; 387my $section_context = "Context"; 388my $section_return = "Return"; 389 390my $undescribed = "-- undescribed --"; 391 392reset_state(); 393 |
394while ($ARGV[0] =~ m/^-(.*)/) { 395 my $cmd = shift @ARGV; 396 if ($cmd eq "-man") { | 394while ($ARGV[0] =~ m/^--?(.*)/) { 395 my $cmd = $1; 396 shift @ARGV; 397 if ($cmd eq "man") { |
397 $output_mode = "man"; 398 @highlights = @highlights_man; 399 $blankline = $blankline_man; | 398 $output_mode = "man"; 399 @highlights = @highlights_man; 400 $blankline = $blankline_man; |
400 } elsif ($cmd eq "-rst") { | 401 } elsif ($cmd eq "rst") { |
401 $output_mode = "rst"; 402 @highlights = @highlights_rst; 403 $blankline = $blankline_rst; | 402 $output_mode = "rst"; 403 @highlights = @highlights_rst; 404 $blankline = $blankline_rst; |
404 } elsif ($cmd eq "-none") { | 405 } elsif ($cmd eq "none") { |
405 $output_mode = "none"; | 406 $output_mode = "none"; |
406 } elsif ($cmd eq "-module") { # not needed for XML, inherits from calling document | 407 } elsif ($cmd eq "module") { # not needed for XML, inherits from calling document |
407 $modulename = shift @ARGV; | 408 $modulename = shift @ARGV; |
408 } elsif ($cmd eq "-function") { # to only output specific functions | 409 } elsif ($cmd eq "function") { # to only output specific functions |
409 $output_selection = OUTPUT_INCLUDE; 410 $function = shift @ARGV; 411 $function_table{$function} = 1; | 410 $output_selection = OUTPUT_INCLUDE; 411 $function = shift @ARGV; 412 $function_table{$function} = 1; |
412 } elsif ($cmd eq "-nofunction") { # output all except specific functions | 413 } elsif ($cmd eq "nofunction") { # output all except specific functions |
413 $output_selection = OUTPUT_EXCLUDE; 414 $function = shift @ARGV; 415 $function_table{$function} = 1; | 414 $output_selection = OUTPUT_EXCLUDE; 415 $function = shift @ARGV; 416 $function_table{$function} = 1; |
416 } elsif ($cmd eq "-export") { # only exported symbols | 417 } elsif ($cmd eq "export") { # only exported symbols |
417 $output_selection = OUTPUT_EXPORTED; 418 %function_table = (); | 418 $output_selection = OUTPUT_EXPORTED; 419 %function_table = (); |
419 } elsif ($cmd eq "-internal") { # only non-exported symbols | 420 } elsif ($cmd eq "internal") { # only non-exported symbols |
420 $output_selection = OUTPUT_INTERNAL; 421 %function_table = (); | 421 $output_selection = OUTPUT_INTERNAL; 422 %function_table = (); |
422 } elsif ($cmd eq "-export-file") { | 423 } elsif ($cmd eq "export-file") { |
423 my $file = shift @ARGV; 424 push(@export_file_list, $file); | 424 my $file = shift @ARGV; 425 push(@export_file_list, $file); |
425 } elsif ($cmd eq "-v") { | 426 } elsif ($cmd eq "v") { |
426 $verbose = 1; | 427 $verbose = 1; |
427 } elsif (($cmd eq "-h") || ($cmd eq "--help")) { | 428 } elsif (($cmd eq "h") || ($cmd eq "help")) { |
428 usage(); | 429 usage(); |
429 } elsif ($cmd eq '-no-doc-sections') { | 430 } elsif ($cmd eq 'no-doc-sections') { |
430 $no_doc_sections = 1; | 431 $no_doc_sections = 1; |
431 } elsif ($cmd eq '-enable-lineno') { | 432 } elsif ($cmd eq 'enable-lineno') { |
432 $enable_lineno = 1; | 433 $enable_lineno = 1; |
433 } elsif ($cmd eq '-show-not-found') { | 434 } elsif ($cmd eq 'show-not-found') { |
434 $show_not_found = 1; | 435 $show_not_found = 1; |
436 } else { 437 # Unknown argument 438 usage(); |
|
435 } 436} 437 438# continue execution near EOF; 439 440# get kernel version from env 441sub get_kernel_version() { 442 my $version = 'unknown kernel version'; --- 1638 unchanged lines hidden --- | 439 } 440} 441 442# continue execution near EOF; 443 444# get kernel version from env 445sub get_kernel_version() { 446 my $version = 'unknown kernel version'; --- 1638 unchanged lines hidden --- |