Attached is a small, very simple patch to search.c that allows you to specify which
search template to use at run time by passing in "tmplt=/path/to/template" as a form
variable.
This might make search.cgi a bit more flexible and easier to use, as you wouldn't have
to export an environment variable, or rename your binary to use this.
The patch was made against current CVS sources. Perhaps this could find its way into
the main code? Alex?
-- Dan
========================================================================
Daniel Hanks - Systems/Database Administrator
About Inc., Web Services Division
1253 N. Research Way, Suite Q-2500. Orem, UT 84097
ph: 801-437-6023 fax: 801-437-6020 email: [EMAIL PROTECTED]
========================================================================
Index: search.c
===================================================================
RCS file: /usr/src/CVS/mnogosearch/src/search.c,v
retrieving revision 1.20
diff -u -u -r1.20 search.c
--- search.c 2001/03/14 14:56:41 1.20
+++ search.c 2001/03/23 18:10:07
@@ -1375,6 +1375,10 @@
query_url_escaped=strdup(UdmEscapeURL(str,query_words));
query_form_escaped=UdmHtmlSpecialChars(query_words);
}else
+ if(!UDM_STRNCMP(token,"tmplt=")){
+ char str[UDMSTRSIZ]="";
+ strcpy(template,token+6);
+ }else
if(!UDM_STRNCMP(token,"np=")){
Indexer->page_number=atoi(token+3);
}else