Index: npl/overig/libvmime/README
===================================================================
--- npl/overig/libvmime/README	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ 	(revision )
@@ -1,3 +1,0 @@
-These are the patches applied to the sourcecode of libvmime as shipped
-by Zarafa. The source of libvmime can be downloaded from:
-http://www.vmime.org/
Index: npl/overig/libvmime/libvmime.SlackBuild
===================================================================
--- npl/overig/libvmime/libvmime.SlackBuild	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ npl/overig/libvmime/libvmime.SlackBuild	(revision 516e1e97523c126d6bad6020235ade54f9c0c172)
@@ -1,4 +1,15 @@
 #!/bin/bash
-# Download vmime patches from: http://developer.zarafa.com/download/zarafa-vmime-patches.tar.gz
+
+#DEP:imagemagick
+#NEED:cmake
+#DEP:boost
+#NEED:doxygen
+#DEP:gnutls
+#DEP:openssl
+#NEED:linuxdoc_tools
+
+#?BuildRequires:  inkscape
+
+set -e
 
 #######Essential package info.
@@ -29,19 +40,30 @@
 syn3_unpack $SRC_ARC || exit 1
 
-#apply patches
-for PATCH in *.diff; do
-    patch -p1 -d $SRC_DIR < $PATCH|| exit 1
-done
+pushd $SRC_DIR
 
-#build and install sourcefiles
-#./configure optiones:
-export CONFIGURE_OPTS="--disable-sasl --disable-tls"
-#options for all make commands:
-export MAKE_OPTS=""
-#skip testing:
-#export NOTEST=1
-#extra optiones for the make install command, use with INSTALL_BASE for example:
-export INSTALL_OPTS=""
-syn3_build_automake $SRC_DIR /tmp/pkg || exit 1
+#note, use github version that has cmake files that create actual makefiles, from: https://codeload.github.com/kisli/vmime/tar.gz/v0.9.2
+
+
+# from https://build.opensuse.org/package/view_file/server:mail:kopano/libvmime/libvmime.spec?expand=1
+cf="-DVMIME_ALWAYS_GENERATE_7BIT_PARAMETER=1"
+cmake . \
+	-DVMIME_SENDMAIL_PATH:STRING="/usr/sbin/sendmail" \
+	-DVMIME_BUILD_SAMPLES:BOOL=OFF \
+	-DVMIME_HAVE_SASL_SUPPORT:BOOL=OFF \
+	-DVMIME_HAVE_TLS_SUPPORT:BOOL=ON \
+	-DVMIME_BUILD_STATIC_LIBRARY:BOOL=OFF \
+	-DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \
+	-DCMAKE_INSTALL_PREFIX:PATH="/usr" \
+	-DCMAKE_CXX_FLAGS_DEBUG:STRING="-g" \
+	-DCMAKE_CXX_FLAGS:STRING="$cf -std=gnu++11" \
+	-DCMAKE_C_FLAGS:STRING="$cf"
+make -j10 VERBOSE=1
+make install DESTDIR=/tmp/pkg
+
+popd
+
+
+
+
 
 
Index: npl/overig/libvmime/libvmime.build
===================================================================
--- npl/overig/libvmime/libvmime.build	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ npl/overig/libvmime/libvmime.build	(revision 516e1e97523c126d6bad6020235ade54f9c0c172)
@@ -1,1 +1,1 @@
-6526
+6532
Index: npl/overig/libvmime/libvmime.depver
===================================================================
--- npl/overig/libvmime/libvmime.depver	(revision 516e1e97523c126d6bad6020235ade54f9c0c172)
+++ npl/overig/libvmime/libvmime.depver	(revision 516e1e97523c126d6bad6020235ade54f9c0c172)
@@ -0,0 +1,4 @@
+imagemagick	0
+boost	3
+gnutls	0
+openssl	5
Index: npl/overig/libvmime/libvmime.md5
===================================================================
--- npl/overig/libvmime/libvmime.md5	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ npl/overig/libvmime/libvmime.md5	(revision 516e1e97523c126d6bad6020235ade54f9c0c172)
@@ -1,17 +1,6 @@
-0ba65ad889488b2f851d7f028bfb6e9e  ./libvmime-0.9.2.tar.bz2
-851c959afe77970e9b485c784731763f  ./libvmime_dev.pkg
-43c82beb61d23a4dd347af0adc709c4c  ./libvmime.pkg
-5124f8ed48d9da75fff30f4d3c71f2b7  ./libvmime.SlackBuild
-a3f5deda030ed1f5b4bf8b1193978546  ./libvmime.SlackBuild.log.gz
+61cf6b99aa1d5a125145269feb288449  ./libvmime_dev.pkg
+77a469e6f83f5db5809679e6c721ee32  ./libvmime.pkg
+bc793ac6ee1023df80b05ab88e2c6ea9  ./libvmime.SlackBuild
+6e929a87d6fbd9ac608e202db3cdb2b8  ./libvmime.SlackBuild.log.gz
 78b81040f172fbfad5a732e1fcffaa34  ./post.libvmime
-f765af3336f13d68ae7b0881fb11809f  ./README
-f9d915f576d55caf1c175f85fe96572c  ./vmime-0.9.2-header-value-on-next-line.diff
-37a434db82cb5baded6aa89ebd1800bd  ./vmime-0.9.2-phf-stop-on-whitespace.diff
-b0b3260d88899c5aeff74aad86186602  ./vmime-0.9.2-qp-in-buffers.diff
-f095c053d300a7f285855090e9f62742  ./vmime-backport-mailboxList-parser-29954e5.diff
-e3729b93760de843f04b25ccdb363ac9  ./vmime-disable-rfc2231.diff
-957cbbc72d374157475788450cee5049  ./vmime-ignore-multiple-colons-in-headers.diff
-21dcfca3eedb6b08fac57a5c9f267490  ./vmime-ignore-newlines.diff
-29651f18632f71f93e2ca7d1284c718b  ./vmime-mixed-qp-in-parameter.diff
-cde4f6e8a17bf09b6069290cc53da44f  ./vmime-remove-setlocale.diff
-405698732a751e4f654809e535be1e65  ./vmime-wrongly-padded-B64-words.diff
+64ea8fad39df20f7bf32573ee37f4a6f  ./vmime-0.9.2.tar.gz
Index: npl/overig/libvmime/libvmime_dev.build
===================================================================
--- npl/overig/libvmime/libvmime_dev.build	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ npl/overig/libvmime/libvmime_dev.build	(revision 516e1e97523c126d6bad6020235ade54f9c0c172)
@@ -1,1 +1,1 @@
-6526
+6532
Index: npl/overig/libvmime/vmime-0.9.2-header-value-on-next-line.diff
===================================================================
--- npl/overig/libvmime/vmime-0.9.2-header-value-on-next-line.diff	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ 	(revision )
@@ -1,45 +1,0 @@
-diff -Nurb libvmime-0.9.2.orig/src/headerField.cpp libvmime-0.9.2.patched/src/headerField.cpp
---- libvmime-0.9.2.orig/src/headerField.cpp	2010-05-20 05:33:45.000000000 -0700
-+++ libvmime-0.9.2.patched/src/headerField.cpp	2011-08-29 12:10:08.438497914 -0700
-@@ -157,14 +157,12 @@
- 					{
- 						contentsEnd = pos;
- 						pos += 2;
--						break;
- 					}
- 					else if (c == '\n')
- 					{
- 						contentsEnd = pos;
- 						++pos;
--						break;
--					}
-+					} else {
- 
- 					while (pos < end)
- 					{
-@@ -186,24 +184,13 @@
- 
- 						++pos;
- 					}
-+					}
- 
- 					// Handle the case of folded lines
- 					if (buffer[pos] == ' ' || buffer[pos] == '\t')
- 					{
- 						// This is a folding white-space: we keep it as is and
- 						// we continue with contents parsing...
--
--						// If the line contains only space characters, we assume it is
--						// the end of the headers. This is not strictly standard-compliant
--						// but, hey, we can't fail when parsing some malformed mails...
--						while (pos < end && (buffer[pos] == ' ' || buffer[pos] == '\t'))
--							++pos;
--
--						if ((pos < end && buffer[pos] == '\n') ||
--						    (pos + 1 < end && buffer[pos] == '\r' && buffer[pos + 1] == '\n'))
--						{
--							break;
--						}
- 					}
- 					else
- 					{
Index: npl/overig/libvmime/vmime-0.9.2-phf-stop-on-whitespace.diff
===================================================================
--- npl/overig/libvmime/vmime-0.9.2-phf-stop-on-whitespace.diff	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ 	(revision )
@@ -1,23 +1,0 @@
-diff -Nurb libvmime-0.9.2.orig/src/parameterizedHeaderField.cpp libvmime-0.9.2.patched/src/parameterizedHeaderField.cpp
---- libvmime-0.9.2.orig/src/parameterizedHeaderField.cpp	(revision 603)
-+++ libvmime-0.9.2.patched/src/parameterizedHeaderField.cpp	(working copy)
-@@ -97,7 +97,7 @@
- 	// Advance up to ';', if any
- 	string::size_type valueLength = 0;
- 
--	while (p < pend && *p != ';')  // FIXME: support ";" inside quoted or RFC-2047-encoded text
-+	while (p < pend && *p != ';' && (!parserHelpers::isSpace(*p)))  // FIXME: support ";" inside quoted or RFC-2047-encoded text
- 	{
- 		++p;
- 		++valueLength;
-@@ -118,6 +118,10 @@
- 	{
- 		std::map <string, paramInfo> params;
- 
-+		if (*p != ';')
-+			while (p < pend && *p != ';')  // FIXME: support ";" inside quoted or RFC-2047-encoded text
-+				++p;
-+
- 		while (*p == ';')
- 		{
- 			// Skip ';'
Index: npl/overig/libvmime/vmime-0.9.2-qp-in-buffers.diff
===================================================================
--- npl/overig/libvmime/vmime-0.9.2-qp-in-buffers.diff	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ 	(revision )
@@ -1,16 +1,0 @@
---- svn/src/wordEncoder.cpp     (revision 603)
-+++ svn/src/wordEncoder.cpp     (working copy)
-@@ -239,6 +239,13 @@
- 	if (buffer.find_first_of("\n\r") != string::npos)
- 		return true;
- 
-+	// If the string contains a QP string, we need to encode this.
-+	// Not a 100% check, but we'd only get more encoded strings.
-+	std::string::size_type pos = buffer.find("=?");
-+	std::string::size_type end = buffer.find("?=");
-+	if (pos != string::npos && end != string::npos && end > pos)
-+		return true;
-+
- 	return false;
- }
- 
Index: npl/overig/libvmime/vmime-backport-mailboxList-parser-29954e5.diff
===================================================================
--- npl/overig/libvmime/vmime-backport-mailboxList-parser-29954e5.diff	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ 	(revision )
@@ -1,58 +1,0 @@
-diff -urb libvmime-0.9.2.orig/src/mailboxList.cpp libvmime-0.9.2/src/mailboxList.cpp
---- libvmime-0.9.2.orig/src/mailboxList.cpp	2009-09-16 09:49:29.000000000 +0200
-+++ libvmime-0.9.2/src/mailboxList.cpp	2014-06-30 16:36:57.090914257 +0200
-@@ -22,6 +22,7 @@
- //
- 
- #include "vmime/mailboxList.hpp"
-+#include "vmime/mailboxGroup.hpp"
- #include "vmime/exception.hpp"
- 
- 
-@@ -199,7 +200,34 @@
- void mailboxList::parse(const string& buffer, const string::size_type position,
- 	const string::size_type end, string::size_type* newPosition)
- {
--	m_list.parse(buffer, position, end, newPosition);
-+	string::size_type pos = position;
-+
-+	while (pos < end)
-+	{
-+		ref <address> parsedAddress = address::parseNext(buffer, pos, end, &pos);
-+
-+		if (parsedAddress != NULL)
-+		{
-+			if (parsedAddress->isGroup())
-+			{
-+				ref <mailboxGroup> group = parsedAddress.staticCast <mailboxGroup>();
-+
-+				for (size_t i = 0 ; i < group->getMailboxCount() ; ++i)
-+				{
-+					m_list.appendAddress(group->getMailboxAt(i));
-+				}
-+			}
-+			else
-+			{
-+				m_list.appendAddress(parsedAddress);
-+			}
-+		}
-+	}
-+
-+	setParsedBounds(position, end);
-+
-+	if (newPosition)
-+		*newPosition = end;
- }
- 
- 
-diff -urb libvmime-0.9.2.orig/vmime/address.hpp libvmime-0.9.2/vmime/address.hpp
---- libvmime-0.9.2.orig/vmime/address.hpp	2009-09-16 09:49:37.000000000 +0200
-+++ libvmime-0.9.2/vmime/address.hpp	2014-06-30 16:43:03.302908667 +0200
-@@ -65,7 +65,6 @@
- 
- 	virtual ref <component> clone() const = 0;
- 
--protected:
- 
- 	/** Parse an address from an input buffer.
- 	  *
Index: npl/overig/libvmime/vmime-disable-rfc2231.diff
===================================================================
--- npl/overig/libvmime/vmime-disable-rfc2231.diff	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ 	(revision )
@@ -1,14 +1,0 @@
-diff -urb libvmime-0.9.2.orig/src/parameter.cpp libvmime-0.9.2/src/parameter.cpp
---- libvmime-0.9.2.orig/src/parameter.cpp	2014-06-30 16:44:39.982907192 +0200
-+++ libvmime-0.9.2/src/parameter.cpp	2014-07-15 14:21:20.865680985 +0200
-@@ -403,7 +403,9 @@
- 
- 	// Also generate an extended parameter if the value contains 8-bit characters
- 	// or is too long for a single line
--	if (extended || cutValue)
-+
-+	// Disable RFC-2231 header generation. Some email clients have bad reactions to it.
-+	if ((extended || cutValue) && false)
- 	{
- 
- #if VMIME_ALWAYS_GENERATE_7BIT_PARAMETER
Index: npl/overig/libvmime/vmime-ignore-multiple-colons-in-headers.diff
===================================================================
--- npl/overig/libvmime/vmime-ignore-multiple-colons-in-headers.diff	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ 	(revision )
@@ -1,15 +1,0 @@
-Index: svn/src/headerField.cpp
-===================================================================
---- svn/src/headerField.cpp	2013-12-04 14:20:38.864837137 +0100
-+++ svn/src/headerField.cpp	2013-12-04 14:20:38.844837137 +0100
-@@ -132,7 +132,9 @@
- 				                  buffer.begin() + nameEnd);
-
- 				// Skip ':' character
--				++pos;
-+				// Patch: don't just skip one colon, but any and all, if available. NS 2 December 2013
-+				while ((pos < end) && (buffer[pos] == ':'))
-+				    ++pos;
-
- 				// Skip spaces between ':' and the field contents
- 				while (pos < end && (buffer[pos] == ' ' || buffer[pos] == '\t'))
Index: npl/overig/libvmime/vmime-ignore-newlines.diff
===================================================================
--- npl/overig/libvmime/vmime-ignore-newlines.diff	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ 	(revision )
@@ -1,17 +1,0 @@
---- libvmime-0.9.2.orig/src/word.cpp	2014-08-21 10:30:25.360037840 +0200
-+++ libvmime-0.9.2/src/word.cpp	2014-08-21 10:31:33.166782973 +0200
-@@ -73,11 +73,13 @@ ref <word> word::parseNext(const string&
- 	//   - before the first word
- 	//   - between two encoded words
- 	//   - after the last word
-+	// Always ignore newlines
- 	string whiteSpaces;
- 
- 	while (pos < end && parserHelpers::isSpace(buffer[pos]))
- 	{
--		whiteSpaces += buffer[pos];
-+		if(buffer[pos] != '\r' && buffer[pos] != '\n') // do not include newlines
-+			whiteSpaces += buffer[pos];
- 		++pos;
- 	}
- 
Index: npl/overig/libvmime/vmime-mixed-qp-in-parameter.diff
===================================================================
--- npl/overig/libvmime/vmime-mixed-qp-in-parameter.diff	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ 	(revision )
@@ -1,28 +1,0 @@
-Index: svn/src/parameter.cpp
-===================================================================
---- svn/src/parameter.cpp	(revision 597)
-+++ svn/src/parameter.cpp	(working copy)
-@@ -239,8 +239,21 @@
- 			{
- 				value << t.getWholeBuffer();
- 
--				if (!foundCharsetChunk)
--					ch = t.getWordAt(0)->getCharset();
-+				if (!foundCharsetChunk) {
-+					// this is still wrong. each word can have it's
-+					// own charset, and can be mixed (eg. iso-8859-1
-+					// and iso-2022-jp), but very unlikely.
-+					// real fix is to have parameters store a
-+					// vmime::text in stead of a vmime::word in
-+					// m_value.  but that changes the interface
-+					for (size_t i = 0; i < t.getWordCount(); i++) {
-+						if (t.getWordAt(i)->getCharset() != ch && ch == charsets::US_ASCII) {
-+							ch = t.getWordAt(i)->getCharset();
-+							break;
-+						}
-+					}
-+						
-+				}
- 			}
- 		}
- 	}
Index: npl/overig/libvmime/vmime-remove-setlocale.diff
===================================================================
--- npl/overig/libvmime/vmime-remove-setlocale.diff	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ 	(revision )
@@ -1,16 +1,0 @@
-diff -urb libvmime-0.9.2.orig/src/platforms/posix/posixHandler.cpp libvmime-0.9.2/src/platforms/posix/posixHandler.cpp
---- libvmime-0.9.2.orig/src/platforms/posix/posixHandler.cpp	2009-12-09 12:23:06.000000000 +0100
-+++ libvmime-0.9.2/src/platforms/posix/posixHandler.cpp	2014-01-17 17:42:08.000000000 +0100
-@@ -153,11 +153,7 @@
- {
- 	const PLockHelper lock;
- 
--	const char* prevLocale = ::setlocale(LC_ALL, "");
--	vmime::charset ch(::nl_langinfo(CODESET));
--	::setlocale(LC_ALL, prevLocale);
--
--	return (ch);
-+	return vmime::charset(::nl_langinfo(CODESET));
- }
- 
- 
Index: npl/overig/libvmime/vmime-wrongly-padded-B64-words.diff
===================================================================
--- npl/overig/libvmime/vmime-wrongly-padded-B64-words.diff	(revision 010568537c6a24bc6e83a1a5814a6f87df3223f6)
+++ 	(revision )
@@ -1,188 +1,0 @@
-diff -urb libvmime-0.9.2-patched/src/word.cpp libvmime-0.9.2/src/word.cpp
---- libvmime-0.9.2-patched/src/word.cpp	2015-01-16 15:04:04.124264216 +0100
-+++ libvmime-0.9.2/src/word.cpp	2015-01-16 15:05:13.672262038 +0100
-@@ -64,8 +64,7 @@
- 
- 
- ref <word> word::parseNext(const string& buffer, const string::size_type position,
--	const string::size_type end, string::size_type* newPosition,
--	bool prevIsEncoded, bool* isEncoded, bool isFirst)
-+	const string::size_type end, string::size_type* newPosition, parserState* state)
- {
- 	string::size_type pos = position;
- 
-@@ -120,7 +119,7 @@
- 
- 			if (!unencoded.empty())
- 			{
--				if (prevIsEncoded)
-+				if (state->prevIsEncoded && !state->isFirst)
- 					unencoded = whiteSpaces + unencoded;
- 
- 				ref <word> w = vmime::create <word>(unencoded, charset(charsets::US_ASCII));
-@@ -129,8 +128,8 @@
- 				if (newPosition)
- 					*newPosition = pos;
- 
--				if (isEncoded)
--					*isEncoded = false;
-+				state->prevIsEncoded = false;
-+				state->isFirst = false;
- 
- 				return (w);
- 			}
-@@ -181,13 +180,13 @@
- 			pos += 2; // ?=
- 
- 			ref <word> w = vmime::create <word>();
--			w->parse(buffer, wordStart, pos, NULL);
-+			w->parseWithState(buffer, wordStart, pos, NULL, state);
- 
- 			if (newPosition)
- 				*newPosition = pos;
- 
--			if (isEncoded)
--				*isEncoded = true;
-+			state->prevIsEncoded = true;
-+			state->isFirst = false;
- 
- 			return (w);
- 		}
-@@ -195,7 +194,7 @@
- 		++pos;
- 	}
- 
--	if (startPos != end && !isFirst && prevIsEncoded)
-+	if (startPos != end && !state->isFirst && state->prevIsEncoded)
- 		unencoded += whiteSpaces;
- 
- 	if (startPos != end)
-@@ -210,8 +209,8 @@
- 		if (newPosition)
- 			*newPosition = end;
- 
--		if (isEncoded)
--			*isEncoded = false;
-+		state->prevIsEncoded = false;
-+		state->isFirst = false;
- 
- 		return (w);
- 	}
-@@ -228,9 +227,9 @@
- 
- 	string::size_type pos = position;
- 
--	bool prevIsEncoded = false;
-+	parserState state;
- 
--	while ((w = word::parseNext(buffer, pos, end, &pos, prevIsEncoded, &prevIsEncoded, (w == NULL))) != NULL)
-+	while ((w = word::parseNext(buffer, pos, end, &pos, &state)) != NULL)
- 		res.push_back(w);
- 
- 	if (newPosition)
-@@ -243,6 +242,14 @@
- void word::parse(const string& buffer, const string::size_type position,
- 	const string::size_type end, string::size_type* newPosition)
- {
-+	parseWithState(buffer, position, end, newPosition, NULL);
-+}
-+
-+
-+void word::parseWithState
-+	(const string& buffer, const size_t position,
-+	 const size_t end, size_t* newPosition, parserState* state)
-+{
- 	if (position + 6 < end && // 6 = "=?(.+)?(.*)?="
- 	    buffer[position] == '=' && buffer[position + 1] == '?')
- 	{
-@@ -289,12 +296,20 @@
- 					if (theEncoder)
- 					{
- 						// Decode text
-+						string encodedBuffer(dataPos, dataEnd);
- 						string decodedBuffer;
- 
--						utility::inputStreamStringAdapter ein(string(dataPos, dataEnd));
-+
-+                                                if (state && !state->undecodedBytes.empty())
-+                                                {
-+                                                        encodedBuffer = state->undecodedBytes + encodedBuffer;
-+                                                        state->undecodedBytes.clear();
-+                                                }
-+ 
-+                                                utility::inputStreamStringAdapter ein(encodedBuffer);
- 						utility::outputStreamStringAdapter eout(decodedBuffer);
- 
--						theEncoder->decode(ein, eout);
-+						const size_t decodedLen = theEncoder->decode(ein, eout);
- 						delete (theEncoder);
- 
- 						m_buffer = decodedBuffer;
-@@ -305,6 +320,21 @@
- 						if (newPosition)
- 							*newPosition = (p - buffer.begin());
- 
-+						// For Base64 encoding, ensure all bytes have been decoded.
-+						// If there are remaining bytes, keep them for the next run.
-+						//
-+						// This allows decoding some insanities like:
-+						//     =?utf-8?B?5Lit5?= =?utf-8?B?paH?=
-+						if (*encPos == 'B' || *encPos == 'b')
-+						{
-+							const size_t actualEncodedLen = encodedBuffer.length();
-+							const size_t theoricalEncodedLen =
-+								((decodedLen + ((decodedLen % 3) ? (3 - (decodedLen % 3)) : 0) ) / 3) * 4;
-+
-+							if (state && actualEncodedLen != theoricalEncodedLen)
-+								state->undecodedBytes.assign(dataPos + theoricalEncodedLen, dataEnd);
-+						}
-+
- 						return;
- 					}
- 				}
-diff -urb libvmime-0.9.2-patched/vmime/word.hpp libvmime-0.9.2/vmime/word.hpp
---- libvmime-0.9.2-patched/vmime/word.hpp	2015-01-16 15:04:04.128264216 +0100
-+++ libvmime-0.9.2/vmime/word.hpp	2015-01-16 15:05:13.672262038 +0100
-@@ -125,6 +125,20 @@
- 		bool prevWordIsEncoded;
- 		bool lastCharIsSpace;
- 	};
-+
-+	class parserState
-+	{
-+	public:
-+
-+		parserState()
-+			: prevIsEncoded(false), isFirst(true)
-+		{
-+		}
-+
-+		bool prevIsEncoded;
-+		bool isFirst;
-+		std::string undecodedBytes;
-+	};
- #endif
- 
- 
-@@ -134,13 +148,20 @@
- 	void parse(const string& buffer, const string::size_type position, const string::size_type end, string::size_type* newPosition = NULL);
- 	void generate(utility::outputStream& os, const string::size_type maxLineLength = lineLengthLimits::infinite, const string::size_type curLinePos = 0, string::size_type* newLinePos = NULL) const;
- 
-+       void parseWithState
-+               (const string& buffer,
-+                const size_t position,
-+                const size_t end,
-+                size_t* newPosition,
-+                parserState* state);
-+
- 	void generate(utility::outputStream& os, const string::size_type maxLineLength, const string::size_type curLinePos, string::size_type* newLinePos, const int flags, generatorState* state) const;
- 
- 	const std::vector <ref <const component> > getChildComponents() const;
- 
- private:
- 
--	static ref <word> parseNext(const string& buffer, const string::size_type position, const string::size_type end, string::size_type* newPosition, bool prevIsEncoded, bool* isEncoded, bool isFirst);
-+	static ref <word> parseNext(const string& buffer, const string::size_type position, const string::size_type end, string::size_type* newPosition, parserState* state);
- 
- 	static const std::vector <ref <word> > parseMultiple(const string& buffer, const string::size_type position, const string::size_type end, string::size_type* newPosition);
- 
