The R Project SVN R

Rev

Rev 2195 | Rev 3076 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2195 Rev 2281
Line 43... Line 43...
43
GetOptions (@knownoptions) || usage();
43
GetOptions (@knownoptions) || usage();
44
 
44
 
45
usage() if $opt_help;
45
usage() if $opt_help;
46
print stderr "RHOME: '$RHOME';  cwd='$cwd'\n" if $opt_debug;
46
print stderr "RHOME: '$RHOME';  cwd='$cwd'\n" if $opt_debug;
47
 
47
 
48
 
-
 
-
 
48
##-- In the future, we want allow  SEVERAL types simultaneously ... :
49
if($opt_type =~ /html/i){
49
if($opt_type =~ /html/i){
50
    open(htmlout, "| cat");
-
 
51
    Rdconv($ARGV[0],$opt_type,$opt_debug);
50
    Rdconv($ARGV[0],$opt_type,$opt_debug, 0);# filename 0 : STDOUT
52
    close(htmlout)
-
 
53
}
51
}
54
elsif($opt_type =~ /nroff/i){
52
elsif($opt_type =~ /nroff/i){
55
    open(nroffout, "| cat");
-
 
56
    Rdconv($ARGV[0],$opt_type,$opt_debug);
53
    Rdconv($ARGV[0],$opt_type,$opt_debug, 0);
57
    close(nroffout)
-
 
58
}
54
}
59
elsif($opt_type =~ /Sd/i){
55
elsif($opt_type =~ /Sd/i){
60
    open(Sdout, "| cat");
-
 
61
    Rdconv($ARGV[0],$opt_type,$opt_debug);
56
    Rdconv($ARGV[0],$opt_type,$opt_debug, 0);
62
    close(Sdout)
-
 
63
}
57
}
64
elsif($opt_type =~ /latex/i){
58
elsif($opt_type =~ /latex/i){
65
    open(latexout, "| cat");
-
 
66
    Rdconv($ARGV[0],$opt_type,$opt_debug);
59
    Rdconv($ARGV[0],$opt_type,$opt_debug, 0);
67
    close(latexout)
-
 
68
}
60
}
69
else {
61
else {
70
    Rdconv($ARGV[0],$opt_type,$opt_debug);
62
    Rdconv($ARGV[0],$opt_type,$opt_debug, 0, -1);
71
}    
63
}
72
 
64
 
73
 
65
 
74
 
66
 
75
sub usage {
67
sub usage {
76
 
68