6 my %torrcSampleOptions = ();
7 my %torrcCompleteOptions = ();
8 my %manPageOptions = ();
10 # Load the canonical list as actually accepted by Tor.
12 open(F
, "./src/or/tor --list-torrc-options |") or die;
14 next if m!\[notice\] Tor v0\.!;
15 if (m!^([A-Za-z0-9_]+)!) {
16 $mostRecentOption = lc $1;
17 $options{$mostRecentOption} = 1;
19 print "Unrecognized output> ";
25 # Load the contents of torrc.sample and torrc.complete
27 my ($fname, $options) = @_;
29 open(F
, "$fname") or die;
32 if (m!#([A-Za-z0-9_]+)!) {
33 $options->{lc $1} = 1;
40 loadTorrc
("./src/config/torrc.sample.in", \
%torrcSampleOptions);
41 loadTorrc
("./src/config/torrc.complete.in", \
%torrcCompleteOptions);
43 # Try to figure out what's in the man page.
45 my $considerNextLine = 0;
46 open(F
, "./doc/tor.1.txt") or die;
48 if (m!^\*\*([A-Za-z0-9_]+)\*\*!) {
49 $manPageOptions{lc $1} = 1;
54 # Now, display differences:
59 for my $k (keys %$a) {
60 push @lst, $k unless (exists $b->{$k});
62 print "$s: ", join(' ', sort @lst), "\n\n";
66 # subtractHashes("No online docs", \%options, \%descOptions);
67 # subtractHashes("Orphaned online docs", \%descOptions, \%options);
69 subtractHashes
("Not in torrc.complete.in", \
%options, \
%torrcCompleteOptions);
70 subtractHashes
("Orphaned in torrc.complete.in", \
%torrcCompleteOptions, \
%options);
71 subtractHashes
("Orphaned in torrc.sample.in", \
%torrcSampleOptions, \
%options);
73 subtractHashes
("Not in man page", \
%options, \
%manPageOptions);
74 subtractHashes
("Orphaned in man page", \
%manPageOptions, \
%options);