6 my %torrcSampleOptions = ();
7 my %manPageOptions = ();
9 # Load the canonical list as actually accepted by Tor.
10 open(F
, "@abs_top_builddir@/src/app/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
("@abs_top_srcdir@/src/config/torrc.sample.in", \
%torrcSampleOptions);
39 # Try to figure out what's in the man page.
41 my $considerNextLine = 0;
42 open(F
, "@abs_top_srcdir@/doc/man/tor.1.txt") or die;
44 if (m!^(?:\[\[([A-za-z0-9_]+)\]\] *)?\*\*([A-Za-z0-9_]+)\*\*! && $considerNextLine) {
45 $manPageOptions{$2} = 1;
46 print "Missing an anchor: $2\n" unless (defined $1 or $2 eq 'tor');
47 $considerNextLine = 1;
51 $considerNextLine = 1;
53 $considerNextLine = 0;
58 # Now, display differences:
63 for my $k (keys %$a) {
64 push @lst, $k unless (exists $b->{$k});
66 print "$s: ", join(' ', sort @lst), "\n\n";
70 # subtractHashes("No online docs", \%options, \%descOptions);
71 # subtractHashes("Orphaned online docs", \%descOptions, \%options);
73 subtractHashes
("Orphaned in torrc.sample.in", \
%torrcSampleOptions, \
%options);
75 subtractHashes
("Not in man page", \
%options, \
%manPageOptions);
76 subtractHashes
("Orphaned in man page", \
%manPageOptions, \
%options);