6 my %torrcSampleOptions = ();
7 my %manPageOptions = ();
9 # Load the canonical list as actually accepted by Tor.
10 open(F
, "./src/or/tor --list-torrc-options |") or die;
12 next if m!\[notice\] Tor v0\.!;
13 if (m!^([A-Za-z0-9_]+)!) {
16 print "Unrecognized output> ";
22 # Load the contents of torrc.sample
24 my ($fname, $options) = @_;
26 open(F
, "$fname") or die;
29 if (m!#([A-Za-z0-9_]+)!) {
37 loadTorrc
("./src/config/torrc.sample.in", \
%torrcSampleOptions);
39 # Try to figure out what's in the man page.
41 my $considerNextLine = 0;
42 open(F
, "./doc/tor.1.txt") or die;
44 if (m!^\*\*([A-Za-z0-9_]+)\*\*!) {
45 $manPageOptions{$1} = 1;
50 # Now, display differences:
55 for my $k (keys %$a) {
56 push @lst, $k unless (exists $b->{$k});
58 print "$s: ", join(' ', sort @lst), "\n\n";
62 # subtractHashes("No online docs", \%options, \%descOptions);
63 # subtractHashes("Orphaned online docs", \%descOptions, \%options);
65 subtractHashes
("Orphaned in torrc.sample.in", \
%torrcSampleOptions, \
%options);
67 subtractHashes
("Not in man page", \
%options, \
%manPageOptions);
68 subtractHashes
("Orphaned in man page", \
%manPageOptions, \
%options);