According to David Graff: > Sorry I've been occupied with other projects at work recently. If you want > I can try and take a look at this on thursday while I've got some time. > > Since I opened this can of worms maybe I can help sort it out. > > ----- Original Message ----- > From: "Geoff Hutchison" <[EMAIL PROTECTED]> > To: "J. op den Brouw" <[EMAIL PROTECTED]> > Cc: "Htdig Dev" <[EMAIL PROTECTED]> > Sent: Tuesday, July 03, 2001 13:02 > Subject: Re: [htdig-dev] Compile error when 'make check' > > > > On Mon, 2 Jul 2001, J. op den Brouw wrote: > > > > > document.cc: In function `void dodoc(struct params_t *)': > > > document.cc:88: `config' undeclared (first use this function) > > > > I'm pretty sure this is from the changes to a static > > HtConfiguration::config variable (from the extern declarations used > > before). > > > > Since I'm still sorting through some strangeness with the new method, I > > haven't bothered to run a "make check." OK. Below is a patch for the latest 3.2 snapshot, which fixes this problem, as well as some problems in testnet.cc brought on by the new HtHTTPBasic class and cookies support. I've committed all this to CVS, so it'll be in next Sunday's snapshot. By the way, there's still something very wrong with the cookies support. The HtHTTP class turns on cookie support by default, even though the _cookie_jar field is unallocated and null by default (which caused testnet.cc to crash). That's just bad planning, but not insurmountable. However, I can't find any code in the current source that does a SetCookieJar() call. I found out that when you set disable_cookies to false, htdig crashes the same way testnet did. Has this stuff ever worked? Is anyone planning to fix this any time soon? I don't understand this new code enough to fix it, and I've wasted far too much time trying to debug it already. I don't use cookies and I have no interest in this code. If someone doesn't fix it soon, I vote we punt it. For the time being, though, the patch below seems to get the tests working again. Apply this patch in the main htdig-3.2.0b4-070101 source directory using "patch -p0 < this-message". --- test/document.cc.orig Thu Oct 19 22:40:59 2000 +++ test/document.cc Wed Jul 4 11:59:46 2001 @@ -85,11 +85,12 @@ int main(int ac, char **av) static void dodoc(params_t* params) { - config.Defaults(&defaults[0]); - config.Read(params->config); + HtConfiguration* const config= HtConfiguration::config(); + config->Defaults(&defaults[0]); + config->Read(params->config); DocumentDB docs; - if(docs.Read(config["doc_db"], config["doc_index"], config["doc_excerpt"]) < 0) { + if(docs.Read(config->Find("doc_db"), config->Find("doc_index"), +config->Find("doc_excerpt")) < 0) { cerr << "dodoc: cannot open\n"; exit(1); } --- test/url.cc.orig Thu Oct 19 22:41:00 2000 +++ test/url.cc Wed Jul 4 12:01:54 2001 @@ -48,7 +48,6 @@ typedef struct { int test_children; } params_t; -static HtConfiguration config; static void usage(); static void dourl(params_t* params); @@ -105,7 +104,8 @@ static void dourl(params_t* params) { if(verbose) cerr << "Test WordKey class with " << params->url_parents << " and " << params->url_children << "\n"; - config.Defaults(defaults); + HtConfiguration* const config= HtConfiguration::config(); + config->Defaults(defaults); dolist(params); } --- test/testnet.cc.orig Fri Mar 3 04:34:32 2000 +++ test/testnet.cc Wed Jul 4 13:43:54 2001 @@ -5,6 +5,7 @@ #include "Transport.h" #include "HtHTTP.h" +#include "HtHTTPBasic.h" #include "HtDateTime.h" #include <URL.h> #include <iostream.h> @@ -334,7 +335,7 @@ Transport::DocStatus Retrieve() if (debug>1) cout << "Creating an HtHTTP object" << endl; - HTTPConnect = new HtHTTP(); + HTTPConnect = new HtHTTPBasic(); if (!HTTPConnect) reportError(strerror(errno)); @@ -346,7 +347,8 @@ Transport::DocStatus Retrieve() HTTPConnect->SetRequestURL(*url); - // Set the referer + // Let's disable the cookies for this test + HTTPConnect->DisableCookies(); // We may issue a config paramater to enable/disable them if (!persistent) HTTPConnect->DisablePersistentConnection(); -- Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil Dept. Physiology, U. of Manitoba Phone: (204)789-3766 Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930 _______________________________________________ htdig-dev mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/htdig-dev