--- aspell-0.60.6/modules/speller/default/affix.cpp-orig 2006-01-25 12:48:22.221889000 -0800
+++ aspell-0.60.6/modules/speller/default/affix.cpp 2011-06-13 12:48:39.274322000 -0800
@@ -172,8 +172,8 @@
// typedef const char * Value;
// typedef const char * Key;
// static const bool is_multi = false;
-// hash<const char *> hfun;
-// size_t hash(const char * s) {return hfun(s);}
+// hash<const char *> thehash;
+// size_t hash(const char * s) {return thehash(s);}
// bool equal(const char * x, const char * y) {return strcmp(x,y) == 0;}
// const char * key(const char * c) {return c;}
// };
@@ -193,8 +193,8 @@
typedef const Conds * Value;
typedef const char * Key;
static const bool is_multi = false;
- acommon::hash<const char *> hfun;
- size_t hash(const char * s) {return hfun(s);}
+ acommon::hash<const char *> thehash;
+ size_t hash(const char * s) {return thehash(s);}
bool equal(const char * x, const char * y) {return strcmp(x,y) == 0;}
const char * key(const Conds * c) {return c->str;}
};
--- aspell-0.60.6/prog/aspell.cpp.orig 2007-12-02 22:23:57.000000000 -0500
+++ aspell-0.60.6/prog/aspell.cpp 2011-06-13 10:59:04.453316200 -0400
@@ -1892,7 +1892,7 @@
typedef SML_WordEntry Value;
typedef const char * Key;
static const bool is_multi = false;
- acommon::hash<const char *> hash;
+ acommon::hash<const char *> thehash;
bool equal(Key x, Key y) {return strcmp(x,y) == 0;}
Key key(const Value & v) {return v.word;}
};
@@ -2043,7 +2043,7 @@
typedef CML_Entry Value;
typedef const char * Key;
static const bool is_multi = true;
- acommon::hash<const char *> hash;
+ acommon::hash<const char *> thehash;
bool equal(Key x, Key y) {return strcmp(x,y) == 0;}
Key key(const Value & v) {return v.word;}
};
--- aspell-0.60.6/common/hash-t.hpp-orig 2006-01-25 10:48:42.926184000 -0800
+++ aspell-0.60.6/common/hash-t.hpp 2006-01-25 11:21:46.641457000 -0800
@@ -136,7 +136,7 @@ namespace acommon {
template <class P>
typename HashTable<P>::iterator HashTable<P>::find_i(const Key & to_find, bool & have)
{
- Size pos = parms_.hash(to_find) % table_size_;
+ Size pos = parms_.thehash(to_find) % table_size_;
Node * * n = table_ + pos;
have = false;
while (true) {
@@ -199,7 +199,7 @@ namespace acommon {
for (Node * * i = old_table; i != old_end; ++i) {
Node * n = *i;
while (n != 0) {
- Node * * put_me_here = table_ + (parms_.hash(parms_.key(n->data)) % table_size_);
+ Node * * put_me_here = table_ + (parms_.thehash(parms_.key(n->data)) % table_size_);
Node * tmp = n;
n = n->next;
tmp->next = *put_me_here;
--- aspell-0.60.6/common/hash.hpp-orig 2006-01-25 11:41:57.215601000 -0800
+++ aspell-0.60.6/common/hash.hpp 2006-01-25 11:43:22.913496000 -0800
@@ -259,10 +259,10 @@ namespace acommon {
typedef K Value;
typedef const K Key;
static const bool is_multi = m;
- HF hash;
+ HF thehash;
E equal;
const K & key(const K & v) {return v;}
- HashSetParms(const HF & h = HF(), const E & e = E()) : hash(h), equal(e) {}
+ HashSetParms(const HF & h = HF(), const E & e = E()) : thehash(h), equal(e) {}
};
template <typename K, typename HF = hash<K>, typename E = std::equal_to<K> >
@@ -293,12 +293,12 @@ namespace acommon {
typedef std::pair<const K,V> Value;
typedef const K Key;
static const bool is_multi = m;
- HF hash;
+ HF thehash;
E equal;
const K & key(const Value & v) {return v.first;}
HashMapParms() {}
- HashMapParms(const HF & h) : hash(h) {}
- HashMapParms(const HF & h, const E & e) : hash(h), equal(e) {}
+ HashMapParms(const HF & h) : thehash(h) {}
+ HashMapParms(const HF & h, const E & e) : thehash(h), equal(e) {}
};
template <typename K, typename V, typename HF = hash<K>, typename E = std::equal_to<K> >
--- aspell-0.60.6/modules/speller/default/readonly_ws.cpp.orig 2011-06-13 10:36:08.1246
68200 -0400
+++ aspell-0.60.6/modules/speller/default/readonly_ws.cpp 2011-06-13 10:37:39.702793200 -0
400
@@ -196,7 +196,7 @@
struct WordLookupParms {
const char * block_begin;
WordLookupParms() {}
- typedef BlockVector<const u32int> Vector;
+ typedef BlockVector<const u32int> TheVector;
typedef u32int Value;
typedef const char * Key;
static const bool is_multi = false;
@@ -726,7 +726,7 @@
struct WordLookupParms {
const char * block_begin;
WordLookupParms() {}
- typedef acommon::Vector<u32int> Vector;
+ typedef acommon::Vector<u32int> TheVector;
typedef u32int Value;
typedef const char * Key;
static const bool is_multi = false;
--- aspell-0.60.6/modules/speller/default/vector_hash.hpp-orig 2006-01-25 09:36:22.487585000 -0800
+++ aspell-0.60.6/modules/speller/default/vector_hash.hpp 2006-01-25 09:37:36.261195000 -0800
@@ -147,9 +147,9 @@ namespace aspeller {
template <class Parms>
class VectorHashTable {
- typedef typename Parms::Vector Vector;
+ typedef typename Parms::TheVector Vector;
public:
- typedef typename Parms::Vector vector_type;
+ typedef typename Parms::TheVector vector_type;
typedef typename Vector::value_type value_type;
typedef typename Vector::size_type size_type;
typedef typename Vector::difference_type difference_type;
--- aspell-0.60.6/common/string_map.hpp-orig 2006-01-25 12:10:54.229184000 -0800
+++ aspell-0.60.6/common/string_map.hpp 2006-01-25 12:11:01.101685000 -0800
@@ -28,7 +28,7 @@ public: // but don't use
typedef const char * Key;
const char * key(const Value & v) {return v.first;}
static const bool is_multi = false;
- acommon::hash<const char *> hash;
+ acommon::hash<const char *> thehash;
bool equal(const char * x, const char * y) {return strcmp(x,y) == 0;}
};
typedef StringPair Value_;
--- aspell-0.60.6/common/convert.cpp.orig 2011-06-13 12:00:23.784985200 -0400
+++ aspell-0.60.6/common/convert.cpp 2011-06-13 12:01:11.568937700 -0400
@@ -813,6 +813,7 @@
{
ToUniLookup lookup;
void decode(const char * in, int size, FilterCharVector & out) const {
+ if (size == 0) return; // if size == 0 then while loop cause SIGSEGV
const char * stop = in + size; // this is OK even if size == -1
while (*in && in != stop) {
out.append(from_utf8(in, stop));
--- aspell-0.60.6/lib/new_fmode.cpp.orig 2011-06-13 15:02:03.792159200 -0400
+++ aspell-0.60.6/lib/new_fmode.cpp 2011-06-13 15:07:10.629847700 -0400
@@ -275,12 +275,14 @@
}
return false;
}
-
- void FilterMode::MagicString::remExtension(const String & ext) {
- for ( Vector<String>::iterator it = fileExtensions.begin() ;
- it != fileExtensions.end() ; it++ ) {
- if ( *it == ext ) {
- fileExtensions.erase(it);
+ void FilterMode::MagicString::remExtension(const String & ext) {
+ Vector<String>::iterator it = fileExtensions.begin();
+ while (it != fileExtensions.end()) {
+ if ( *it == ext ) {
+ it = fileExtensions.erase(it);
+ }
+ else {
+ it++;
}
}
}
--- aspell-0.60.6/scripts/run-with-aspell.create.orig 2011-06-13 15:12:17.846992200 -0400
+++ aspell-0.60.6/scripts/run-with-aspell.create 2011-06-13 15:12:59.462000200 -0400
@@ -3,5 +3,4 @@
echo "#!/bin/sh"
echo "PATH=$1:\$PATH"
echo "export PATH"
-echo "exec \$@"
-
+echo "exec \"\$@\""
--- aspell-0.60.6/gen/mk-static-filter.pl.orig 2007-12-03 01:43:09.000000000 -0500
+++ aspell-0.60.6/gen/mk-static-filter.pl 2011-06-13 15:24:44.563445200 -0400
@@ -159,7 +159,7 @@
printf STATICFILTERS "\n const KeyInfo * ".${$filter}{"NAME"}."_options_begin = ".
${$filter}{"NAME"}."_options;\n";
# If structure is empty, set options_end to same as options_begin.
- if (%{$filter}) {
+ if ($firstopt) {
printf STATICFILTERS "\n const KeyInfo * ".${$filter}{"NAME"}."_options_end = ".
${$filter}{"NAME"}."_options;\n";
} else {