summaryrefslogtreecommitdiffstats
path: root/redhat/extras/htdig/patches/htdig_3.2.0b6-13.diff
blob: 4562e03fe9683760dec14e3349e94efb29a05b0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
Description: complete diff against upstream of version 3.2.0b6

--- htdig-3.2.0b6.orig/db/os_rw.c
+++ htdig-3.2.0b6/db/os_rw.c
@@ -5,6 +5,13 @@
  *	Sleepycat Software.  All rights reserved.
  */
 
+#define _XOPEN_SOURCE 500
+#include <sys/types.h>
+#include <unistd.h>
+#ifndef u_long
+typedef __u_long u_long;
+#endif
+
 #include "db_config.h"
 
 #ifndef lint
--- htdig-3.2.0b6.orig/htcommon/defaults.cc
+++ htdig-3.2.0b6/htcommon/defaults.cc
@@ -596,7 +596,7 @@
 	<a href=\"htfuzzy.html\">htfuzzy</a> for more information on the \
 	format of this file. \
 " }, \
-{ "endings_root2word_db", "${common_dir}/root2word.db",  \
+{ "endings_root2word_db", "${database_dir}/root2word.db",  \
 	"string", "htfuzzy htsearch", "", "all", "File Layout", "endings_root2word_db: /var/htdig/r2w.db", " \
 	This attributes specifies the database filename to be \
 	used in the 'endings' fuzzy search algorithm. The \
@@ -610,7 +610,7 @@
 	This is because this database can be shared with \
 	different search databases. \
 " }, \
-{ "endings_word2root_db", "${common_dir}/word2root.db",  \
+{ "endings_word2root_db", "${database_dir}/word2root.db",  \
 	"string", "htfuzzy htsearch", "", "all", "File Layout", "endings_word2root_db: /var/htdig/w2r.bm", " \
 	This attributes specifies the database filename to be \
 	used in the 'endings' fuzzy search algorithm. The \
@@ -2426,7 +2426,7 @@
 	that this does not limit the number of documents that \
 	are matched in any way. \
 " }, \
-{ "synonym_db", "${common_dir}/synonyms.db",  \
+{ "synonym_db", "${database_dir}/synonyms.db",  \
 	"string", "htsearch htfuzzy", "", "3.0", "File Layout", "synonym_db: ${database_base}.syn.db", " \
 	Points to the database that <a href=\"htfuzzy.html\"> \
 	htfuzzy</a> creates when the <strong>synonyms</strong> \
--- htdig-3.2.0b6.orig/htdig/Server.cc
+++ htdig-3.2.0b6/htdig/Server.cc
@@ -341,6 +341,8 @@
     {
 	String	fullpatt = "^[^:]*://[^/]*(";
 	fullpatt << pattern << ')';
+	if (pattern.length() == 0)
+		fullpatt = "";
 	_disallow.set(fullpatt, config->Boolean("case_sensitive"));
     }
 }
--- htdig-3.2.0b6.orig/htsearch/Collection.h
+++ htdig-3.2.0b6/htsearch/Collection.h
@@ -36,9 +36,9 @@
                const char *docExcerpt);
     ~Collection();
 
-    void Collection::Open();
+    void Open();
 
-    void Collection::Close(); 
+    void Close(); 
 
     char *getWordFile() { return wordFile.get(); }
     DocumentRef         *getDocumentRef(int id);
--- htdig-3.2.0b6.orig/htsearch/Display.cc
+++ htdig-3.2.0b6/htsearch/Display.cc
@@ -54,6 +54,7 @@
 
 #include <math.h>
 #include <float.h>
+#include <values.h>
 
 #if !defined(DBL_MAX)
 # if defined (MAXDOUBLE)
@@ -137,7 +138,7 @@
       // Must temporarily stash the message in a String, since
       // displaySyntaxError will overwrite the static temp used in form.
 
-      String s(form("No such sort method: `%s'", (const char*)config->Find("sort")));
+      String s("Invalid sort method.");
 
       displaySyntaxError(s);
       return;
--- htdig-3.2.0b6.orig/htsearch/htsearch.cc
+++ htdig-3.2.0b6/htsearch/htsearch.cc
@@ -211,8 +211,7 @@
 	}
 	if (access((char*)configFile, R_OK) < 0)
 	{
-	    reportError(form("Unable to read configuration file '%s'",
-			     configFile.get()));
+		reportError("Unable to read configuration file");
 	}
 	config->Read(configFile);
 
--- htdig-3.2.0b6.orig/htsearch/qtest.cc
+++ htdig-3.2.0b6/htsearch/qtest.cc
@@ -132,8 +132,7 @@
 
     if (access((char*)configFile, R_OK) < 0)
     {
-	reportError(form("Unable to find configuration file '%s'",
-			 configFile.get()));
+    	reportError("Unable to find configuration file");
     }
 	
     config->Read(configFile);
--- htdig-3.2.0b6.orig/htword/WordDBPage.cc
+++ htdig-3.2.0b6/htword/WordDBPage.cc
@@ -82,7 +82,7 @@
   	if(debuglevel>2)printf("TOTAL SIZE: %6d %8f\n",size,size/8.0);
 	// argh! compare failed somthing went wrong
 	// display the compress/decompress sequence and fail
-	if(cmp || size>8*1024*1000000000)
+	if(cmp || size>8*1024)
 	{
 	    if(size>8*1024)
 	    {
--- htdig-3.2.0b6.orig/installdir/rundig
+++ htdig-3.2.0b6/installdir/rundig
@@ -7,17 +7,18 @@
 #
 # This is a sample script to create a search database for ht://Dig.
 #
-DBDIR=@DATABASE_DIR@
-COMMONDIR=@COMMON_DIR@
-BINDIR=@BIN_DIR@
-conffile=@DEFAULT_CONFIG_FILE@
+DBDIR=/var/lib/htdig
+COMMONDIR=/etc/htdig
+BINDIR=/usr/bin
+conffile=/etc/htdig/htdig.conf
 
 # To help debug problems, try running rundig -vvv
 # This will add lots of debugging output to all of the programs
-stats= opts= alt=
+stats= opts= alt= nohtnotify=
 while [ "$#" -gt 0 ]
 do
     case "$1" in
+    --no-htnotify) nohtnotify="true" ;;
     -a)  alt="$1" ;;
     -s)  stats="$1" ;;
     -c)  shift
@@ -65,7 +66,11 @@
     test -f db.words.db.work_weakcmpr &&
 	mv -f db.words.db.work_weakcmpr db.words.db_weakcmpr) ;;
 esac
-$BINDIR/htnotify $opts
+if [ "$nohtnotify" = "true" ]; then
+	echo "Skipping htnotify."
+else
+	$BINDIR/htnotify $opts
+fi
 # If you want to use the soundex and (or) metaphone fuzzy matchings,
 # Uncomment the following line
 # $BINDIR/htfuzzy $opts soundex metaphone
--- htdig-3.2.0b6.orig/libhtdig/ResultFetch.cc
+++ htdig-3.2.0b6/libhtdig/ResultFetch.cc
@@ -142,7 +142,7 @@
         // Must temporarily stash the message in a String, since
         // displaySyntaxError will overwrite the static temp used in form.
 
-        String s(form("No such sort method: `%s'", (const char *) config->Find("sort")));
+        String s("Invalid search method.");
 
         displaySyntaxError(s);
         //return;