diff --git a/src/query/Makefile b/src/query/Makefile index b7a7d00d..2350ef99 100644 --- a/src/query/Makefile +++ b/src/query/Makefile @@ -5,7 +5,7 @@ all: $(PROGS) XADUMP_OBJS= xadump.o $(BIGLIB) xadump : $(XADUMP_OBJS) $(CXX) $(CXXFLAGS) -o xadump $(XADUMP_OBJS) \ - $(LIBICONV) $(LIBXAPIAN) + $(LIBICONV) $(LIBXAPIAN) $(LIBSYS) QXTRY_OBJS= qxtry.o $(BIGLIB) qxtry : $(QXTRY_OBJS) diff --git a/src/query/xadump.cpp b/src/query/xadump.cpp index eaa92e89..6e2c6349 100644 --- a/src/query/xadump.cpp +++ b/src/query/xadump.cpp @@ -1,7 +1,7 @@ #ifndef lint -static char rcsid[] = "@(#$Id: xadump.cpp,v 1.6 2005-11-24 18:21:55 dockes Exp $ (C) 2004 J.F.Dockes"; +static char rcsid[] = "@(#$Id: xadump.cpp,v 1.7 2005-12-16 10:08:07 dockes Exp $ (C) 2004 J.F.Dockes"; #endif - +#include #include #include diff --git a/src/unac/unac.c b/src/unac/unac.c index 91510e92..f7b1fbcc 100644 --- a/src/unac/unac.c +++ b/src/unac/unac.c @@ -12815,9 +12815,9 @@ int unac_string(const char* charset, *out_lengthp = 0; } else { char* utf16 = 0; - int utf16_length = 0; + size_t utf16_length = 0; char* utf16_unaccented = 0; - int utf16_unaccented_length = 0; + size_t utf16_unaccented_length = 0; if(convert(charset, utf16be(), in, in_length, &utf16, &utf16_length) < 0) { return -1; diff --git a/src/utils/mimeparse.cpp b/src/utils/mimeparse.cpp index 305de72d..a39be4e3 100644 --- a/src/utils/mimeparse.cpp +++ b/src/utils/mimeparse.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: mimeparse.cpp,v 1.8 2005-11-24 07:16:16 dockes Exp $ (C) 2004 J.F.Dockes"; +static char rcsid[] = "@(#$Id: mimeparse.cpp,v 1.9 2005-12-16 10:08:08 dockes Exp $ (C) 2004 J.F.Dockes"; #endif #ifndef TEST_MIMEPARSE @@ -38,7 +38,8 @@ class Lexical { }; // Skip mime comment. This must be called with in[start] == '(' -int skip_comment(const string &in, unsigned int start, Lexical &lex) +string::size_type skip_comment(const string &in, string::size_type start, + Lexical &lex) { int commentlevel = 0; for (; start < in.size(); start++) { @@ -67,8 +68,9 @@ int skip_comment(const string &in, unsigned int start, Lexical &lex) } // Skip initial whitespace and (possibly nested) comments. -int skip_whitespace_and_comment(const string &in, unsigned int start, - Lexical &lex) +string::size_type skip_whitespace_and_comment(const string &in, + string::size_type start, + Lexical &lex) { while (1) { if ((start = in.find_first_not_of(" \t\r\n", start)) == string::npos) @@ -90,8 +92,8 @@ int skip_whitespace_and_comment(const string &in, unsigned int start, /// @param start the starting position /// @param lex the returned token and its description /// @param delims separators we should look for -int find_next_token(const string &in, unsigned int start, - Lexical &lex, string delims = ";=") +string::size_type find_next_token(const string &in, string::size_type start, + Lexical &lex, string delims = ";=") { char oquot, cquot; @@ -100,7 +102,7 @@ int find_next_token(const string &in, unsigned int start, return start; // Begins with separator ? return it. - unsigned int delimi = delims.find_first_of(in[start]); + string::size_type delimi = delims.find_first_of(in[start]); if (delimi != string::npos) { lex.what = Lexical::separator; lex.value = delims[delimi]; @@ -117,7 +119,7 @@ int find_next_token(const string &in, unsigned int start, if (cquot != 0) { // Quoted string parsing - unsigned int end; + string::size_type end; start++; // Skip quote character for (end = start;end < in.size() && in[end] != cquot; end++) { if (in[end] == '\\') { @@ -141,7 +143,7 @@ int find_next_token(const string &in, unsigned int start, lex.quote = oquot; return ++end; } else { - unsigned int end = in.find_first_of(delims + " \t(", start); + string::size_type end = in.find_first_of(delims + " \t(", start); lex.what = Lexical::token; lex.quote = 0; if (end == string::npos) { @@ -156,7 +158,7 @@ int find_next_token(const string &in, unsigned int start, void stringtolower(string &out, const string& in) { - for (unsigned int i = 0; i < in.size(); i++) + for (string::size_type i = 0; i < in.size(); i++) out.append(1, char(tolower(in[i]))); } @@ -166,7 +168,7 @@ bool parseMimeHeaderValue(const string& value, MimeHeaderValue& parsed) parsed.params.clear(); Lexical lex; - unsigned int start = 0; + string::size_type start = 0; start = find_next_token(value, start, lex); if (start == string::npos || lex.what != Lexical::token) return false; @@ -205,7 +207,7 @@ bool parseMimeHeaderValue(const string& value, MimeHeaderValue& parsed) bool qp_decode(const string& in, string &out) { out.reserve(in.length()); - unsigned int ii; + string::size_type ii; for (ii = 0; ii < in.length(); ii++) { if (in[ii] == '=') { ii++; // Skip '=' @@ -300,7 +302,7 @@ bool rfc2047_decode(const std::string& in, std::string &out) out = ""; - for (unsigned int ii = 0; ii < in.length(); ii++) { + for (string::size_type ii = 0; ii < in.length(); ii++) { char ch = in[ii]; switch (state) { case rfc2047base: