Quoting Gary Setter <[EMAIL PROTECTED]>: > <snip> > I'm not sure I can solve the problem, but since you made some > changes to the source, would you post the definition of the > QuoteChars please. > Best regards, > Gary Setter I have made no changes to the source, trust me. This is a plain vanilla aspell-0.60.2. But i have found a solution to the 4 errors in modules/filter/email.cpp:
>From an old KDE-development discussion on porting to IRIX i remembered >something about code not belonging in c++ source code files, but in header files. Aapparently the namespace section in email.cpp should belong in a header, atleast according to the MIPSPro compiler, so i spliced the source file into a header part and code part: --- modules/filter/email.cpp.save Fri Dec 3 03:22:16 2004 +++ modules/filter/email.cpp Fri Mar 18 15:27:19 2005 @@ -6,59 +6,9 @@ #include "settings.h" -#include "indiv_filter.hpp" -#include "convert.hpp" -#include "config.hpp" -#include "indiv_filter.hpp" -#include "mutable_container.hpp" - -namespace { - - using namespace acommon; - - class EmailFilter : public IndividualFilter - { - bool prev_newline; - bool in_quote; - int margin; - int n; - - class QuoteChars : public MutableContainer { - public: - typedef FilterChar::Chr Value; - Vector<Value> data; - Conv conv; - bool have(Value c) { - Value * i = data.pbegin(); - Value * end = data.pend(); - for (; i != end && *i != c; ++i); - return i != end; - } - PosibErr<bool> add(ParmStr s) { - Value c = *(Value *)conv(s); - if (!have(c)) data.push_back(c); - return true; - } - PosibErr<bool> remove(ParmStr s) { - Value c = *(Value *)conv(s); - Vector<Value>::iterator i = data.begin(); - Vector<Value>::iterator end = data.end(); - for (; i != end && *i != c; ++i); - if (i != end) data.erase(i); - return true; - } - PosibErr<void> clear() { - data.clear(); - return no_err; - } - }; - QuoteChars is_quote_char; +#include "email.hpp" - public: - PosibErr<bool> setup(Config *); - void reset(); - void process(FilterChar * &, FilterChar * &); - }; +using namespace acommon; PosibErr<bool> EmailFilter::setup(Config * opts) { @@ -105,7 +55,6 @@ for (FilterChar * i = line_begin; i != cur; ++i) *i = ' '; } -} C_EXPORT IndividualFilter * new_aspell_email_filter() { --- modules/filter/email.hpp.save Fri Mar 18 15:46:58 2005 +++ modules/filter/email.hpp Fri Mar 18 09:54:05 2005 @@ -0,0 +1,59 @@ +// This file is part of The New Aspell +// Copyright (C) 2001 by Kevin Atkinson under the GNU LGPL license +// version 2.0 or 2.1. You should have received a copy of the LGPL +// license along with this library if you did not you can find +// it at http://www.gnu.org/. + +#include "settings.h" + +#include "indiv_filter.hpp" +#include "convert.hpp" +#include "config.hpp" +#include "indiv_filter.hpp" +#include "mutable_container.hpp" + +using namespace acommon; + + class EmailFilter : public IndividualFilter + { + bool prev_newline; + bool in_quote; + int margin; + int n; + + class QuoteChars : public MutableContainer { + public: + typedef FilterChar::Chr Value; + Vector<Value> data; + Conv conv; + bool have(Value c) { + Value * i = data.pbegin(); + Value * end = data.pend(); + for (; i != end && *i != c; ++i); + return i != end; + } + PosibErr<bool> add(ParmStr s) { + Value c = *(Value *)conv(s); + if (!have(c)) data.push_back(c); + return true; + } + PosibErr<bool> remove(ParmStr s) { + Value c = *(Value *)conv(s); + Vector<Value>::iterator i = data.begin(); + Vector<Value>::iterator end = data.end(); + for (; i != end && *i != c; ++i); + if (i != end) data.erase(i); + return true; + } + PosibErr<void> clear() { + data.clear(); + return no_err; + } + }; + QuoteChars is_quote_char; + + public: + PosibErr<bool> setup(Config *); + void reset(); + void process(FilterChar * &, FilterChar * &); + }; And now the compiler is happy and so am i :) Similarly, the namespace portions of tex.cpp and sgml.cpp in modules/filter need to be split into a header file as well. Since this is not detrimental for compiling to other architectures, may i vote for an inclusion of this in aspell-0.60.3? current patch set can be found in http://www.mechanics.citg.tudelft.nl/~everdij/papa/aspellirix.patch if someone needs the gutsy details. I have also found other code issues, which are in my patch file as well. The first one is a patch by Albert Chin, mentioned in: http://www.mail-archive.com/aspell-devel@gnu.org/msg00581.html Removing the "static" works for me as well. The second one is a duplicate variable-name new_aff in affix.hpp function expand_suffix, so i underscored the second occurence. If anyone can check if this is supposed to be like that, be my guest. AFAIK one needs only one occurence of new_aff in expand_suffix, but who am i. --- common/string.hpp.save Mon Nov 29 18:50:05 2004 +++ common/string.hpp Fri Mar 18 15:54:12 2005 @@ -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 --- modules/speller/default/affix.hpp.save Fri Mar 18 09:58:10 2005 +++ modules/speller/default/affix.hpp Fri Mar 18 09:58:39 2005 @@ -109,7 +109,7 @@ } WordAff * expand_suffix(ParmString word, const unsigned char * new_aff, ObjStack &, int limit = INT_MAX, - unsigned char * new_aff = 0, WordAff * * * l = 0, + unsigned char * new_aff_ = 0, WordAff * * * l = 0, ParmString orig_word = 0) const; private: Last error i found is that when compiling i get an error in gen/static-filters.src.cpp: .. cc-1070 CC: ERROR File = ./gen/static_filters.src.cpp, Line = 76 The indicated type is incomplete. static KeyInfo nroff_options[] = { ^ cc-1070 CC: ERROR File = ./gen/static_filters.src.cpp, Line = 103 The indicated type is incomplete. static KeyInfo url_options[] = { ^ 2 errors detected in the compilation of "lib/new_filter.cpp". Probably the perl scripts in directory gen got confused and decided to refrain from putting an option in there, which the MIPSPro compiler rejects. modifying them to: static KeyInfo nroff_options[] = { NULL }; and static KeyInfo url_options[] = { NULL }; causes the aspell compile to finish succesfully up to the end and links. Executing "Aspell --help" segfaults right after the nroff option list, so anybody who can make these two options work is most welcome. :) Oh and before i forget: Enjoy the weekend :) Yours Frank -- drs Frank Everdij Email:[EMAIL PROTECTED] Tel:01527-88202 Room:6.08 System Administrator for Structural Mechanics Dept. of Civil Engineering TU Delft _______________________________________________ Aspell-devel mailing list Aspell-devel@gnu.org http://lists.gnu.org/mailman/listinfo/aspell-devel