The R Project SVN R

Rev

Rev 46994 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 46994 Rev 47442
Line 18... Line 18...
18
# http://www.r-project.org/Licenses/
18
# http://www.r-project.org/Licenses/
19
 
19
 
20
use Getopt::Long;
20
use Getopt::Long;
21
use R::Utils;
21
use R::Utils;
22
 
22
 
23
my $revision = ' $Rev: 46994 $ ';
23
my $revision = ' $Rev: 47442 $ ';
24
my $version;
24
my $version;
25
my $name;
25
my $name;
26
 
26
 
27
$revision =~ / ([\d\.]*) /;
27
$revision =~ / ([\d\.]*) /;
28
$version = $1;
28
$version = $1;
29
($name = $0) =~ s|.*/||;
29
($name = $0) =~ s|.*/||;
30
 
30
 
31
sub usage {
31
sub usage {
32
  print STDERR <<END;
32
  print <<END;
33
Usage: R CMD Sd2Rd [options] FILE
33
Usage: R CMD Sd2Rd [options] FILE
34
 
34
 
35
Convert S documentation in FILE to R documentation format.
35
Convert S documentation in FILE to R documentation format.
36
 
36
 
37
Options:
37
Options:
38
  -h, --help		print short help message and exit
38
  -h, --help		print short help message and exit
39
  -v, --version		print Sd2Rd version info and exit
39
  -v, --version		print version info and exit
40
  -n			render examples non-executable by wrapping them
40
  -n			render examples non-executable by wrapping them
41
			into a \\dontrun{} environment
41
			into a \\dontrun{} environment
42
  -x			(S3 docs) interpret all single-quoted names
42
  -x			(S3 docs) interpret all single-quoted names
43
			as code names
43
			as code names
44
 
44
 
45
Email bug reports to <r-bugs\@r-project.org>.
45
Report bugs to <r-bugs\@r-project.org>.
46
END
46
END
47
  exit 0;
47
  exit 0;
48
}
48
}
49
 
49
 
50
@knownoptions = ("v|version", "h|help", "n", "x");
50
@knownoptions = ("v|version", "h|help", "n", "x");