6670
|
1 |
--- aspell-0.60.4/modules/speller/default/affix.cpp-orig 2006-01-25 12:48:22.221889000 -0800
|
|
2 |
+++ aspell-0.60.4/modules/speller/default/affix.cpp 2006-01-25 12:48:39.274322000 -0800
|
|
3 |
@@ -172,8 +172,8 @@ struct AffixLess
|
|
4 |
// typedef const char * Value;
|
|
5 |
// typedef const char * Key;
|
|
6 |
// static const bool is_multi = false;
|
|
7 |
-// hash<const char *> hfun;
|
|
8 |
-// size_t hash(const char * s) {return hfun(s);}
|
|
9 |
+// hash<const char *> thehash;
|
|
10 |
+// size_t hash(const char * s) {return thehash(s);}
|
|
11 |
// bool equal(const char * x, const char * y) {return strcmp(x,y) == 0;}
|
|
12 |
// const char * key(const char * c) {return c;}
|
|
13 |
// };
|
|
14 |
@@ -193,8 +193,8 @@ struct CondsLookupParms {
|
|
15 |
typedef const Conds * Value;
|
|
16 |
typedef const char * Key;
|
|
17 |
static const bool is_multi = false;
|
|
18 |
- hash<const char *> hfun;
|
|
19 |
- size_t hash(const char * s) {return hfun(s);}
|
|
20 |
+ hash<const char *> thehash;
|
|
21 |
+ size_t hash(const char * s) {return thehash(s);}
|
|
22 |
bool equal(const char * x, const char * y) {return strcmp(x,y) == 0;}
|
|
23 |
const char * key(const Conds * c) {return c->str;}
|
|
24 |
};
|
|
25 |
--- aspell-0.60.4/modules/speller/default/affix.hpp-orig 2006-01-25 08:56:19.726654000 -0800
|
|
26 |
+++ aspell-0.60.4/modules/speller/default/affix.hpp 2006-01-25 08:56:33.890263000 -0800
|
|
27 |
@@ -107,7 +107,7 @@ namespace aspeller {
|
|
28 |
{
|
|
29 |
return expand(word,aff,buf,0);
|
|
30 |
}
|
|
31 |
- WordAff * expand_suffix(ParmString word, const unsigned char * new_aff,
|
|
32 |
+ WordAff * expand_suffix(ParmString word, const unsigned char * aff,
|
|
33 |
ObjStack &, int limit = INT_MAX,
|
|
34 |
unsigned char * new_aff = 0, WordAff * * * l = 0,
|
|
35 |
ParmString orig_word = 0) const;
|
|
36 |
--- aspell-0.60.4/common/string.hpp-orig 2006-01-25 08:48:03.868105000 -0800
|
|
37 |
+++ aspell-0.60.4/common/string.hpp 2006-01-25 08:48:10.228839000 -0800
|
|
38 |
@@ -492,7 +492,7 @@ namespace acommon {
|
2908
|
39 |
|
6670
|
40 |
namespace std
|
|
41 |
{
|
|
42 |
- template<> static inline void swap(acommon::String & x, acommon::String & y) {return x.swap(y);}
|
|
43 |
+ template<> inline void swap(acommon::String & x, acommon::String & y) {return x.swap(y);}
|
|
44 |
}
|
2908
|
45 |
|
6670
|
46 |
#endif
|
|
47 |
--- aspell-0.60.4/common/convert.cpp-orig 2006-01-25 08:51:18.821841000 -0800
|
|
48 |
+++ aspell-0.60.4/common/convert.cpp 2006-01-25 08:54:00.865108000 -0800
|
|
49 |
@@ -238,7 +238,7 @@ namespace acommon {
|
2908
|
50 |
}
|
|
51 |
|
6670
|
52 |
template <class T>
|
|
53 |
- static void free_norm_table(NormTable<T> * d)
|
|
54 |
+ void free_norm_table(NormTable<T> * d)
|
|
55 |
{
|
|
56 |
for (T * cur = d->data; cur != d->end; ++cur) {
|
|
57 |
if (cur->sub_table)
|
|
58 |
--- aspell-0.60.4/prog/aspell.cpp-orig 2006-01-25 10:47:40.169624000 -0800
|
|
59 |
+++ aspell-0.60.4/prog/aspell.cpp 2006-01-25 10:48:01.320279000 -0800
|
|
60 |
@@ -1880,7 +1880,7 @@ struct SML_Parms {
|
|
61 |
typedef SML_WordEntry Value;
|
|
62 |
typedef const char * Key;
|
|
63 |
static const bool is_multi = false;
|
|
64 |
- hash<const char *> hash;
|
|
65 |
+ hash<const char *> thehash;
|
|
66 |
bool equal(Key x, Key y) {return strcmp(x,y) == 0;}
|
|
67 |
Key key(const Value & v) {return v.word;}
|
|
68 |
};
|
|
69 |
@@ -2031,7 +2031,7 @@ struct CML_Parms {
|
|
70 |
typedef CML_Entry Value;
|
|
71 |
typedef const char * Key;
|
|
72 |
static const bool is_multi = true;
|
|
73 |
- hash<const char *> hash;
|
|
74 |
+ hash<const char *> thehash;
|
|
75 |
bool equal(Key x, Key y) {return strcmp(x,y) == 0;}
|
|
76 |
Key key(const Value & v) {return v.word;}
|
|
77 |
};
|
|
78 |
--- aspell-0.60.4/common/hash-t.hpp-orig 2006-01-25 10:48:42.926184000 -0800
|
|
79 |
+++ aspell-0.60.4/common/hash-t.hpp 2006-01-25 11:21:46.641457000 -0800
|
|
80 |
@@ -136,7 +136,7 @@ namespace acommon {
|
|
81 |
template <class P>
|
|
82 |
typename HashTable<P>::iterator HashTable<P>::find_i(const Key & to_find, bool & have)
|
|
83 |
{
|
|
84 |
- Size pos = parms_.hash(to_find) % table_size_;
|
|
85 |
+ Size pos = parms_.thehash(to_find) % table_size_;
|
|
86 |
Node * * n = table_ + pos;
|
|
87 |
have = false;
|
|
88 |
while (true) {
|
|
89 |
@@ -199,7 +199,7 @@ namespace acommon {
|
|
90 |
for (Node * * i = old_table; i != old_end; ++i) {
|
|
91 |
Node * n = *i;
|
|
92 |
while (n != 0) {
|
|
93 |
- Node * * put_me_here = table_ + (parms_.hash(parms_.key(n->data)) % table_size_);
|
|
94 |
+ Node * * put_me_here = table_ + (parms_.thehash(parms_.key(n->data)) % table_size_);
|
|
95 |
Node * tmp = n;
|
|
96 |
n = n->next;
|
|
97 |
tmp->next = *put_me_here;
|
|
98 |
--- aspell-0.60.4/common/hash.hpp-orig 2006-01-25 11:41:57.215601000 -0800
|
|
99 |
+++ aspell-0.60.4/common/hash.hpp 2006-01-25 11:43:22.913496000 -0800
|
|
100 |
@@ -259,10 +259,10 @@ namespace acommon {
|
|
101 |
typedef K Value;
|
|
102 |
typedef const K Key;
|
|
103 |
static const bool is_multi = m;
|
|
104 |
- HF hash;
|
|
105 |
+ HF thehash;
|
|
106 |
E equal;
|
|
107 |
const K & key(const K & v) {return v;}
|
|
108 |
- HashSetParms(const HF & h = HF(), const E & e = E()) : hash(h), equal(e) {}
|
|
109 |
+ HashSetParms(const HF & h = HF(), const E & e = E()) : thehash(h), equal(e) {}
|
2908
|
110 |
};
|
|
111 |
|
6670
|
112 |
template <typename K, typename HF = hash<K>, typename E = std::equal_to<K> >
|
|
113 |
@@ -293,12 +293,12 @@ namespace acommon {
|
|
114 |
typedef std::pair<const K,V> Value;
|
|
115 |
typedef const K Key;
|
|
116 |
static const bool is_multi = m;
|
|
117 |
- HF hash;
|
|
118 |
+ HF thehash;
|
|
119 |
E equal;
|
|
120 |
const K & key(const Value & v) {return v.first;}
|
|
121 |
HashMapParms() {}
|
|
122 |
- HashMapParms(const HF & h) : hash(h) {}
|
|
123 |
- HashMapParms(const HF & h, const E & e) : hash(h), equal(e) {}
|
|
124 |
+ HashMapParms(const HF & h) : thehash(h) {}
|
|
125 |
+ HashMapParms(const HF & h, const E & e) : thehash(h), equal(e) {}
|
|
126 |
};
|
2908
|
127 |
|
6670
|
128 |
template <typename K, typename V, typename HF = hash<K>, typename E = std::equal_to<K> >
|
|
129 |
--- aspell-0.60.4/modules/speller/default/readonly_ws.cpp-orig 2006-01-25 08:58:10.945381000 -0800
|
|
130 |
+++ aspell-0.60.4/modules/speller/default/readonly_ws.cpp 2006-01-25 09:36:00.510958000 -0800
|
|
131 |
@@ -197,7 +197,7 @@ namespace {
|
|
132 |
struct WordLookupParms {
|
|
133 |
const char * block_begin;
|
|
134 |
WordLookupParms() {}
|
|
135 |
- typedef BlockVector<const u32int> Vector;
|
|
136 |
+ typedef BlockVector<const u32int> TheVector;
|
|
137 |
typedef u32int Value;
|
|
138 |
typedef const char * Key;
|
|
139 |
static const bool is_multi = false;
|
|
140 |
@@ -727,7 +727,7 @@ namespace {
|
|
141 |
struct WordLookupParms {
|
|
142 |
const char * block_begin;
|
|
143 |
WordLookupParms() {}
|
|
144 |
- typedef Vector<u32int> Vector;
|
|
145 |
+ typedef Vector<u32int> TheVector;
|
|
146 |
typedef u32int Value;
|
|
147 |
typedef const char * Key;
|
|
148 |
static const bool is_multi = false;
|
|
149 |
--- aspell-0.60.4/modules/speller/default/vector_hash.hpp-orig 2006-01-25 09:36:22.487585000 -0800
|
|
150 |
+++ aspell-0.60.4/modules/speller/default/vector_hash.hpp 2006-01-25 09:37:36.261195000 -0800
|
|
151 |
@@ -147,9 +147,9 @@ namespace aspeller {
|
2908
|
152 |
|
6670
|
153 |
template <class Parms>
|
|
154 |
class VectorHashTable {
|
|
155 |
- typedef typename Parms::Vector Vector;
|
|
156 |
+ typedef typename Parms::TheVector Vector;
|
|
157 |
public:
|
|
158 |
- typedef typename Parms::Vector vector_type;
|
|
159 |
+ typedef typename Parms::TheVector vector_type;
|
|
160 |
typedef typename Vector::value_type value_type;
|
|
161 |
typedef typename Vector::size_type size_type;
|
|
162 |
typedef typename Vector::difference_type difference_type;
|
|
163 |
--- aspell-0.60.4/common/string_map.hpp-orig 2006-01-25 12:10:54.229184000 -0800
|
|
164 |
+++ aspell-0.60.4/common/string_map.hpp 2006-01-25 12:11:01.101685000 -0800
|
|
165 |
@@ -28,7 +28,7 @@ public: // but don't use
|
|
166 |
typedef const char * Key;
|
|
167 |
const char * key(const Value & v) {return v.first;}
|
|
168 |
static const bool is_multi = false;
|
|
169 |
- acommon::hash<const char *> hash;
|
|
170 |
+ acommon::hash<const char *> thehash;
|
|
171 |
bool equal(const char * x, const char * y) {return strcmp(x,y) == 0;}
|
|
172 |
};
|
|
173 |
typedef StringPair Value_;
|
|
174 |
--- aspell-0.60.4/gen/mk-static-filter.pl-orig 2006-01-25 13:22:28.191252000 -0800
|
|
175 |
+++ aspell-0.60.4/gen/mk-static-filter.pl 2006-01-25 13:36:24.392225000 -0800
|
|
176 |
@@ -158,11 +158,17 @@ while ($filter = shift @filterhashes) {
|
|
177 |
printf STATICFILTERS "\n };\n";
|
|
178 |
printf STATICFILTERS "\n const KeyInfo * ".${$filter}{"NAME"}."_options_begin = ".
|
|
179 |
${$filter}{"NAME"}."_options;\n";
|
|
180 |
+# If structure is empty, set options_end to same as options_begin.
|
|
181 |
+if ($firstopt == 1) {
|
|
182 |
+ printf STATICFILTERS "\n const KeyInfo * ".${$filter}{"NAME"}."_options_end = ".
|
|
183 |
+ ${$filter}{"NAME"}."_options;\n";
|
|
184 |
+} else {
|
|
185 |
printf STATICFILTERS "\n const KeyInfo * ".${$filter}{"NAME"}."_options_end = ".
|
|
186 |
${$filter}{"NAME"}."_options+sizeof(".
|
|
187 |
${$filter}{"NAME"}."_options)/".
|
|
188 |
"sizeof(KeyInfo);\n";
|
|
189 |
}
|
|
190 |
+}
|
2908
|
191 |
|
6670
|
192 |
#finally create filter modules list.
|
|
193 |
printf STATICFILTERS "\n\n static ConfigModule filter_modules[] = {\n";
|