File:
[ELWIX - Embedded LightWeight unIX -] /
elwix /
tools /
oldlzma /
SRC /
Common /
StringConvert.h
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 14 09:04:51 2013 UTC (11 years, 5 months ago) by
misho
Branches:
misho,
elwix1_9_mips,
MAIN
CVS tags:
start,
elwix2_8,
elwix2_7,
elwix2_6,
elwix2_3,
elwix2_2,
HEAD,
ELWIX2_7,
ELWIX2_6,
ELWIX2_5,
ELWIX2_2p0
oldlzma needs for uboot
// Common/StringConvert.h
#ifndef __COMMON_STRINGCONVERT_H
#define __COMMON_STRINGCONVERT_H
#include "MyWindows.h"
#include "Common/String.h"
#include "Types.h"
UString MultiByteToUnicodeString(const AString &srcString, UINT codePage = CP_ACP);
AString UnicodeStringToMultiByte(const UString &srcString, UINT codePage = CP_ACP);
inline const wchar_t* GetUnicodeString(const wchar_t* unicodeString)
{ return unicodeString; }
inline const UString& GetUnicodeString(const UString &unicodeString)
{ return unicodeString; }
inline UString GetUnicodeString(const AString &ansiString)
{ return MultiByteToUnicodeString(ansiString); }
inline UString GetUnicodeString(const AString &multiByteString, UINT codePage)
{ return MultiByteToUnicodeString(multiByteString, codePage); }
inline const wchar_t* GetUnicodeString(const wchar_t* unicodeString, UINT codePage)
{ return unicodeString; }
inline const UString& GetUnicodeString(const UString &unicodeString, UINT codePage)
{ return unicodeString; }
inline const char* GetAnsiString(const char* ansiString)
{ return ansiString; }
inline const AString& GetAnsiString(const AString &ansiString)
{ return ansiString; }
inline AString GetAnsiString(const UString &unicodeString)
{ return UnicodeStringToMultiByte(unicodeString); }
inline const char* GetOemString(const char* oemString)
{ return oemString; }
inline const AString& GetOemString(const AString &oemString)
{ return oemString; }
inline AString GetOemString(const UString &unicodeString)
{ return UnicodeStringToMultiByte(unicodeString, CP_OEMCP); }
#ifdef _UNICODE
inline const wchar_t* GetSystemString(const wchar_t* unicodeString)
{ return unicodeString;}
inline const UString& GetSystemString(const UString &unicodeString)
{ return unicodeString;}
inline const wchar_t* GetSystemString(const wchar_t* unicodeString, UINT codePage)
{ return unicodeString;}
inline const UString& GetSystemString(const UString &unicodeString, UINT codePage)
{ return unicodeString;}
inline UString GetSystemString(const AString &multiByteString, UINT codePage)
{ return MultiByteToUnicodeString(multiByteString, codePage);}
inline UString GetSystemString(const AString &multiByteString)
{ return MultiByteToUnicodeString(multiByteString);}
#else
inline const char* GetSystemString(const char *ansiString)
{ return ansiString; }
inline const AString& GetSystemString(const AString &multiByteString, UINT codePage)
{ return multiByteString; }
inline const char * GetSystemString(const char *multiByteString, UINT codePage)
{ return multiByteString; }
inline AString GetSystemString(const UString &unicodeString)
{ return UnicodeStringToMultiByte(unicodeString); }
inline AString GetSystemString(const UString &unicodeString, UINT codePage)
{ return UnicodeStringToMultiByte(unicodeString, codePage); }
#endif
#ifndef _WIN32_WCE
AString SystemStringToOemString(const CSysString &srcString);
#endif
#endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>