diff -Naur aspell-0.60.5-orig/common/convert.cpp aspell-0.60.5/common/convert.cpp --- aspell-0.60.5-orig/common/convert.cpp 2006-11-18 02:36:01.000000000 -0600 +++ aspell-0.60.5/common/convert.cpp 2007-12-29 11:17:11.000000000 -0600 @@ -238,7 +238,7 @@ } template - static void free_norm_table(NormTable * d) + void free_norm_table(NormTable * d) { for (T * cur = d->data; cur != d->end; ++cur) { if (cur->sub_table) diff -Naur aspell-0.60.5-orig/common/string.hpp aspell-0.60.5/common/string.hpp --- aspell-0.60.5-orig/common/string.hpp 2004-11-29 11:50:05.000000000 -0600 +++ aspell-0.60.5/common/string.hpp 2007-12-29 11:17:11.000000000 -0600 @@ -129,10 +129,10 @@ } char & operator[] (size_t pos) {return begin_[pos];} - const char operator[] (size_t pos) const {return begin_[pos];} + char operator[] (size_t pos) const {return begin_[pos];} char & back() {return end_[-1];} - const char back() const {return end_[-1];} + char back() const {return end_[-1];} void clear() {end_ = begin_;} @@ -492,7 +492,7 @@ namespace std { - template<> static inline void swap(acommon::String & x, acommon::String & y) {return x.swap(y);} + template<> inline void swap(acommon::String & x, acommon::String & y) {return x.swap(y);} } #endif diff -Naur aspell-0.60.5-orig/modules/speller/default/affix.cpp aspell-0.60.5/modules/speller/default/affix.cpp --- aspell-0.60.5-orig/modules/speller/default/affix.cpp 2006-01-21 08:27:54.000000000 -0600 +++ aspell-0.60.5/modules/speller/default/affix.cpp 2007-12-29 11:17:11.000000000 -0600 @@ -193,7 +193,7 @@ typedef const Conds * Value; typedef const char * Key; static const bool is_multi = false; - hash hfun; + acommon::hash hfun; size_t hash(const char * s) {return hfun(s);} bool equal(const char * x, const char * y) {return strcmp(x,y) == 0;} const char * key(const Conds * c) {return c->str;} diff -Naur aspell-0.60.5-orig/modules/speller/default/affix.hpp aspell-0.60.5/modules/speller/default/affix.hpp --- aspell-0.60.5-orig/modules/speller/default/affix.hpp 2004-11-29 11:50:06.000000000 -0600 +++ aspell-0.60.5/modules/speller/default/affix.hpp 2007-12-29 11:17:11.000000000 -0600 @@ -107,7 +107,7 @@ { return expand(word,aff,buf,0); } - WordAff * expand_suffix(ParmString word, const unsigned char * new_aff, + WordAff * expand_suffix(ParmString word, const unsigned char * aff, ObjStack &, int limit = INT_MAX, unsigned char * new_aff = 0, WordAff * * * l = 0, ParmString orig_word = 0) const; diff -Naur aspell-0.60.5-orig/modules/speller/default/readonly_ws.cpp aspell-0.60.5/modules/speller/default/readonly_ws.cpp --- aspell-0.60.5-orig/modules/speller/default/readonly_ws.cpp 2006-11-18 03:17:19.000000000 -0600 +++ aspell-0.60.5/modules/speller/default/readonly_ws.cpp 2007-12-29 11:17:11.000000000 -0600 @@ -726,7 +726,7 @@ struct WordLookupParms { const char * block_begin; WordLookupParms() {} - typedef Vector Vector; + typedef acommon::Vector Vector; typedef u32int Value; typedef const char * Key; static const bool is_multi = false; diff -Naur aspell-0.60.5-orig/prog/aspell.cpp aspell-0.60.5/prog/aspell.cpp --- aspell-0.60.5-orig/prog/aspell.cpp 2006-12-19 04:51:08.000000000 -0600 +++ aspell-0.60.5/prog/aspell.cpp 2007-12-29 11:18:10.000000000 -0600 @@ -239,6 +239,14 @@ return i; } +static void line_buffer() { +#ifndef WIN32 + // set up stdin and stdout to be line buffered + assert(setvbuf(stdin, 0, _IOLBF, 0) == 0); + assert(setvbuf(stdout, 0, _IOLBF, 0) == 0); +#endif +} + Conv dconv; Conv uiconv; @@ -686,11 +694,7 @@ void pipe() { -#ifndef WIN32 - // set up stdin and stdout to be line buffered - assert(setvbuf(stdin, 0, _IOLBF, 0) == 0); - assert(setvbuf(stdout, 0, _IOLBF, 0) == 0); -#endif + line_buffer(); bool terse_mode = true; bool do_time = options->retrieve_bool("time"); @@ -1651,6 +1655,7 @@ Conv oconv(setup_conv(lang, options)); String word; String sl; + line_buffer(); while (CIN.getline(word)) { const char * w = iconv(word); lang->LangImpl::to_soundslike(sl, w); @@ -1675,6 +1680,7 @@ Conv oconv(setup_conv(lang, options)); String word; GuessInfo gi; + line_buffer(); while (CIN.getline(word)) { lang->munch(iconv(word), &gi); COUT << word; @@ -1713,6 +1719,7 @@ String word, buf; ObjStack exp_buf; WordAff * exp_list; + line_buffer(); while (CIN.getline(word)) { buf = word; char * w = iconv(buf.mstr(), buf.size()); @@ -1799,6 +1806,7 @@ String word; String base; String affs; + line_buffer(); while (CIN.getline(word)) { word = iconv(word); @@ -1882,7 +1890,7 @@ typedef SML_WordEntry Value; typedef const char * Key; static const bool is_multi = false; - hash hash; + acommon::hash hash; bool equal(Key x, Key y) {return strcmp(x,y) == 0;} Key key(const Value & v) {return v.word;} }; @@ -2033,7 +2041,7 @@ typedef CML_Entry Value; typedef const char * Key; static const bool is_multi = true; - hash hash; + acommon::hash hash; bool equal(Key x, Key y) {return strcmp(x,y) == 0;} Key key(const Value & v) {return v.word;} };