Greetings Neil,

I'm baffled...  Could you please apply the attached patch and post the 
(stderr) output?

Thanks,
Lachlan

On Wed, 25 Jun 2003 01:08, Neil Kohl wrote:

> It's possible to duplicate this running htsearch from the command
> line; entering a query and a result format produces the same output
> as in the test file: the output stops at '<form action="'. There's
> no core dump, nonzero exit or other indication that anything
> failed. The output just stops.

-- 
[EMAIL PROTECTED]
ht://Dig developer DownUnder  (http://www.htdig.org)
*** htsearch/Display.cc.orig	Sun Jun 29 20:49:17 2003
--- htsearch/Display.cc	Sun Jun 29 20:57:00 2003
***************
*** 1068,1073 ****
--- 1068,1075 ----
  void
  Display::expandVariables(const String& str_arg)
  {
+     cerr << "Expanding variables ";
+     cerr << "in " << str_arg << endl;
      const char* str = str_arg;
      enum
      {
***************
*** 1088,1097 ****
--- 1090,1101 ----
  		    cout << *str;
  		break;
  	    case StLiteral:
+ 		cerr << "L";
  		cout << *str;
  		state = StStart;
  		break;
  	    case StVarStart:
+ 		cerr << "S";
  		if (*str == '%' || *str == '=')
  		    var << *str;	// code for URL-encoded/decoded variable
  		else if (*str == '&')
***************
*** 1111,1116 ****
--- 1115,1121 ----
  		    state = StStart;
  		break;
  	    case StVarClose:
+ 		cerr << "C";
  		if (*str == ')' || *str == '}')
  		    state = StGotVar;
  		else if (isalnum(*str) || *str == '_' || *str == '-')
***************
*** 1119,1124 ****
--- 1124,1130 ----
  		    state = StStart;
  		break;
  	    case StVarPlain:
+ 		cerr << "P";
  		if (isalnum(*str) || *str == '_' || *str == '-')
  		    var << *str;
  		else
***************
*** 1128,1138 ****
--- 1134,1146 ----
  		}
  		break;
  	    case StGotVar:
+ 		cerr << "G";
  		//
  		// We have a complete variable in var. Look it up and
  		// see if we can find a good replacement for it.
  		//
  		outputVariable(var);
+ 		cerr << "\ndone\n";
  		var = "";
  		state = StStart;
  		continue;
***************
*** 1154,1159 ****
--- 1162,1169 ----
  void
  Display::outputVariable(const String& var)
  {
+     cerr << "\nOutputting variable ";
+     cerr << var << endl;
      String	*temp;
      String	value = "";
      const char	*ev, *name;
***************
*** 1164,1180 ****
--- 1174,1195 ----
      name = var;
      while (*name == '&' || *name == '%' || *name == '=')
  	name++;
+     cerr << "Name " << name << endl;
      temp = (String *) vars[name];
      if (temp)
  	value = *temp;
      else
      {
+ 	cerr << "Getting env\n";
  	ev = getenv(name);
  	if (ev)
  	    value = ev;
+ 	cerr << "Got env\n";
      }
      while (--name >= var.get() && value.length())
      {
+ 	cerr << "Decoding ";
+ 	cerr << value << endl;
  	if (*name == '%')
  	    encodeURL(value);
  	else if(*name == '&')

Reply via email to