The R Project SVN R

Rev

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

Rev 7366 Rev 7380
Line 21... Line 21...
21
 
21
 
22
# Send any bug reports to Friedrich.Leisch@ci.tuwien.ac.at
22
# Send any bug reports to Friedrich.Leisch@ci.tuwien.ac.at
23
 
23
 
24
use Getopt::Long;
24
use Getopt::Long;
25
 
25
 
26
$revision = ' $Revision: 1.4 $ ';
26
$revision = ' $Revision: 1.5 $ ';
27
$revision =~ / ([\d\.]*) /;
27
$revision =~ / ([\d\.]*) /;
28
$version = $1;
28
$version = $1;
29
 
29
 
-
 
30
$revision =~ / ([\d\.]*) /;
-
 
31
$version = $1;
-
 
32
($name = $0) =~ s|.*/||;
-
 
33
 
-
 
34
sub version {
-
 
35
  print STDERR <<END;
-
 
36
Rman2Rd $version
30
@knownoptions = ("debug|d", "help|h");
37
Copyright (C) 1997 Fritz Leisch.
-
 
38
This is free software; see the GNU General Public Licence version 2
-
 
39
or later for copying conditions.  There is NO warranty.    
-
 
40
END
-
 
41
  exit 0;
-
 
42
}
-
 
43
 
-
 
44
sub usage {
-
 
45
  print STDERR <<END;
31
GetOptions (@knownoptions) || usage();
46
Usage: $name [options] FILE
-
 
47
 
-
 
48
Convert old-style Rman documentation FILE to R documentation format.
-
 
49
 
-
 
50
Options:
-
 
51
  -h, --help            print short help message and exit
-
 
52
  -v, --version         print version info and exit
-
 
53
  -d, --debug		turn on debugging (increase verbosity)
32
 
54
 
-
 
55
Email bug reports to <r-bugs\@lists.r-project.org>.
-
 
56
END
-
 
57
  exit 0; 
-
 
58
}
-
 
59
 
-
 
60
@knownoptions = ("d|debug", "h|help", "v|version");
-
 
61
GetOptions (@knownoptions) || usage();
-
 
62
&version() if $opt_v;
33
usage() if $opt_help;
63
&usage() if $opt_h;
34
 
64
 
35
$max_parent = 0;
65
$max_parent = 0;
36
$NP = "normal_parent";
66
$NP = "normal_parent";
37
$PN = "parent_normal";
67
$PN = "parent_normal";
38
$EOP = "escaped_opening_parent";
68
$EOP = "escaped_opening_parent";
Line 295... Line 325...
295
	replace_command($cmd, $newcmd);
325
	replace_command($cmd, $newcmd);
296
    }
326
    }
297
	
327
	
298
}
328
}
299
 
329
 
300
 
-
 
301
sub usage {
-
 
302
 
-
 
303
    print "Rman2Rd version $version\n";
-
 
304
    print "Usage: Rman2Rd [--debug/-d] [--help/-h] file\n\n";
-
 
305
 
-
 
306
    exit 0;
-
 
307
}
-
 
308
 
-
 
309
### Local Variables: ***
330
### Local Variables: ***
310
### mode: perl ***
331
### mode: perl ***
311
### End: ***
332
### End: ***