+# If this is set, it's a helper program to use for pasting images together:
+# this is a lot faster and more efficient than using PPM pipelines, which is
+# what we do if this program doesn't exist. (We check for "webcollage-helper"
+# on $PATH at startup, and set this variable appropriately.)
+#
+my $webcollage_helper = undef;
+
+
+# If we have the webcollage-helper program, then it will paste the images
+# together with transparency! 0.0 is invisible, 1.0 is totally opaque.
+#
+my $opacity = 0.85;
+
+
+# Some sites have managed to poison the search engines. These are they.
+# (We auto-detect sites that have poisoned the search engines via excessive
+# keywords or dictionary words, but these are ones that slip through
+# anyway.)
+#
+# This can contain full host names, or 2 or 3 component domains.
+#
+my %poisoners = (
+ "die.net" => 1, # 'l33t h4ck3r d00dz.
+ "genforum.genealogy.com" => 1, # Cluttering altavista with human names.
+ "rootsweb.com" => 1, # Cluttering altavista with human names.
+ "akamai.net" => 1, # Lots of sites have their images on Akamai.
+ # But those are pretty much all banners.
+ # Since Akamai is super-expensive, let's
+ # go out on a limb and assume that all of
+ # their customers are rich-and-boring.
+ "bartleby.com" => 1, # Dictionary, cluttering altavista.
+ "encyclopedia.com" => 1, # Dictionary, cluttering altavista.
+ "onlinedictionary.datasegment.com" => 1, # Dictionary, cluttering altavista.
+ "hotlinkpics.com" => 1, # Porn site that has poisoned imagevista
+ # (I don't see how they did it, though!)
+ "alwayshotels.com" => 1, # Poisoned Lycos pretty heavily.
+);
+
+
+# When verbosity is turned on, we warn about sites that we seem to be hitting
+# a lot: usually this means some new poisoner has made it into the search
+# engines. But sometimes, the warning is just because that site has a lot
+# of stuff on it. So these are the sites that are immune to the "frequent
+# site" diagnostic message.
+#
+my %warningless_sites = (
+ "home.earthlink.net" => 1, # Lots of home pages here.
+ "www.geocities.com" => 1,
+ "www.angelfire.com" => 1,
+ "members.aol.com" => 1,
+
+ "yimg.com" => 1, # This is where dailynews.yahoo.com stores
+ "eimg.com" => 1, # its images, so pick_from_yahoo_news_text()
+ # hits this every time.
+);
+
+
+##############################################################################
+#
+# Various global flags set by command line parameters, or computed
+#
+##############################################################################
+
+
+my $current_state = "???"; # for diagnostics
+my $load_method;
+my $last_search;
+my $image_succeeded = -1;
+my $suppress_audit = 0;
+
+my $verbose_imgmap = 0; # print out rectangles and URLs only (stdout)
+my $verbose_warnings = 0; # print out warnings when things go wrong
+my $verbose_load = 0; # diagnostics about loading of URLs
+my $verbose_filter = 0; # diagnostics about page selection/rejection
+my $verbose_net = 0; # diagnostics about network I/O
+my $verbose_pbm = 0; # diagnostics about PBM pipelines
+my $verbose_http = 0; # diagnostics about all HTTP activity
+my $verbose_exec = 0; # diagnostics about executing programs
+
+my $report_performance_interval = 60 * 15; # print some stats every 15 minutes
+
+my $http_proxy = undef;
+my $http_timeout = 30;
+my $cvt_timeout = 10;
+