From 1b19b400225ddf11847eea1c2cc3c0045e2138a6 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 3 Feb 2010 10:45:17 +0000 Subject: [PATCH] Removed wide-char support. --- SConstruct | 18 ------------------ src/base.cpp | 6 ------ src/text.cpp | 15 --------------- src/word.cpp | 14 -------------- vmime/base.hpp | 3 --- vmime/text.hpp | 4 ---- vmime/types.hpp | 3 --- vmime/word.hpp | 4 ---- 8 files changed, 67 deletions(-) diff --git a/SConstruct b/SConstruct index 89b58f69..33bc2a3e 100644 --- a/SConstruct +++ b/SConstruct @@ -529,14 +529,6 @@ opts.AddOptions( 'Specifies the path to sendmail.', defaultSendmailPath ), - EnumOption( - 'with_wide_char_support', - 'Support for wide characters (rarely used, should be set to "no")', - 'no', - allowed_values = ('yes', 'no'), - map = { }, - ignorecase = 1 - ), EnumOption( 'byte_order', 'Byte order (Big Endian or Little Endian)', @@ -802,12 +794,6 @@ config_hpp.write('\n') config_hpp.write('// Options\n') -config_hpp.write('// -- Wide characters support\n') -if env['with_wide_char_support'] == 'yes': - config_hpp.write('#define VMIME_WIDE_CHAR_SUPPORT 1\n') -else: - config_hpp.write('#define VMIME_WIDE_CHAR_SUPPORT 0\n') - config_hpp.write('// -- File-system support\n') if env['with_filesystem'] == 'yes': config_hpp.write('#define VMIME_HAVE_FILESYSTEM_FEATURES 1\n') @@ -1916,8 +1902,6 @@ typedef signed ${VMIME_TYPE_INT32} vmime_int32; typedef unsigned ${VMIME_TYPE_INT32} vmime_uint32; // Options -// -- Wide characters support -#define VMIME_WIDE_CHAR_SUPPORT 0 // -- File-system support #define VMIME_HAVE_FILESYSTEM_FEATURES 1 // -- SASL support @@ -2261,8 +2245,6 @@ typedef unsigned int vmime_uint32; // Options -// -- Wide characters support -#define VMIME_WIDE_CHAR_SUPPORT 0 // -- File-system support #define VMIME_HAVE_FILESYSTEM_FEATURES 1 // -- SASL support diff --git a/src/base.cpp b/src/base.cpp index 2e47ca3c..b895985f 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -55,12 +55,6 @@ namespace vmime */ const string NULL_STRING; -#if VMIME_WIDE_CHAR_SUPPORT - /** "Null" (empty) wide-char string. - */ - const wstring NULL_WSTRING; -#endif - /** "Null" (empty) text. */ const text NULL_TEXT; diff --git a/src/text.cpp b/src/text.cpp index f9ded7ca..89a541a0 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -91,21 +91,6 @@ void text::generate(utility::outputStream& os, const string::size_type maxLineLe } -#if VMIME_WIDE_CHAR_SUPPORT - -const wstring text::getDecodedText() const -{ - wstring out; - - for (std::vector >::const_iterator i = m_words.begin() ; i != m_words.end() ; ++i) - out += (*i)->getDecodedText(); - - return (out); -} - -#endif - - void text::copyFrom(const component& other) { const text& t = dynamic_cast (other); diff --git a/src/word.cpp b/src/word.cpp index ea8244a5..4f911089 100644 --- a/src/word.cpp +++ b/src/word.cpp @@ -621,20 +621,6 @@ void word::generate(utility::outputStream& os, const string::size_type maxLineLe } -#if VMIME_WIDE_CHAR_SUPPORT - -const wstring word::getDecodedText() const -{ - wstring out; - - charset::decode(m_buffer, out, m_charset); - - return (out); -} - -#endif - - word& word::operator=(const word& w) { m_buffer = w.m_buffer; diff --git a/vmime/base.hpp b/vmime/base.hpp index ce544e19..60e637d2 100644 --- a/vmime/base.hpp +++ b/vmime/base.hpp @@ -48,9 +48,6 @@ namespace vmime // "Null" strings extern const string NULL_STRING; -#if VMIME_WIDE_CHAR_SUPPORT - extern const wstring NULL_WSTRING; -#endif extern const text NULL_TEXT; extern const word NULL_WORD; diff --git a/vmime/text.hpp b/vmime/text.hpp index 9760c48a..15e11ae6 100644 --- a/vmime/text.hpp +++ b/vmime/text.hpp @@ -129,10 +129,6 @@ public: */ const std::vector > getWordList(); - // Decoding -#if VMIME_WIDE_CHAR_SUPPORT - const wstring getDecodedText() const; -#endif /** Return the text converted into the specified charset. * The encoded-words are decoded and then converted in the diff --git a/vmime/types.hpp b/vmime/types.hpp index bdf627e6..d1137e1e 100644 --- a/vmime/types.hpp +++ b/vmime/types.hpp @@ -36,9 +36,6 @@ namespace vmime { typedef std::string string; -#if VMIME_WIDE_CHAR_SUPPORT - typedef std::wstring wstring; -#endif typedef unsigned short port_t; diff --git a/vmime/word.hpp b/vmime/word.hpp index 78a88e83..ad848eca 100644 --- a/vmime/word.hpp +++ b/vmime/word.hpp @@ -91,10 +91,6 @@ public: bool operator==(const word& w) const; bool operator!=(const word& w) const; -#if VMIME_WIDE_CHAR_SUPPORT - const wstring getDecodedText() const; -#endif - /** Return the contained text converted to the specified charset. * * @param dest output charset