I thought this would be of general interest.
>Date: Sun, 27 Sep 1998 10:32:57 +0100
>From: "Andrew M. Bishop" <[EMAIL PROTECTED]>
>Subject: Re: htdig: Htdig and wwwoffle
>To: [EMAIL PROTECTED]
>
>Hi,
>
>Another patch, this time for htsearch so that you can specify a config
>file on the command line.
>
>-------------------- htsearch patch --------------------
>*** htdig-3.0.8b2.orig/htsearch/htsearch.cc Fri Aug 15 06:59:46 1997
>--- htdig-3.0.8b2/htsearch/htsearch.cc Sun Sep 27 10:30:19 1998
>***************
>*** 63,68 ****
>--- 63,71 ----
> int
> main(int ac, char **av)
> {
>+ int c;
>+ extern char *optarg;
>+ int override_config=0;
> List searchWords;
> String configFile = DEFAULT_CONFIG_FILE;
> int pageNumber = 1;
>***************
>*** 73,80 ****
> StringMatch searchWordsPattern;
> StringList requiredWords;
>
>! if (ac > 1 && strcmp(av[1], "-d") == 0)
>! debug = 1;
>
> //
> // The total search can NEVER take more than 5 minutes.
>--- 76,100 ----
> StringMatch searchWordsPattern;
> StringList requiredWords;
>
>! //
>! // Parse command line arguments
>! //
>! while ((c = getopt(ac, av, "c:dv")) != -1)
>! {
>! switch (c)
>! {
>! case 'c':
>! configFile = optarg;
>! override_config=1;
>! break;
>! case 'v':
>! debug++;
>! break;
>! case 'd':
>! debug++;
>! break;
>! }
>! }
>
> //
> // The total search can NEVER take more than 5 minutes.
>***************
>*** 105,111 ****
> // got from the HTML form.
> //
> config.Defaults(&defaults[0]);
>! if (input.exists("config") && !strchr(input["config"], '.'))
> {
> char *configDir = getenv("CONFIG_DIR");
> if (configDir)
>--- 125,131 ----
> // got from the HTML form.
> //
> config.Defaults(&defaults[0]);
>! if (!override_config && input.exists("config") &&
>!strchr(input["config"], '.'))
> {
> char *configDir = getenv("CONFIG_DIR");
> if (configDir)
>-------------------- htsearch patch --------------------
>
>--
>Andrew.
>----------------------------------------------------------------------
>Andrew M. Bishop [EMAIL PROTECTED]
> http://www.gedanken.demon.co.uk/
>
-Geoff Hutchison
Williams Students Online
http://wso.williams.edu/
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the body of the message.