#ifndef _KVI_WSTRING_CONFIG_H_
#define _KVI_WSTRING_CONFIG_H_

//=============================================================================
//
//   File : kvi_wstring_config.h
//   Creation date : Wed 04 Dec 2002 19:33:00 by Szymon Stefanek
//
//   This file is part of the KVirc irc client distribution
//   Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)
//
//   This program is FREE software. You can redistribute it and/or
//   modify it under the terms of the GNU General Public License
//   as published by the Free Software Foundation; either version 2
//   of the License, or (at your opinion) any later version.
//
//   This program is distributed in the HOPE that it will be USEFUL,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//   See the GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with this program. If not, write to the Free Software Foundation,
//   Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
//=============================================================================

// this is the version of the KviWStr class
// the format is 0xMMmmrr where MM is the major version , mm is the minor
// version and rr is the revision
#define WSTRINGCONFIG_VERSION 0x010000

// define this if this library is compiled within the KVIrc IRC client sources
// this will adjust the final configuration to match the global
// configuration settins
#define WSTRINGCONFIG_COMPILE_FOR_KVIRC

// define if you want to use the Qt library from TrollTech
#define WSTRINGCONFIG_USE_QT

// define if you think that it is safe to memcpy a QChar to a kvi_wchar_t
// useless if WSTRINGCONFIG_USE_QT is not defined
#define WSTRINGCONFIG_SAFE_TO_MEMCPY_QCHAR


// define if you want to use the KviStr ASCII string implementation
#define WSTRINGCONFIG_USE_KVISTR

// define if you want to use the kvi_malloc, kvi_realloc and kvi_free
// routines instead of plain malloc, realloc and free from <stdlib.h>
#define WSTRINGCONFIG_USE_KVIMALLOC

// define if you want to use kvi_memmove , kvi_fastmove and kvi_memset
// instead of memmove, memcpy and memset from <string.h>
#define WSTRINGCONFIG_USE_KVIMEMMOVE

// define if you want the assembly implementation for some functions
// like wstrlen & co. : this works only for GCC
#define WSTRINGCONFIG_USE_GCC_i386_ASM

// define if you want to use kvi_strLen instead of strlen
#define WSTRINGCONFIG_USE_KVISTRLEN

// define if you want the wide string length type to be unsigned
#define WSTRINGCONFIG_WSLEN_UNSIGNED

// define if you want to use the inline keyword
#define WSTRINGCONFIG_USE_INLINE



//=============================================================================
// INTERNALS
//=============================================================================

#ifdef WSTRINGCONFIG_COMPILE_FOR_KVIRC
	#ifdef __WSTRINGLIB__
		#define __LIBKVILIB__
	#endif // _WSTRING_LIBRARY_

	#include "kvi_settings.h"

	#define _WSTRING_API KVILIB_API
#else // !WSTRINGCONFIG_COMPILEFOR_KVIRC
	#define _WSTRING_API
#endif // !WSTRINGCONFIG_COMPILEFOR_KVIRC

#ifdef WSTRINGCONFIG_COMPILE_FOR_KVIRC
	#ifdef WSTRINGCONFIG_USE_GCC_ix86_ASM
		#ifndef COMPILE_ix86_ASM
			// kvirc compilation uses this global switch to control asm stuff
			#undef WSTRINGCONFIG_USE_GCC_ix86_ASM
		#endif // !COMPILE_ix86_ASM
	#else // !WSTRINGCONFIG_USE_GCC_ix86_ASM
		#ifdef COMPILE_ix86_ASM
			// kvirc compilation uses this global switch to control asm stuff
			#define WSTRINGCONFIG_USE_GCC_ix86_ASM
		#endif // !COMPILE_ix86_ASM
	#endif // !WSTRINGCONFIG_USE_GCC_ix86_ASM
#endif // WSTRINGCONFIG_COMPILE_FOR_KVIRC

#ifdef WSTRINGCONFIG_USE_INLINE
	#define _WSTRING_INLINE inline
#else // !WSTRINGCONFIG_USE_INLINE
	#define _WSTRING_INLINE
#endif // !WSTRINGCONFIG_USE_INLINE

#ifdef WSTRINGCONFIG_USE_QT
	#ifdef WSTRINGCONFIG_SAFE_TO_MEMCPY_QCHAR
		#include <qglobal.h>
		#ifdef QT_QSTRING_UCS_4
			// We can't copy UCS 4 strings: the user was just wrong
			#undef WSTRINGCONFIG_SAFE_TO_MEMCPY_QCHAR
		#endif // QT_STRING_UCS_4
	#endif // WSTRINGCONFIG_SAFE_TO_MEMCPY_QCHAR
#endif // WSTRINGCONFIG_USE_QT

#endif // _KVI_WSTRING_CONFIG_H_
