diff options
| author | nyamatongwe <unknown> | 2010-03-25 23:49:46 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2010-03-25 23:49:46 +0000 | 
| commit | c42b517cbf2c7e85b3f0528fc130a349f391f888 (patch) | |
| tree | d58a5d12d6dc2fe37ffec914c98f65cec2792d7b /gtk/Converter.h | |
| parent | 295013083c4e9454656c0e94ab977057ee55ea11 (diff) | |
| download | scintilla-mirror-c42b517cbf2c7e85b3f0528fc130a349f391f888.tar.gz | |
Removed support for GTK+ 1.x.
Diffstat (limited to 'gtk/Converter.h')
| -rw-r--r-- | gtk/Converter.h | 19 | 
1 files changed, 1 insertions, 18 deletions
diff --git a/gtk/Converter.h b/gtk/Converter.h index d3038a2f2..8e7e3e9ef 100644 --- a/gtk/Converter.h +++ b/gtk/Converter.h @@ -3,12 +3,7 @@  // Copyright 2004 by Neil Hodgson <neilh@scintilla.org>  // The License.txt file describes the conditions under which this software may be distributed. -#include <iconv.h> -#if GTK_MAJOR_VERSION >= 2 -	typedef GIConv ConverterHandle; -#else -	typedef iconv_t ConverterHandle; -#endif +typedef GIConv ConverterHandle;  const ConverterHandle iconvhBad = (ConverterHandle)(-1);  // Since various versions of iconv can not agree on whether the src argument  // is char ** or const char ** provide a templatised adaptor. @@ -24,11 +19,7 @@ size_t iconv_adaptor(size_t(*f_iconv)(ConverterHandle, T, size_t *, char **, siz  class Converter {  	ConverterHandle iconvh;  	void OpenHandle(const char *fullDestination, const char *charSetSource) { -#if GTK_MAJOR_VERSION >= 2  		iconvh = g_iconv_open(fullDestination, charSetSource); -#else -		iconvh = iconv_open(fullDestination, charSetSource); -#endif  	}  	bool Succeeded() const {  		return iconvh != iconvhBad; @@ -65,11 +56,7 @@ public:  	}  	void Close() {  		if (Succeeded()) { -#if GTK_MAJOR_VERSION >= 2  			g_iconv_close(iconvh); -#else -			iconv_close(iconvh); -#endif  			iconvh = iconvhBad;  		}  	} @@ -77,11 +64,7 @@ public:  		if (!Succeeded()) {  			return (size_t)(-1);  		} else { -#if GTK_MAJOR_VERSION >= 2  			return iconv_adaptor(g_iconv, iconvh, src, srcleft, dst, dstleft); -#else -			return iconv_adaptor(iconv, iconvh, src, srcleft, dst, dstleft); -#endif  		}  	}  };  | 
