*** Original/src/c/search_cmds	Wed Nov 28 22:38:23 2001
--- RISCOS/c/search_cmds	Thu Nov 29 23:28:01 2001
***************
*** 45,55 ****
--- 45,64 ----
  xslDbgShellSearch(xsltTransformContextPtr styleCtxt, xsltStylesheetPtr style,
  		  xmlChar * arg)
  {
+ #if 0
+     /* JRF: This is wrong; updateSearchData is a void function */
      int result = updateSearchData(styleCtxt, style, NULL, DEBUG_ANY_VAR);
+ #else
+     int result = 0;
+ #endif
      xmlChar buff[DEBUG_BUFFER_SIZE];
      const xmlChar * sortOption = (xmlChar*)"-sort ";
      int sortOptionLen = xmlStrLen(sortOption);
  
+     /* JRF: Routine has been moved down here, 'cos it's void and therefore
+             has no result */
+     updateSearchData(styleCtxt, style, NULL, DEBUG_ANY_VAR);
+ 
      trimString(arg);
      if (xmlStrLen(arg) == 0){
        arg = (xmlChar*)"//search/*";
***************
*** 59,70 ****
        /* yep do sorting as well*/
        if (snprintf(buff, DEBUG_BUFFER_SIZE, "--param dosort 1 --param query \"%s\"", 
  		   &arg[sortOptionLen])){
! 	result = result && xslSearchQuery(NULL, buff);
        }
      }else{
        if (snprintf(buff, DEBUG_BUFFER_SIZE, "--param dosort 0 --param query \"%s\"", 
  		   arg)){
! 	result = result && xslSearchQuery(NULL, buff);
        }
      }
      return result;
--- 68,79 ----
        /* yep do sorting as well*/
        if (snprintf(buff, DEBUG_BUFFER_SIZE, "--param dosort 1 --param query \"%s\"",
  		   &arg[sortOptionLen])){
! 	result = xslSearchQuery(NULL, buff);
        }
      }else{
        if (snprintf(buff, DEBUG_BUFFER_SIZE, "--param dosort 0 --param query \"%s\"",
  		   arg)){
! 	result = xslSearchQuery(NULL, buff);
        }
      }
      return result;
