2
0
Rob Parolin 6 жил өмнө
parent
commit
6f4edf10d8

+ 31 - 35
include/EAStdC/EACType.h

@@ -38,108 +38,104 @@
 #include <EAStdC/internal/Config.h>
 
 
-#ifndef EA_WCHAR_UNIQUE
-#define EA_WCHAR_UNIQUE 0
-#endif
-
 
 namespace EA
 {
 namespace StdC
 {
 
-	EASTDC_API int      Isalnum(char8_t c);
+	EASTDC_API int      Isalnum(char c);
 	EASTDC_API int      Isalnum(char16_t c);
 	EASTDC_API int      Isalnum(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API int  Isalnum(wchar_t c);
 	#endif
 
-	EASTDC_API int      Isalpha(char8_t c);
+	EASTDC_API int      Isalpha(char c);
 	EASTDC_API int      Isalpha(char16_t c);
 	EASTDC_API int      Isalpha(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API int  Isalpha(wchar_t c);
 	#endif
 
-	EASTDC_API int      Isdigit(char8_t c);
+	EASTDC_API int      Isdigit(char c);
 	EASTDC_API int      Isdigit(char16_t c);
 	EASTDC_API int      Isdigit(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API int  Isdigit(wchar_t c);
 	#endif
 
-	EASTDC_API int      Isxdigit(char8_t c);
+	EASTDC_API int      Isxdigit(char c);
 	EASTDC_API int      Isxdigit(char16_t c);
 	EASTDC_API int      Isxdigit(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API int  Isxdigit(wchar_t c);
 	#endif
 
-	EASTDC_API int      Isgraph(char8_t c);
+	EASTDC_API int      Isgraph(char c);
 	EASTDC_API int      Isgraph(char16_t c);
 	EASTDC_API int      Isgraph(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API int  Isgraph(wchar_t c);
 	#endif
 
-	EASTDC_API int      Islower(char8_t c);
+	EASTDC_API int      Islower(char c);
 	EASTDC_API int      Islower(char16_t c);
 	EASTDC_API int      Islower(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API int  Islower(wchar_t c);
 	#endif
 
-	EASTDC_API char8_t  Tolower(char8_t c);
+	EASTDC_API char  Tolower(char c);
 	EASTDC_API char16_t Tolower(char16_t c);
 	EASTDC_API char32_t Tolower(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API wchar_t  Tolower(wchar_t c);
 	#endif
 
-	EASTDC_API int      Isupper(char8_t c);
+	EASTDC_API int      Isupper(char c);
 	EASTDC_API int      Isupper(char16_t c);
 	EASTDC_API int      Isupper(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API int  Isupper(wchar_t c);
 	#endif
 
-	EASTDC_API char8_t  Toupper(char8_t c);
+	EASTDC_API char  Toupper(char c);
 	EASTDC_API char16_t Toupper(char16_t c);
 	EASTDC_API char32_t Toupper(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API wchar_t  Toupper(wchar_t c);
 	#endif
 
-	EASTDC_API int      Isprint(char8_t c);
+	EASTDC_API int      Isprint(char c);
 	EASTDC_API int      Isprint(char16_t c);
 	EASTDC_API int      Isprint(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API int  Isprint(wchar_t c);
 	#endif
 
-	EASTDC_API int      Ispunct(char8_t c);
+	EASTDC_API int      Ispunct(char c);
 	EASTDC_API int      Ispunct(char16_t c);
 	EASTDC_API int      Ispunct(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API int  Ispunct(wchar_t c);
 	#endif
 
-	EASTDC_API int      Isspace(char8_t c);
+	EASTDC_API int      Isspace(char c);
 	EASTDC_API int      Isspace(char16_t c);
 	EASTDC_API int      Isspace(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API int  Isspace(wchar_t c);
 	#endif
 
-	EASTDC_API int      Iscntrl(char8_t c);
+	EASTDC_API int      Iscntrl(char c);
 	EASTDC_API int      Iscntrl(char16_t c);
 	EASTDC_API int      Iscntrl(char32_t c);
 	#if EA_WCHAR_UNIQUE
 		EASTDC_API int  Iscntrl(wchar_t c);
 	#endif
 
-	EASTDC_API int      Isascii(char8_t c);
+	EASTDC_API int      Isascii(char c);
 	EASTDC_API int      Isascii(char16_t c);
 	EASTDC_API int      Isascii(char32_t c);
 	#if EA_WCHAR_UNIQUE
@@ -183,7 +179,7 @@ namespace StdC
 
 
 
-	inline int Isalnum(char8_t c) // char8_t is the same as char -- it is a signed or unsigned 8 bit value
+	inline int Isalnum(char c) // char is the same as char -- it is a signed or unsigned 8 bit value
 	{
 		return EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_ALNUM;
 	}
@@ -207,7 +203,7 @@ namespace StdC
 
 
 
-	inline int Isalpha(char8_t c)
+	inline int Isalpha(char c)
 	{
 		return EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_ALPHA;
 	}
@@ -230,7 +226,7 @@ namespace StdC
 	#endif
 
 
-	inline int Isdigit(char8_t c)
+	inline int Isdigit(char c)
 	{
 		return EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_DIGIT;
 
@@ -263,7 +259,7 @@ namespace StdC
 
 
 
-	inline int Isxdigit(char8_t c)
+	inline int Isxdigit(char c)
 	{
 		return EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_XDIGIT;
 	}
@@ -287,7 +283,7 @@ namespace StdC
 
 
 
-	inline int Isgraph(char8_t c)
+	inline int Isgraph(char c)
 	{
 		return EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_GRAPH;
 	}
@@ -310,7 +306,7 @@ namespace StdC
 	#endif
 
 
-	inline int Islower(char8_t c)
+	inline int Islower(char c)
 	{
 		return EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_LOWER;
 	}
@@ -334,9 +330,9 @@ namespace StdC
 
 
 
-	inline char8_t Tolower(char8_t c)
+	inline char Tolower(char c)
 	{
-		return (char8_t)EASTDC_WLOWER_MAP[(uint8_t)c];
+		return (char)EASTDC_WLOWER_MAP[(uint8_t)c];
 	}
 
 	inline char16_t Tolower(char16_t c)
@@ -357,9 +353,9 @@ namespace StdC
 	#endif
 
 
-	inline int Isupper(char8_t c)
+	inline int Isupper(char c)
 	{
-		return (char8_t)EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_UPPER;
+		return (char)EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_UPPER;
 	}
 
 	inline int Isupper(char16_t c)
@@ -380,9 +376,9 @@ namespace StdC
 	#endif
 
 
-	inline char8_t Toupper(char8_t c)
+	inline char Toupper(char c)
 	{
-		return (char8_t)EASTDC_WUPPER_MAP[(uint8_t)c];
+		return (char)EASTDC_WUPPER_MAP[(uint8_t)c];
 	}
 
 	inline char16_t Toupper(char16_t c)
@@ -403,7 +399,7 @@ namespace StdC
 	#endif
 
 
-	inline int Isprint(char8_t c) 
+	inline int Isprint(char c) 
 	{
 		return EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_PRINT;
 	}
@@ -426,7 +422,7 @@ namespace StdC
 	#endif
 
 
-	inline int Ispunct(char8_t c)
+	inline int Ispunct(char c)
 	{
 		return EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_PUNCT;
 	}
@@ -449,7 +445,7 @@ namespace StdC
 	#endif
 
 
-	inline int Isspace(char8_t c)
+	inline int Isspace(char c)
 	{
 		return EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_SPACE;
 	}
@@ -472,7 +468,7 @@ namespace StdC
 	#endif
 
 
-	inline int Iscntrl(char8_t c)
+	inline int Iscntrl(char c)
 	{
 		return EASTDC_WCTYPE_MAP[(uint8_t)c] & EASTDC_WCTYPE_CONTROL;
 	}
@@ -495,7 +491,7 @@ namespace StdC
 	#endif
 
 
-	inline int Isascii(char8_t c)
+	inline int Isascii(char c)
 	{
 		return (uint8_t)c < 0x80;
 	}

+ 1 - 1
include/EAStdC/EADateTime.h

@@ -572,7 +572,7 @@ namespace StdC
 	/// The returned string isn't guaranteed to match equivalent results from other platforms.
 	/// The return value will be false in the case that EASTDC_UTC_TIME_AVAILABLE == 0.
 	enum { kTimeZoneNameCapacity = 64 };
-	EASTDC_API bool GetTimeZoneName(char8_t* pName, bool bDaylightSavingsName);
+	EASTDC_API bool GetTimeZoneName(char* pName, bool bDaylightSavingsName);
 
 	/// DateTimeToTm
 	/// Converts a DateTime to a C tm struct.

+ 5 - 5
include/EAStdC/EAHashString.h

@@ -5,11 +5,11 @@
 /////////////////////////////////////////////////////////////////////////////
 // Defines the following:
 //    uint32_t FNV1         (const void*     pData, size_t nLength, uint32_t nInitialValue = kFNV1InitialValue);
-//    uint32_t FNV1_String8 (const char8_t*  pData, uint32_t nInitialValue = kFNV1InitialValue, CharCase charCase = kCharCaseAny);
+//    uint32_t FNV1_String8 (const char*  pData, uint32_t nInitialValue = kFNV1InitialValue, CharCase charCase = kCharCaseAny);
 //    uint32_t FNV1_String16(const char16_t* pData, uint32_t nInitialValue = kFNV1InitialValue, CharCase charCase = kCharCaseAny);
 //    
 //    uint64_t FNV64         (const void*     pData, size_t nLength, uint64_t nInitialValue = kFNV1InitialValue);
-//    uint64_t FNV64_String8 (const char8_t*  pData, uint64_t nInitialValue = kFNV1InitialValue, CharCase charCase = kCharCaseAny);
+//    uint64_t FNV64_String8 (const char*  pData, uint64_t nInitialValue = kFNV1InitialValue, CharCase charCase = kCharCaseAny);
 //    uint64_t FNV64_String16(const char16_t* pData, uint64_t nInitialValue = kFNV1InitialValue, CharCase charCase = kCharCaseAny);
 //    
 //    template<> class CTStringHash;
@@ -78,7 +78,7 @@ namespace StdC
 	const uint32_t kFNV1InitialValue = 2166136261U;
 
 	EASTDC_API uint32_t FNV1         (const void*     pData, size_t nLength, uint32_t nInitialValue = kFNV1InitialValue);
-	EASTDC_API uint32_t FNV1_String8 (const char8_t*  pData, uint32_t nInitialValue = kFNV1InitialValue, CharCase charCase = kCharCaseAny);
+	EASTDC_API uint32_t FNV1_String8 (const char*  pData, uint32_t nInitialValue = kFNV1InitialValue, CharCase charCase = kCharCaseAny);
 	EASTDC_API uint32_t FNV1_String16(const char16_t* pData, uint32_t nInitialValue = kFNV1InitialValue, CharCase charCase = kCharCaseAny);
 	EASTDC_API uint32_t FNV1_String32(const char32_t* pData, uint32_t nInitialValue = kFNV1InitialValue, CharCase charCase = kCharCaseAny);
 
@@ -88,7 +88,7 @@ namespace StdC
 	const uint64_t kFNV64InitialValue = UINT64_C(14695981039346656037);
 
 	EASTDC_API uint64_t FNV64         (const void*     pData, size_t nLength, uint64_t nInitialValue = kFNV64InitialValue);
-	EASTDC_API uint64_t FNV64_String8 (const char8_t*  pData, uint64_t nInitialValue = kFNV64InitialValue, CharCase charCase = kCharCaseAny);
+	EASTDC_API uint64_t FNV64_String8 (const char*  pData, uint64_t nInitialValue = kFNV64InitialValue, CharCase charCase = kCharCaseAny);
 	EASTDC_API uint64_t FNV64_String16(const char16_t* pData, uint64_t nInitialValue = kFNV64InitialValue, CharCase charCase = kCharCaseAny);
 	EASTDC_API uint64_t FNV64_String32(const char32_t* pData, uint64_t nInitialValue = kFNV64InitialValue, CharCase charCase = kCharCaseAny);
 
@@ -98,7 +98,7 @@ namespace StdC
 	const uint32_t kDJB2InitialValue = 5381;
 
 	EASTDC_API uint32_t DJB2         (const void*     pData, size_t nLength, uint32_t nInitialValue = kDJB2InitialValue);
-	EASTDC_API uint32_t DJB2_String8 (const char8_t*  pData, uint32_t nInitialValue = kDJB2InitialValue, CharCase charCase = kCharCaseAny);
+	EASTDC_API uint32_t DJB2_String8 (const char*  pData, uint32_t nInitialValue = kDJB2InitialValue, CharCase charCase = kCharCaseAny);
 	EASTDC_API uint32_t DJB2_String16(const char16_t* pData, uint32_t nInitialValue = kDJB2InitialValue, CharCase charCase = kCharCaseAny);
 
 

+ 16 - 36
include/EAStdC/EAMemory.h

@@ -17,15 +17,15 @@
 // work on this kind of memory and you can instead use the regular functions
 // such as Memcpy for uncacheable memory.
 //
-//      char8_t*    Memcpy     (void* pDestination, const void* pSource, size_t n);
-//      char8_t*    MemcpyC    (void* pDestination, const void* pSource, size_t n);     // Faster version for cacheable memory (and not video memory).
-//      char8_t*    MemcpyS    (void* pDestination, const void* pSource, size_t n);     // Streaming memory copy, doesn't invalidate the cache.
-//      char8_t*    Memcpy128  (void* pDestination, const void* pSource, size_t n);
-//      char8_t*    Memcpy128C (void* pDestination, const void* pSource, size_t n);     // Faster version for cacheable memory (and not video memory).
-//      char8_t*    Memmove    (void* pDestination, const void* pSource, size_t n);
-//      char8_t*    MemmoveC   (void* pDestination, const void* pSource, size_t n);     // Faster version for cacheable memory (and not video memory).
+//      char*    Memcpy     (void* pDestination, const void* pSource, size_t n);
+//      char*    MemcpyC    (void* pDestination, const void* pSource, size_t n);     // Faster version for cacheable memory (and not video memory).
+//      char*    MemcpyS    (void* pDestination, const void* pSource, size_t n);     // Streaming memory copy, doesn't invalidate the cache.
+//      char*    Memcpy128  (void* pDestination, const void* pSource, size_t n);
+//      char*    Memcpy128C (void* pDestination, const void* pSource, size_t n);     // Faster version for cacheable memory (and not video memory).
+//      char*    Memmove    (void* pDestination, const void* pSource, size_t n);
+//      char*    MemmoveC   (void* pDestination, const void* pSource, size_t n);     // Faster version for cacheable memory (and not video memory).
 //
-//      const void* Memchr(const void* p, char8_t c, size_t n);
+//      const void* Memchr(const void* p, char c, size_t n);
 //      int         Memcmp(const void* p1, const void* p2, size_t n);
 //      void*       Memmem(const void* pMemory, size_t memorySize, const void* pFind, size_t findSize);
 //
@@ -347,14 +347,14 @@ namespace StdC
 	/// must be writable. 
 	/// Works with uncacheable memory, such as video memory. 
 	///
-	EASTDC_API char8_t* Memcpy(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount);
+	EASTDC_API char* Memcpy(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount);
 
 	// Cacheable memory copy
 	// Works only with cacheable memory (i.e. conventional system memory).
 	// The source and destination memory must not overlap.
 	// Cannot be relied on to work with uncachable memory, such as video memory.
 	// There are no alignment restrictions on either pDestination or pSource.
-	EASTDC_API char8_t* MemcpyC(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount);
+	EASTDC_API char* MemcpyC(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount);
 
 	// Streaming memcpy
 	// This function copies memory from source to destination without filling the cache with the memory.
@@ -363,7 +363,7 @@ namespace StdC
 	// Works on both cacheable and uncacheable memory.
 	// The source and destination memory must not overlap.
 	// There are no alignment restrictions on either pDestination or pSource.
-	EASTDC_API char8_t* MemcpyS(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount);
+	EASTDC_API char* MemcpyS(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount);
 
 
 	///////////////////////////////////////////////////////////////////////////
@@ -379,14 +379,14 @@ namespace StdC
 	/// that allocated with VirtualAlloc(..., PAGE_NOCACHE) or VirtualAlloc(..., PAGE_WRITECOMBINE).
 	/// In fact, on XBox 360 this function is the same as XMemCpy128.
 	///
-	EASTDC_API char8_t* Memcpy128(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount);
+	EASTDC_API char* Memcpy128(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount);
 
 	// cacheable 128 byte memcpy
 	// This function is useful for higher performance memory copies when the requirements can be met.
 	// The address pointed to by pDestination must be aligned on a 128-byte boundary, and uint8Count must be a multiple of 128.
 	// Works only with cacheable memory (i.e. conventional system memory).
 	// The source and destination memory must not overlap.
-	EASTDC_API char8_t* Memcpy128C(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount);
+	EASTDC_API char* Memcpy128C(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount);
 
 
 	///////////////////////////////////////////////////////////////////////////
@@ -400,13 +400,13 @@ namespace StdC
 	/// must be writable. 
 	/// Works with uncacheable memory, such as video memory.
 	///
-	EASTDC_API char8_t* Memmove(void* pDestination, const void* pSource, size_t nByteCount);
+	EASTDC_API char* Memmove(void* pDestination, const void* pSource, size_t nByteCount);
 
 	// Cacheable memory move
 	// Works only with cacheable memory (i.e. conventional system memory).
 	// The source and destination memory may overlap.
 	// Cannot be relied on to work with uncachable memory, such as video memory.
-	EASTDC_API char8_t* MemmoveC(void* pDestination, const void* pSource, size_t nByteCount);
+	EASTDC_API char* MemmoveC(void* pDestination, const void* pSource, size_t nByteCount);
 
 
 	///////////////////////////////////////////////////////////////////////////
@@ -419,7 +419,7 @@ namespace StdC
 	/// There are no restrictions about the type of memory p refers
 	/// to except that it be readable.
 	///
-	EASTDC_API const char8_t*  Memchr  (const char8_t*  p, char8_t c,  size_t n);
+	EASTDC_API const char*     Memchr  (const char*  p,    char c,     size_t n);
 	EASTDC_API const char16_t* Memchr16(const char16_t* p, char16_t c, size_t n);
 	EASTDC_API const char32_t* Memchr32(const char32_t* p, char32_t c, size_t n);
 	#if EA_WCHAR_UNIQUE
@@ -576,26 +576,6 @@ namespace StdC
 	EASTDC_API void MemFillSpecific(void* pDestination, const void* pSource, unsigned int destByteCount, unsigned int sourceByteCount);
 
 
-	///////////////////////////////////////////////////////////////////////////
-	/// rwstdc compatibility
-	///
-	/// Deprecated functions.
-	///
-	#if EASTDC_MEMCHR16_ENABLED
-		// This function is deprecated and replaced by Memchr16, as it collides with the Standard C memchr 
-		// function which takes a void* argument.
-		EA_PREFIX_DEPRECATED EASTDC_API const char16_t* Memchr(const char16_t* pString, char16_t c, size_t nCharCount);
-	#endif
-
-	#if EASTDC_MEMCPY16_ENABLED
-		// These function are deprecated. It was mistakenly created during a code migration.
-		// It is scheduled for removal in a future version of this package.
-		EA_PREFIX_DEPRECATED EASTDC_API char16_t* Memcpy(char16_t* pDestination, const char16_t* pSource, size_t nCharCount) EA_POSTFIX_DEPRECATED;
-		EA_PREFIX_DEPRECATED EASTDC_API char16_t* Memmove(char16_t* pDestination, const char16_t* pSource, size_t nCharCount) EA_POSTFIX_DEPRECATED;
-		EA_PREFIX_DEPRECATED EASTDC_API int       Memcmp(const char16_t* pString1, const char16_t* pString2, size_t nCharCount) EA_POSTFIX_DEPRECATED;
-	#endif
-
-
 	/// StaticMemory
 	///
 	/// Allows you to declare memory that's sized and aligned appropriately and 

+ 9 - 9
include/EAStdC/EAProcess.h

@@ -72,7 +72,7 @@ namespace EA
 		///     GetCurrentProcessPath(path, IO::kMaxPathLength);
 		///     printf("Path: %ls\n", path);
 		///
-		EASTDC_API size_t GetCurrentProcessPath(char8_t*  pPath, int pathCapacity = kMaxPathLength, int pathFlags = kPathFlagNone);
+		EASTDC_API size_t GetCurrentProcessPath(char*  pPath, int pathCapacity = kMaxPathLength, int pathFlags = kPathFlagNone);
 		EASTDC_API size_t GetCurrentProcessPath(char16_t* pPath, int pathCapacity = kMaxPathLength, int pathFlags = kPathFlagNone);
 		EASTDC_API size_t GetCurrentProcessPath(char32_t* pPath, int pathCapacity = kMaxPathLength, int pathFlags = kPathFlagNone);
 		#if defined(EA_WCHAR_UNIQUE) && EA_WCHAR_UNIQUE
@@ -86,7 +86,7 @@ namespace EA
 		/// to know it without being told. Subsequent calls to GetCurrentProcessPath with flags other
 		/// than kPathFlagNone will ignore such flags and simply return this path.
 		///
-		EASTDC_API void SetCurrentProcessPath(const char8_t* pPath);
+		EASTDC_API void SetCurrentProcessPath(const char* pPath);
 
 
 		/// GetCurrentProcessDirectory
@@ -108,7 +108,7 @@ namespace EA
 		///     GetCurrentProcessDirectory(dir, IO::kMaxDirectoryLength);
 		///     printf("Directory: %ls\n", dir);
 		///
-		EASTDC_API size_t GetCurrentProcessDirectory(char8_t*  pDirectory, int pathCapacity = kMaxDirectoryLength, int pathFlags = kPathFlagNone);
+		EASTDC_API size_t GetCurrentProcessDirectory(char*  pDirectory, int pathCapacity = kMaxDirectoryLength, int pathFlags = kPathFlagNone);
 		EASTDC_API size_t GetCurrentProcessDirectory(char16_t* pDirectory, int pathCapacity = kMaxDirectoryLength, int pathFlags = kPathFlagNone);
 		EASTDC_API size_t GetCurrentProcessDirectory(char32_t* pDirectory, int pathCapacity = kMaxDirectoryLength, int pathFlags = kPathFlagNone);
 		#if defined(EA_WCHAR_UNIQUE) && EA_WCHAR_UNIQUE
@@ -143,7 +143,7 @@ namespace EA
 		///     if(GetEnvironmentVar(L"UserName", pValue, 64) < 64)
 		///         printf("Path: %ls\n", pValue);
 		///
-		EASTDC_API size_t GetEnvironmentVar(const char8_t*  pName, char8_t*  pValue, size_t valueCapacity);
+		EASTDC_API size_t GetEnvironmentVar(const char*  pName, char*  pValue, size_t valueCapacity);
 		EASTDC_API size_t GetEnvironmentVar(const char16_t* pName, char16_t* pValue, size_t valueCapacity);
 		EASTDC_API size_t GetEnvironmentVar(const char32_t* pName, char32_t* pValue, size_t valueCapacity);
 		#if defined(EA_WCHAR_UNIQUE) && EA_WCHAR_UNIQUE
@@ -165,7 +165,7 @@ namespace EA
 		///     if(SetEnvironmentVar("User Name", "Lance Armstrong"))
 		///         printf("Success setting user name.\n");
 		///
-		EASTDC_API bool SetEnvironmentVar(const char8_t*  pName, const char8_t*  pValue);
+		EASTDC_API bool SetEnvironmentVar(const char*  pName, const char*  pValue);
 		EASTDC_API bool SetEnvironmentVar(const char16_t* pName, const char16_t* pValue);
 		EASTDC_API bool SetEnvironmentVar(const char32_t* pName, const char32_t* pValue);
 		#if defined(EA_WCHAR_UNIQUE) && EA_WCHAR_UNIQUE
@@ -199,7 +199,7 @@ namespace EA
 		///   const char16_t* ptrArray[4] = { EA_CHAR16("/System/Utilities/PingSomeAddresses.exe"), EA_CHAR16("www.bozo.com"), EA_CHAR16("www.nifty.com"), NULL };
 		///   int nReturnValue = Spawn("/System/Utilities/PingSomeAddresses.exe", ptrArray, true);
 		///
-		EASTDC_API int Spawn(const char8_t*  pPath, const char8_t*  const* pArgumentArray, bool wait = false);
+		EASTDC_API int Spawn(const char*  pPath, const char*  const* pArgumentArray, bool wait = false);
 		EASTDC_API int Spawn(const char16_t* pPath, const char16_t* const* pArgumentArray, bool wait = false);
 		EASTDC_API int Spawn(const char32_t* pPath, const char32_t* const* pArgumentArray, bool wait = false);
 		#if defined(EA_WCHAR_UNIQUE) && EA_WCHAR_UNIQUE
@@ -221,7 +221,7 @@ namespace EA
 		///
 		///    ExecuteShellCommand("su root\nrm /* -r");
 		///
-		EASTDC_API int ExecuteShellCommand(const char8_t*  pCommand);
+		EASTDC_API int ExecuteShellCommand(const char*  pCommand);
 		EASTDC_API int ExecuteShellCommand(const char16_t* pCommand);
 		EASTDC_API int ExecuteShellCommand(const char32_t* pCommand);
 		#if defined(EA_WCHAR_UNIQUE) && EA_WCHAR_UNIQUE
@@ -255,7 +255,7 @@ namespace EA
 		///     if(SearchEnvironmentPath("perforce.exe", fullPath, "PATH"))
 		///         printf("Full path to Perforce is "%ls\n", fullPath);
 		///
-		EASTDC_API bool SearchEnvironmentPath(const char8_t*  pFileName, char8_t*  pPath, const char8_t*  pEnvironmentVar = NULL);
+		EASTDC_API bool SearchEnvironmentPath(const char*  pFileName, char*  pPath, const char*  pEnvironmentVar = NULL);
 		EASTDC_API bool SearchEnvironmentPath(const char16_t* pFileName, char16_t* pPath, const char16_t* pEnvironmentVar = NULL);
 		EASTDC_API bool SearchEnvironmentPath(const char32_t* pFileName, char32_t* pPath, const char32_t* pEnvironmentVar = NULL);
 		#if defined(EA_WCHAR_UNIQUE) && EA_WCHAR_UNIQUE
@@ -277,7 +277,7 @@ namespace EA
 		///    OpenFile("/system/settings/somefile.html");
 		///    OpenFile("http://www.bozo.com/somefile.html");
 		///
-		EASTDC_API bool OpenFile(const char8_t*  pPath);
+		EASTDC_API bool OpenFile(const char*  pPath);
 		EASTDC_API bool OpenFile(const char16_t* pPath);
 		EASTDC_API bool OpenFile(const char32_t* pPath);
 		#if defined(EA_WCHAR_UNIQUE) && EA_WCHAR_UNIQUE

+ 12 - 12
include/EAStdC/EAScanf.h

@@ -100,7 +100,7 @@ namespace StdC
 	// of ReadFunction implementations.
 	//
 	// UTF8 multi-byte characters should be returned as their unsigned value.
-	// Thus even though char8_t is signed, all characters are read and written
+	// Thus even though char is signed, all characters are read and written
 	// as if they are uint8_t. The only time a negative value should be used is
 	// in the case of a -1 return value. This situation exists because it 
 	// exists as such with the C Standard Library, for better or worse.
@@ -111,7 +111,7 @@ namespace StdC
 	// ReadFunction16
 	//
 	// This function is currently identical to ReadFunction8 with the exception
-	// that kReadActionBegin will specify char16_t characters instead of char8_t. 
+	// that kReadActionBegin will specify char16_t characters instead of char. 
 	//
 	typedef int (*ReadFunction16)(ReadAction readAction, int value, void* pContext);
 
@@ -119,7 +119,7 @@ namespace StdC
 	// ReadFunction32
 	//
 	// This function is currently identical to ReadFunction8 with the exception
-	// that kReadActionBegin will specify char32_t characters instead of char8_t. 
+	// that kReadActionBegin will specify char32_t characters instead of char. 
 	//
 	typedef int (*ReadFunction32)(ReadAction readAction, int value, void* pContext);
 
@@ -127,7 +127,7 @@ namespace StdC
 	// ReadFunctionW
 	//
 	// This function is currently identical to ReadFunction8 with the exception
-	// that kReadActionBegin will specify wchar_t characters instead of char8_t. 
+	// that kReadActionBegin will specify wchar_t characters instead of char. 
 	//
 	typedef int (*ReadFunctionW)(ReadAction readAction, int value, void* pContext);
 
@@ -148,10 +148,10 @@ namespace StdC
 	///////////////////////////////////////////////////////////////////////////////
 	/// Scanf
 	///
-	EASTDC_API int Cscanf(ReadFunction8 pReadFunction8, void* pContext, const char8_t* pFormat, ...);
-	EASTDC_API int Fscanf(FILE* pFile, const char8_t* pFormat, ...);
-	EASTDC_API int Scanf(const char8_t* pFormat, ...);
-	EASTDC_API int Sscanf(const char8_t*  pTextBuffer, const char8_t* pFormat, ...);
+	EASTDC_API int Cscanf(ReadFunction8 pReadFunction8, void* pContext, const char* pFormat, ...);
+	EASTDC_API int Fscanf(FILE* pFile, const char* pFormat, ...);
+	EASTDC_API int Scanf(const char* pFormat, ...);
+	EASTDC_API int Sscanf(const char*  pTextBuffer, const char* pFormat, ...);
 
 	EASTDC_API int Cscanf(ReadFunction16 pReadFunction16, void* pContext, const char16_t* pFormat, ...);
 	EASTDC_API int Fscanf(FILE* pFile, const char16_t* pFormat, ...);
@@ -174,10 +174,10 @@ namespace StdC
 	///////////////////////////////////////////////////////////////////////////////
 	/// Vscanf
 	///
-	EASTDC_API int Vcscanf(ReadFunction8 pReadFunction8, void* pContext, const char8_t* pFormat, va_list arguments);
-	EASTDC_API int Vfscanf(FILE* pFile, const char8_t* pFormat, va_list arguments);
-	EASTDC_API int Vscanf(const char8_t* pFormat, va_list arguments);
-	EASTDC_API int Vsscanf(const char8_t* pTextBuffer, const char8_t* pFormat, va_list arguments);
+	EASTDC_API int Vcscanf(ReadFunction8 pReadFunction8, void* pContext, const char* pFormat, va_list arguments);
+	EASTDC_API int Vfscanf(FILE* pFile, const char* pFormat, va_list arguments);
+	EASTDC_API int Vscanf(const char* pFormat, va_list arguments);
+	EASTDC_API int Vsscanf(const char* pTextBuffer, const char* pFormat, va_list arguments);
 
 	EASTDC_API int Vcscanf(ReadFunction16 pReadFunction16, void* pContext, const char16_t* pFormat, va_list arguments);
 	EASTDC_API int Vfscanf(FILE* pFile, const char16_t* pFormat, va_list arguments);

+ 15 - 26
include/EAStdC/EASprintf.h

@@ -86,7 +86,7 @@ namespace StdC
 	// write an optimized pathway for the case that pData is in fact 0-terminated,
 	// which will often be the case.
 	//
-	typedef int (*WriteFunction8)(const char8_t* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext, WriteFunctionState wfs);
+	typedef int (*WriteFunction8)(const char* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext, WriteFunctionState wfs);
 
 	/////////////////////////////////////////////////////////////////////////////
 	// WriteFunction16
@@ -171,13 +171,13 @@ namespace StdC
 	///     Vsnprintf: Print to a string, with capacity specified, same as the C vsnprintf function.
 	///     Vdprintf:  Print to a debug output destination (e.g. OutputDebugString on Microsoft platforms).
 	///
-	EASTDC_API int Vcprintf(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int Vfprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int Vprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int Vsprintf(char8_t* EA_RESTRICT pDestination, const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int Vsnprintf(char8_t* EA_RESTRICT pDestination, size_t n, const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int Vscprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int Vdprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int Vcprintf(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pContext, const char* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int Vfprintf(FILE* EA_RESTRICT pFile, const char* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int Vprintf(const char* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int Vsprintf(char* EA_RESTRICT pDestination, const char* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int Vsnprintf(char* EA_RESTRICT pDestination, size_t n, const char* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int Vscprintf(const char* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int Vdprintf(const char* EA_RESTRICT pFormat, va_list arguments);
 
 	EASTDC_API int Vcprintf(WriteFunction16 pWriteFunction16, void* EA_RESTRICT pContext, const char16_t* EA_RESTRICT pFormat, va_list arguments);
 	EASTDC_API int Vfprintf(FILE* EA_RESTRICT pFile, const char16_t* EA_RESTRICT pFormat, va_list arguments);
@@ -239,12 +239,12 @@ namespace StdC
 	///     Snprintf: Print to a string, with capacity specified, same as the C snprintf function.
 	///     Dprintf:  Print to a debug output destination (e.g. OutputDebugString on Microsoft platforms).
 	///
-	EASTDC_API int Cprintf(WriteFunction8 pWriteFunction, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, ...);
-	EASTDC_API int Fprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFormat, ...);
-	EASTDC_API int Printf(const char8_t* EA_RESTRICT pFormat, ...);
-	EASTDC_API int Sprintf(char8_t* EA_RESTRICT pDestination, const char8_t* EA_RESTRICT pFormat, ...);
-	EASTDC_API int Snprintf(char8_t* EA_RESTRICT pDestination, size_t n, const char8_t* EA_RESTRICT pFormat, ...);
-	EASTDC_API int Dprintf(const char8_t* EA_RESTRICT pFormat, ...);
+	EASTDC_API int Cprintf(WriteFunction8 pWriteFunction, void* EA_RESTRICT pContext, const char* EA_RESTRICT pFormat, ...);
+	EASTDC_API int Fprintf(FILE* EA_RESTRICT pFile, const char* EA_RESTRICT pFormat, ...);
+	EASTDC_API int Printf(const char* EA_RESTRICT pFormat, ...);
+	EASTDC_API int Sprintf(char* EA_RESTRICT pDestination, const char* EA_RESTRICT pFormat, ...);
+	EASTDC_API int Snprintf(char* EA_RESTRICT pDestination, size_t n, const char* EA_RESTRICT pFormat, ...);
+	EASTDC_API int Dprintf(const char* EA_RESTRICT pFormat, ...);
 
 	EASTDC_API int Cprintf(WriteFunction16 pWriteFunction, void* EA_RESTRICT pContext, const char16_t* EA_RESTRICT pFormat, ...);
 	EASTDC_API int Fprintf(FILE* EA_RESTRICT pFile, const char16_t* EA_RESTRICT pFormat, ...);
@@ -286,19 +286,8 @@ namespace StdC
 	// Deprecated functionality
 	///////////////////////////////////////////////////////////////////////////
 
-	// There was an update which caused the WriteFunction to have a new parameter (WriteFunctionState),
-	// but there may be old user code which uses the original WriteFunction which didn't take this
-	// parameter. So we implement support for the old WriteFunction type for the time being.
-	typedef int (*WriteFunction8Old) (const char8_t*  EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8);
-	typedef int (*WriteFunction16Old)(const char16_t* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext16);
-
-	EASTDC_API int Cprintf(WriteFunction8Old   pWriteFunction, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, ...);
-	EASTDC_API int Cprintf(WriteFunction16Old  pWriteFunction, void* EA_RESTRICT pContext, const char16_t* EA_RESTRICT pFormat, ...);
-	EASTDC_API int Vcprintf(WriteFunction8Old  pWriteFunction8, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int Vcprintf(WriteFunction16Old pWriteFunction16, void* EA_RESTRICT pContext, const char16_t* EA_RESTRICT pFormat, va_list arguments);
-
 	#if EASTDC_VSNPRINTF8_ENABLED
-		EASTDC_API int Vsnprintf8(char8_t* EA_RESTRICT pDestination, size_t n, const char8_t* EA_RESTRICT pFormat, va_list arguments);
+		EASTDC_API int Vsnprintf8(char* EA_RESTRICT pDestination, size_t n, const char* EA_RESTRICT pFormat, va_list arguments);
 		EASTDC_API int Vsnprintf16(char16_t* EA_RESTRICT pDestination, size_t n, const char16_t* EA_RESTRICT pFormat, va_list arguments);
 		EASTDC_API int Vsnprintf32(char32_t* EA_RESTRICT pDestination, size_t n, const char32_t* EA_RESTRICT pFormat, va_list arguments);
 		#if defined(EA_WCHAR_UNIQUE) && EA_WCHAR_UNIQUE

+ 11 - 11
include/EAStdC/EASprintfOrdered.h

@@ -57,11 +57,11 @@ namespace StdC
 	/// See EASprintf.h for documentation on the Printf family.
 	/// See also http://www.cplusplus.com/reference/clibrary/cstdio/printf.html
 	///
-	EASTDC_API int OCprintf(WriteFunction8 pWriteFunction, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, ...);
-	EASTDC_API int OFprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFormat, ...);
-	EASTDC_API int OPrintf(const char8_t* EA_RESTRICT pFormat, ...);
-	EASTDC_API int OSprintf(char8_t* EA_RESTRICT pDestination, const char8_t* EA_RESTRICT pFormat, ...);
-	EASTDC_API int OSnprintf(char8_t* EA_RESTRICT pDestination, size_t n, const char8_t* EA_RESTRICT pFormat, ...);
+	EASTDC_API int OCprintf(WriteFunction8 pWriteFunction, void* EA_RESTRICT pContext, const char* EA_RESTRICT pFormat, ...);
+	EASTDC_API int OFprintf(FILE* EA_RESTRICT pFile, const char* EA_RESTRICT pFormat, ...);
+	EASTDC_API int OPrintf(const char* EA_RESTRICT pFormat, ...);
+	EASTDC_API int OSprintf(char* EA_RESTRICT pDestination, const char* EA_RESTRICT pFormat, ...);
+	EASTDC_API int OSnprintf(char* EA_RESTRICT pDestination, size_t n, const char* EA_RESTRICT pFormat, ...);
 
 	EASTDC_API int OCprintf(WriteFunction16 pWriteFunction, void* EA_RESTRICT pContext, const char16_t* EA_RESTRICT pFormat, ...);
 	EASTDC_API int OFprintf(FILE* EA_RESTRICT pFile, const char16_t* EA_RESTRICT pFormat, ...);
@@ -83,12 +83,12 @@ namespace StdC
 	/// See EASprintf.h for documentation on the Vprintf family.
 	/// See also http://www.cplusplus.com/reference/clibrary/cstdio/printf.html
 	///
-	EASTDC_API int OVcprintf(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int OVfprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int OVprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int OVsprintf(char8_t* EA_RESTRICT pDestination, const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int OVsnprintf(char8_t* EA_RESTRICT pDestination, size_t n, const char8_t* EA_RESTRICT pFormat, va_list arguments);
-	EASTDC_API int OVscprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int OVcprintf(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pContext, const char* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int OVfprintf(FILE* EA_RESTRICT pFile, const char* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int OVprintf(const char* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int OVsprintf(char* EA_RESTRICT pDestination, const char* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int OVsnprintf(char* EA_RESTRICT pDestination, size_t n, const char* EA_RESTRICT pFormat, va_list arguments);
+	EASTDC_API int OVscprintf(const char* EA_RESTRICT pFormat, va_list arguments);
 
 	EASTDC_API int OVcprintf(WriteFunction16 pWriteFunction16, void* EA_RESTRICT pContext, const char16_t* EA_RESTRICT pFormat, va_list arguments);
 	EASTDC_API int OVfprintf(FILE* EA_RESTRICT pFile, const char16_t* EA_RESTRICT pFormat, va_list arguments);

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 171 - 135
include/EAStdC/EAString.h


+ 30 - 23
include/EAStdC/EATextUtil.h

@@ -28,25 +28,32 @@ namespace StdC
 	///////////////////////////////////////////////////////////////////////////////
 	/// UTF8 utilities
 	/// 
-	EASTDC_API bool      UTF8Validate(const char8_t* p, size_t nLength);
-	EASTDC_API char8_t*  UTF8Increment(const char8_t* p, size_t n);
-	EASTDC_API char8_t*  UTF8Decrement(const char8_t* p, size_t n);
-	EASTDC_API size_t    UTF8Length(const char8_t* p);
+	EASTDC_API bool      UTF8Validate(const char* p, size_t nLength);
+	EASTDC_API char*     UTF8Increment(const char* p, size_t n);
+	EASTDC_API char*     UTF8Decrement(const char* p, size_t n);
+	EASTDC_API size_t    UTF8Length(const char* p);
 	EASTDC_API size_t    UTF8Length(const char16_t* p);
 	EASTDC_API size_t    UTF8Length(const char32_t* p);
-	EASTDC_API size_t    UTF8CharSize(const char8_t* p);
+	EASTDC_API size_t    UTF8CharSize(const char* p);
 	EASTDC_API size_t    UTF8CharSize(char16_t c);
 	EASTDC_API size_t    UTF8CharSize(char32_t c);
-	EASTDC_API char16_t  UTF8ReadChar(const char8_t* p, const char8_t** ppEnd = NULL);
-	EASTDC_API char8_t*  UTF8WriteChar(char8_t* p, char16_t c);
-	EASTDC_API char8_t*  UTF8WriteChar(char8_t* p, char32_t c);
-	EASTDC_API size_t    UTF8TrimPartialChar(char8_t* p, size_t nLength);
-	EASTDC_API char8_t*  UTF8ReplaceInvalidChar(const char8_t* pIn, size_t nLength, char8_t* pOut, char8_t replaceWith);
-	inline     bool      UTF8IsSoloByte(char8_t c)   { return ((uint8_t)c < 0x80); }
-	inline     bool      UTF8IsLeadByte(char8_t c)   { return (0xc0 <= (uint8_t)c) && ((uint8_t)c <= 0xef); } // This tests for lead bytes for 2 and 3 byte UTF8 sequences, which map to char16_t code points. If we were to support 4, 5, 6 byte code sequences (char32_t code points), we'd test for <= 0xfd.
-	inline     bool      UTF8IsFollowByte(char8_t c) { return (0x80 <= (uint8_t)c) && ((uint8_t)c <= 0xbf); } // This assumes that the char is part of a valid UTF8 sequence.
-
-
+	EASTDC_API char16_t  UTF8ReadChar(const char* p, const char** ppEnd = NULL);
+	EASTDC_API char*     UTF8WriteChar(char* p, char16_t c);
+	EASTDC_API char*     UTF8WriteChar(char* p, char32_t c);
+	EASTDC_API size_t    UTF8TrimPartialChar(char* p, size_t nLength);
+	EASTDC_API char*     UTF8ReplaceInvalidChar(const char* pIn, size_t nLength, char* pOut, char replaceWith);
+	inline     bool      UTF8IsSoloByte(char c)   { return ((uint8_t)c < 0x80); }
+	inline     bool      UTF8IsLeadByte(char c)   { return (0xc0 <= (uint8_t)c) && ((uint8_t)c <= 0xef); } // This tests for lead bytes for 2 and 3 byte UTF8 sequences, which map to char16_t code points. If we were to support 4, 5, 6 byte code sequences (char32_t code points), we'd test for <= 0xfd.
+	inline     bool      UTF8IsFollowByte(char c) { return (0x80 <= (uint8_t)c) && ((uint8_t)c <= 0xbf); } // This assumes that the char is part of a valid UTF8 sequence.
+
+ #if EA_CHAR8_UNIQUE 
+	// We simply forward the UTF8 overload to maintain backwards compatbility.
+	// Eventually, we should leverage the type system instead of UTF8 specific functions.
+	//
+	inline size_t UTF8Length(const char8_t* p) { return UTF8Length((const char*)p); }
+	inline char8_t* UTF8ReplaceInvalidChar(const char8_t* pIn, size_t nLength, char8_t* pOut, char8_t replaceWith) 
+		{ return (char8_t*)UTF8ReplaceInvalidChar((const char*)pIn, nLength, (char*)pOut, (char)replaceWith); }
+#endif
 
 	///////////////////////////////////////////////////////////////////////////////
 	/// WildcardMatch
@@ -71,7 +78,7 @@ namespace StdC
 	/// Multiple * and ? characters may be used. Two consecutive * characters are 
 	/// treated as if they were one.
 	///
-	EASTDC_API bool WildcardMatch(const char8_t*  pString, const char8_t*  pPattern, bool bCaseSensitive);
+	EASTDC_API bool WildcardMatch(const char*  pString, const char*  pPattern, bool bCaseSensitive);
 	EASTDC_API bool WildcardMatch(const char16_t* pString, const char16_t* pPattern, bool bCaseSensitive);
 	EASTDC_API bool WildcardMatch(const char32_t* pString, const char32_t* pPattern, bool bCaseSensitive);
 
@@ -108,8 +115,8 @@ namespace StdC
 	///
 	/// See the other version of ParseDelimitedText below for some additional documentation.
 	///
-	EASTDC_API bool ParseDelimitedText(const char8_t* pText, const char8_t* pTextEnd, char8_t cDelimiter, 
-									   const char8_t*& pToken, const char8_t*& pTokenEnd, const char8_t** ppNewText);
+	EASTDC_API bool ParseDelimitedText(const char* pText, const char* pTextEnd, char cDelimiter, 
+									   const char*& pToken, const char*& pTokenEnd, const char** ppNewText);
 
 	EASTDC_API bool ParseDelimitedText(const char16_t* pText, const char16_t* pTextEnd, char16_t cDelimiter, 
 									   const char16_t*& pToken, const char16_t*& pTokenEnd, const char16_t** ppNewText);
@@ -139,7 +146,7 @@ namespace StdC
 	/// Resulting output:
 	///    "12345678"
 	///
-	EASTDC_API void ConvertBinaryDataToASCIIArray(const void* pBinaryData, size_t nBinaryDataLength, char8_t*  pASCIIArray);
+	EASTDC_API void ConvertBinaryDataToASCIIArray(const void* pBinaryData, size_t nBinaryDataLength, char*  pASCIIArray);
 	EASTDC_API void ConvertBinaryDataToASCIIArray(const void* pBinaryData, size_t nBinaryDataLength, char16_t* pASCIIArray);
 	EASTDC_API void ConvertBinaryDataToASCIIArray(const void* pBinaryData, size_t nBinaryDataLength, char32_t* pASCIIArray);
 
@@ -161,7 +168,7 @@ namespace StdC
 	/// Resulting output:
 	///    { 0x12, 0x34, 0x56, 0x78 }
 	///
-	EASTDC_API bool ConvertASCIIArrayToBinaryData(const char8_t*  pASCIIArray, size_t nASCIIArrayLength, void* pBinaryData);
+	EASTDC_API bool ConvertASCIIArrayToBinaryData(const char*  pASCIIArray, size_t nASCIIArrayLength, void* pBinaryData);
 	EASTDC_API bool ConvertASCIIArrayToBinaryData(const char16_t* pASCIIArray, size_t nASCIIArrayLength, void* pBinaryData);
 	EASTDC_API bool ConvertASCIIArrayToBinaryData(const char32_t* pASCIIArray, size_t nASCIIArrayLength, void* pBinaryData);
 
@@ -195,7 +202,7 @@ namespace StdC
 	///         // Use pLine - pLineEnd
 	///     }while(pLineNext != (buffer + 256));
 	///
-	EASTDC_API const char8_t*  GetTextLine(const char8_t* pText, const char8_t* pTextEnd, const char8_t** ppNewText);
+	EASTDC_API const char*  GetTextLine(const char* pText, const char* pTextEnd, const char** ppNewText);
 	EASTDC_API const char16_t* GetTextLine(const char16_t* pText, const char16_t* pTextEnd, const char16_t** ppNewText);
 	EASTDC_API const char32_t* GetTextLine(const char32_t* pText, const char32_t* pTextEnd, const char32_t** ppNewText);
 
@@ -268,7 +275,7 @@ namespace StdC
 	///    while(SplitTokenDelimited(pString, kLengthNull, ',', pToken, 16, &pString))
 	///         printf("%s\n", pToken);
 	///    
-	EASTDC_API bool SplitTokenDelimited(const char8_t*  pSource, size_t nSourceLength, char8_t  cDelimiter, char8_t*  pToken, size_t nTokenLength, const char8_t**  ppNewSource = NULL);
+	EASTDC_API bool SplitTokenDelimited(const char*  pSource, size_t nSourceLength, char  cDelimiter, char*  pToken, size_t nTokenLength, const char**  ppNewSource = NULL);
 	EASTDC_API bool SplitTokenDelimited(const char16_t* pSource, size_t nSourceLength, char16_t cDelimiter, char16_t* pToken, size_t nTokenLength, const char16_t** ppNewSource = NULL);
 	EASTDC_API bool SplitTokenDelimited(const char32_t* pSource, size_t nSourceLength, char32_t cDelimiter, char32_t* pToken, size_t nTokenLength, const char32_t** ppNewSource = NULL);
 
@@ -301,7 +308,7 @@ namespace StdC
 	///    " "       ""       ""           false
 	///    NULL      ""       NULL         false
 	///
-	EASTDC_API bool SplitTokenSeparated(const char8_t*  pSource, size_t nSourceLength, char8_t  cDelimiter, char8_t*  pToken, size_t nTokenLength, const char8_t**  ppNewSource = NULL);
+	EASTDC_API bool SplitTokenSeparated(const char*  pSource, size_t nSourceLength, char  cDelimiter, char*  pToken, size_t nTokenLength, const char**  ppNewSource = NULL);
 	EASTDC_API bool SplitTokenSeparated(const char16_t* pSource, size_t nSourceLength, char16_t cDelimiter, char16_t* pToken, size_t nTokenLength, const char16_t** ppNewSource = NULL);
 	EASTDC_API bool SplitTokenSeparated(const char32_t* pSource, size_t nSourceLength, char32_t cDelimiter, char32_t* pToken, size_t nTokenLength, const char32_t** ppNewSource = NULL);
 

+ 2 - 25
include/EAStdC/internal/Config.h

@@ -32,8 +32,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifndef EASTDC_VERSION
-	#define EASTDC_VERSION   "1.26.02"
-	#define EASTDC_VERSION_N  12602
+	#define EASTDC_VERSION   "1.26.03"
+	#define EASTDC_VERSION_N  12603
 #endif
 
 
@@ -200,29 +200,6 @@
 #endif
 
 
-///////////////////////////////////////////////////////////////////////////////
-// EASTDC_MEMCPY16_ENABLED
-//
-// Defined as 0 or 1. Default is 1.
-// The Memcpy(char16_t*, const char16_t*, size_t) function and Memmove 
-// equivalent have been deprecated. For the time being we have an option 
-// to control their existence. 
-//
-#ifndef EASTDC_MEMCPY16_ENABLED
-	#define EASTDC_MEMCPY16_ENABLED 0
-#endif
-
-
-///////////////////////////////////////////////////////////////////////////////
-// EASTDC_MEMCPY16_ENABLED
-//
-// Defined as 0 or 1. Default is 0.
-//
-#ifndef EASTDC_MEMCHR16_ENABLED
-	#define EASTDC_MEMCHR16_ENABLED 0
-#endif
-
-
 ///////////////////////////////////////////////////////////////////////////////
 // EASTDC_CHAR32_SUPPORT_ENABLED
 //

+ 14 - 14
include/EAStdC/internal/EAMemory.inl

@@ -86,67 +86,67 @@ namespace StdC
 	}
 
 
-	EASTDC_EAMEMORY_DECL char8_t* Memcpy(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount)
+	EASTDC_EAMEMORY_DECL char* Memcpy(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount)
 	{
 		EA_ASSERT((pSource      >= (const uint8_t*)pDestination + nByteCount) || // Verify the memory doesn't overlap.
 				  (pDestination >= (const uint8_t*)pSource      + nByteCount));
 
 			// Some compilers offer __builtin_memcpy, but we haven't found it to be faster than memcpy for any platforms
 			// and it's significantly slower than memcpy for some platform/compiler combinations (e.g. SN compiler on PS3).
-			return (char8_t*)memcpy(pDestination, pSource, nByteCount);
+			return (char*)memcpy(pDestination, pSource, nByteCount);
 	}
 
 
-	EASTDC_EAMEMORY_DECL char8_t* MemcpyC(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount)
+	EASTDC_EAMEMORY_DECL char* MemcpyC(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount)
 	{
 		EA_ASSERT((pSource      >= (const uint8_t*)pDestination + nByteCount) || // Verify the memory doesn't overlap.
 				  (pDestination >= (const uint8_t*)pSource      + nByteCount));
 
-		return (char8_t*)memcpy(pDestination, pSource, nByteCount);
+		return (char*)memcpy(pDestination, pSource, nByteCount);
 	}
 
 
-	EASTDC_EAMEMORY_DECL char8_t* MemcpyS(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount)
+	EASTDC_EAMEMORY_DECL char* MemcpyS(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount)
 	{
 		EA_ASSERT((pSource      >= (const uint8_t*)pDestination + nByteCount) || // Verify the memory doesn't overlap.
 				  (pDestination >= (const uint8_t*)pSource      + nByteCount));
 
 
-		return (char8_t*)memcpy(pDestination, pSource, nByteCount);
+		return (char*)memcpy(pDestination, pSource, nByteCount);
 	}
 
 
-	EASTDC_EAMEMORY_DECL char8_t* Memcpy128(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount)
+	EASTDC_EAMEMORY_DECL char* Memcpy128(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount)
 	{
 		EA_ASSERT((pSource      >= (const uint8_t*)pDestination + nByteCount) || // Verify the memory doesn't overlap.
 				  (pDestination >= (const uint8_t*)pSource      + nByteCount));
 
 		// This is expected to work with both cacheable and uncacheable memory, 
 		// thus we can't use all alternative optimized functions that exist for memcpy.
-		return (char8_t*)memcpy(pDestination, pSource, nByteCount);
+		return (char*)memcpy(pDestination, pSource, nByteCount);
 	}
 
 
-	EASTDC_EAMEMORY_DECL char8_t* Memcpy128C(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount)
+	EASTDC_EAMEMORY_DECL char* Memcpy128C(void* EA_RESTRICT pDestination, const void* EA_RESTRICT pSource, size_t nByteCount)
 	{
 		EA_ASSERT((pSource      >= (const uint8_t*)pDestination + nByteCount) || // Verify the memory doesn't overlap.
 				  (pDestination >= (const uint8_t*)pSource      + nByteCount));
 
-		return (char8_t*)memcpy(pDestination, pSource, nByteCount);
+		return (char*)memcpy(pDestination, pSource, nByteCount);
 	}
 
 
-	EASTDC_EAMEMORY_DECL char8_t* Memmove(void* pDestination, const void* pSource, size_t nByteCount)
+	EASTDC_EAMEMORY_DECL char* Memmove(void* pDestination, const void* pSource, size_t nByteCount)
 	{
 		// Some compilers offer __builtin_memmove, but we haven't found it to be faster than memcpy for any platforms
 		// and it's significantly slower than memcpy for some platform/compiler combinations (e.g. SN compiler on PS3).
-		return (char8_t*)memmove(pDestination, pSource, nByteCount);
+		return (char*)memmove(pDestination, pSource, nByteCount);
 	}
 
 
-	EASTDC_EAMEMORY_DECL char8_t* MemmoveC(void* pDestination, const void* pSource, size_t nByteCount)
+	EASTDC_EAMEMORY_DECL char* MemmoveC(void* pDestination, const void* pSource, size_t nByteCount)
 	{
-		return (char8_t*)memmove(pDestination, pSource, nByteCount);
+		return (char*)memmove(pDestination, pSource, nByteCount);
 	}
 
 } // namespace StdC

+ 8 - 8
include/EAStdC/internal/ScanfCore.h

@@ -96,7 +96,7 @@ enum Sign
 enum Modifier
 {
 	kModifierNone,       // No modifier, use the type as-is.
-	kModifierChar,       // Use char8_t instead of int. Specified by hh in front of d, i, o, u, x, or X.
+	kModifierChar,       // Use char instead of int. Specified by hh in front of d, i, o, u, x, or X.
 	kModifierShort,      // Use short instead of int. Specified by h in front of d, i, o, u, x, or X.
 	kModifierInt,        // This is a placeholder, as integer is the default fd for integral types.
 	kModifierLong,       // Use long instead of int. Specified by l in front of d, i, o, u, x, or X.
@@ -106,7 +106,7 @@ enum Modifier
 	kModifierPtrdiff_t,  // Use ptrdiff_t argument. Specified by 't' in front of d, i, o, u, x, or X.
 	kModifierDouble,     // Use double instead of float. Specified by nothing in front of e, E, f, F, g, G for printf and l for scanf.
 	kModifierLongDouble, // Use long double instead of double. Specified by l in front of e, E, f, F, g, G for printf and L for scanf.
-	kModifierWChar,      // Use wide char8_t instead of char8_t. Specified by l (in front of c).
+	kModifierWChar,      // Use wide char instead of char. Specified by l (in front of c).
 	kModifierInt8,       // Use int8_t or uint8_t.   Specified by I8 in front of d, i, o, u.
 	kModifierInt16,      // Use int16_t or uint16_t. Specified by I16 in front of d, i, o, u.
 	kModifierInt32,      // Use int32_t or uint32_t. Specified by I32 in front of d, i, o, u.
@@ -161,7 +161,7 @@ struct CharBitmap
 	CharBitmap()
 		{ memset(mBits, 0, sizeof(mBits)); }
 
-	int Get(char8_t c) const
+	int Get(char c) const
 		{ return (int)mBits[(uint8_t)(unsigned)c >> 5] & (1 << (c & 31)); }
 
 	// This isn't correct. To do this completely right for all uses of scanf, 
@@ -173,7 +173,7 @@ struct CharBitmap
 	int Get(char32_t c) const // If c >= 256, we return whatever the first bit is, since it will be equal to what bits 256 - 2^32 are meant to be.
 		{ if(c < 256) return (int)mBits[(uint8_t)(unsigned)c >> 5] & (1 << (c & 31)); else return (int)(mBits[0] & 0x00000001); }
 
-	void Set(char8_t c)
+	void Set(char c)
 		{ mBits[(uint8_t)(unsigned)c >> 5] |= (1 << (c & 31)); }
 
 	void Set(char16_t c)
@@ -204,7 +204,7 @@ struct CharBitmap
 
 struct DoubleValue
 {
-	char8_t mSigStr[kMaxSignificandDigits + 1];  // String
+	char mSigStr[kMaxSignificandDigits + 1];  // String
 	int16_t mSigLen;                             // Length of string
 	int16_t mExponent;                           // Exponent value.
 
@@ -252,10 +252,10 @@ struct FormatData
 
 struct SscanfContext8
 {
-	const char8_t* mpSource;
+	const char* mpSource;
 	int            mbEndFound;
 
-	SscanfContext8(const char8_t* pSource = NULL)
+	SscanfContext8(const char* pSource = NULL)
 	  : mpSource(pSource),
 		mbEndFound(0)
 	{}
@@ -300,7 +300,7 @@ int StringReader32(ReadAction readAction, int value, void* pContext);
 ///////////////////////////////////////////////////////////////////////////////
 // VscanfCore
 //
-int VscanfCore(ReadFunction8  pReadFunction8,  void* pReadFunction8Context, const char8_t* pFormat,  va_list arguments);
+int VscanfCore(ReadFunction8  pReadFunction8,  void* pReadFunction8Context, const char* pFormat,  va_list arguments);
 int VscanfCore(ReadFunction16 pReadFunction16, void* pReadFunction8Context, const char16_t* pFormat, va_list arguments);
 int VscanfCore(ReadFunction32 pReadFunction32, void* pReadFunction8Context, const char32_t* pFormat, va_list arguments);
 

+ 11 - 11
include/EAStdC/internal/SprintfCore.h

@@ -76,7 +76,7 @@ const int      kMaxWidth             = kConversionBufferSize - 8;
 const int      kMaxPrecision         = kConversionBufferSize - 8; 
 const int      kNoPrecision          = INT_MAX;
 const int      kFormatError          = 0;
-const char8_t  kStringNull8[]        = { '(', 'n', 'u', 'l', 'l', ')', '\0' }; // Used if the user uses "%s" but passes NULL as the string pointer.
+const char  kStringNull8[]        = { '(', 'n', 'u', 'l', 'l', ')', '\0' }; // Used if the user uses "%s" but passes NULL as the string pointer.
 const char16_t kStringNull16[]       = { '(', 'n', 'u', 'l', 'l', ')', '\0' };
 const char32_t kStringNull32[]       = { '(', 'n', 'u', 'l', 'l', ')', '\0' };
 
@@ -103,7 +103,7 @@ enum Sign
 enum Modifier
 {
 	kModifierNone,       // No modifier, use the type as-is.
-	kModifierChar,       // Use char8_t instead of int. Specified by hh in front of d, i, o, u, x, or X.
+	kModifierChar,       // Use char instead of int. Specified by hh in front of d, i, o, u, x, or X.
 	kModifierShort,      // Use short instead of int. Specified by h in front of d, i, o, u, x, or X.
 	kModifierInt,        // This is a placeholder, as integer is the default format for integral types.
 	kModifierLong,       // Use long instead of int. Specified by l in front of d, i, o, u, x, or X.
@@ -113,7 +113,7 @@ enum Modifier
 	kModifierPtrdiff_t,  // Use ptrdiff_t argument. Specified by 't' in front of d, i, o, u, x, or X.
 	kModifierDouble,     // This is a placeholder, as double is the default format for floating point types.
 	kModifierLongDouble, // Use long double instead of double. Specified by l in front of e, E, f, g, G.
-	kModifierWChar,      // Use wide char8_t instead of char8_t. Specified by l (in front of c).
+	kModifierWChar,      // Use wide char instead of char. Specified by l (in front of c).
 	kModifierInt8,       // Use int8_t or uint8_t.     Specified by I8 in front of d, i, o, u.
 	kModifierInt16,      // Use int16_t or uint16_t.   Specified by I16 in front of d, i, o, u.
 	kModifierInt32,      // Use int32_t or uint32_t.   Specified by I32 in front of d, i, o, u.
@@ -177,12 +177,12 @@ struct FormatData
 
 struct SnprintfContext8
 {
-	char8_t* mpDestination;     // Start of destination data. Ptr doesn't change once it has been initialized.
+	char* mpDestination;     // Start of destination data. Ptr doesn't change once it has been initialized.
 	size_t   mnCount;           // Count written to destination so far.
 	size_t   mnMaxCount;        // The max count we can write to the destination.
 	bool     mbMaxCountReached; // True if the max count has been reached. Used because multi-byte strings (e.g. UTF8) could end with mnCount < mnMaxCount.
 
-	SnprintfContext8(char8_t* pDestination = NULL, size_t nCount = 0, size_t nMaxCount = (size_t)-1)
+	SnprintfContext8(char* pDestination = NULL, size_t nCount = 0, size_t nMaxCount = (size_t)-1)
 	  : mpDestination(pDestination),
 		mnCount(nCount),
 		mnMaxCount(nMaxCount),
@@ -219,7 +219,7 @@ struct SnprintfContext32
 #ifdef EA_PLATFORM_ANDROID
 	struct PlatformLogWriterContext8
 	{
-		char8_t mBuffer[512];
+		char mBuffer[512];
 		size_t  mPosition;
 
 		PlatformLogWriterContext8() { mBuffer[0] = 0; mPosition = 0; }
@@ -230,9 +230,9 @@ struct SnprintfContext32
 #endif
 
 // Default output writers
-int StringWriter8     (const char8_t*  EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8,  WriteFunctionState wfs);
-int FILEWriter8       (const char8_t*  EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8,  WriteFunctionState wfs);
-int PlatformLogWriter8(const char8_t*  EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8,  WriteFunctionState wfs);
+int StringWriter8     (const char*  EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8,  WriteFunctionState wfs);
+int FILEWriter8       (const char*  EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8,  WriteFunctionState wfs);
+int PlatformLogWriter8(const char*  EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8,  WriteFunctionState wfs);
 
 int StringWriter16   (const char16_t* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext16, WriteFunctionState wfs);
 int FILEWriter16     (const char16_t* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext16, WriteFunctionState wfs);
@@ -269,7 +269,7 @@ void EASprintfShutdown();
 // ReadFormat
 //
 // Reads the current format into FormatData. Return value is pointer to first
-// char8_t/char16_t after the format data.
+// char/char16_t after the format data.
 //
 // To know how printf truly needs to work, see the ISO C 1999 standard, section 7.19.6.1.
 // See http://www.cplusplus.com/ref/cstdio/printf.html or http://www.opengroup.org/onlinepubs/007908799/xsh/fprintf.html 
@@ -286,7 +286,7 @@ const CharT* ReadFormat(const CharT* EA_RESTRICT pFormat, SprintfLocal::FormatDa
 ///////////////////////////////////////////////////////////////////////////////
 // VprintfCore
 //
-int VprintfCore(WriteFunction8  pWriteFunction8,  void* EA_RESTRICT pWriteFunctionContext8,  const char8_t*  EA_RESTRICT pFormat, va_list arguments);
+int VprintfCore(WriteFunction8  pWriteFunction8,  void* EA_RESTRICT pWriteFunctionContext8,  const char*  EA_RESTRICT pFormat, va_list arguments);
 int VprintfCore(WriteFunction16 pWriteFunction16, void* EA_RESTRICT pWriteFunctionContext16, const char16_t* EA_RESTRICT pFormat, va_list arguments);
 int VprintfCore(WriteFunction32 pWriteFunction32, void* EA_RESTRICT pWriteFunctionContext32, const char32_t* EA_RESTRICT pFormat, va_list arguments);
 

+ 1 - 1
source/EADateTime.cpp

@@ -1067,7 +1067,7 @@ namespace StdC
 	///////////////////////////////////////////////////////////////////////
 	// GetTimeZoneName
 	//
-	EASTDC_API bool GetTimeZoneName(char8_t* pName, bool bDaylightSavingsName)
+	EASTDC_API bool GetTimeZoneName(char* pName, bool bDaylightSavingsName)
 	{
 		#if defined(EA_PLATFORM_MICROSOFT) && defined(_MSC_VER) && (_MSC_VER >= 1400)
 			EA_COMPILETIME_ASSERT(EASTDC_UTC_TIME_AVAILABLE == 1);

+ 9 - 9
source/EAHashString.cpp

@@ -32,7 +32,7 @@ EASTDC_API uint32_t DJB2(const void* pData, size_t nLength, uint32_t nInitialVal
 }
 
 
-EASTDC_API uint32_t DJB2_String8(const char8_t* pData8, uint32_t nInitialValue, CharCase charCase)
+EASTDC_API uint32_t DJB2_String8(const char* pData8, uint32_t nInitialValue, CharCase charCase)
 {
 	uint32_t c;
 
@@ -48,14 +48,14 @@ EASTDC_API uint32_t DJB2_String8(const char8_t* pData8, uint32_t nInitialValue,
 		case kCharCaseLower:
 		{
 			while((c = (uint8_t)*pData8++) != 0)
-				nInitialValue = ((nInitialValue << 5) + nInitialValue) + Tolower((char8_t)c);
+				nInitialValue = ((nInitialValue << 5) + nInitialValue) + Tolower((char)c);
 			break;
 		}
 
 		case kCharCaseUpper:
 		{
 			while((c = (uint8_t)*pData8++) != 0)
-				nInitialValue = ((nInitialValue << 5) + nInitialValue) + Toupper((char8_t)c);
+				nInitialValue = ((nInitialValue << 5) + nInitialValue) + Toupper((char)c);
 			break;
 		}
 	}
@@ -114,7 +114,7 @@ EASTDC_API uint32_t FNV1(const void* pData, size_t nLength, uint32_t nInitialVal
 }
 
 
-EASTDC_API uint32_t FNV1_String8(const char8_t* pData8, uint32_t nInitialValue, CharCase charCase)
+EASTDC_API uint32_t FNV1_String8(const char* pData8, uint32_t nInitialValue, CharCase charCase)
 {
 	uint32_t c;
 
@@ -130,14 +130,14 @@ EASTDC_API uint32_t FNV1_String8(const char8_t* pData8, uint32_t nInitialValue,
 		case kCharCaseLower:
 		{
 			while((c = (uint8_t)*pData8++) != 0)
-				nInitialValue = (nInitialValue * 16777619) ^ Tolower((char8_t)c);
+				nInitialValue = (nInitialValue * 16777619) ^ Tolower((char)c);
 			break;
 		}
 
 		case kCharCaseUpper:
 		{
 			while((c = (uint8_t)*pData8++) != 0)
-				nInitialValue = (nInitialValue * 16777619) ^ Toupper((char8_t)c);
+				nInitialValue = (nInitialValue * 16777619) ^ Toupper((char)c);
 			break;
 		}
 	}
@@ -221,7 +221,7 @@ EASTDC_API uint64_t FNV64(const void* pData, size_t nLength, uint64_t nInitialVa
 }
 
 
-EASTDC_API uint64_t FNV64_String8(const char8_t* pData8, uint64_t nInitialValue, CharCase charCase)
+EASTDC_API uint64_t FNV64_String8(const char* pData8, uint64_t nInitialValue, CharCase charCase)
 {
 	uint64_t c;
 
@@ -237,14 +237,14 @@ EASTDC_API uint64_t FNV64_String8(const char8_t* pData8, uint64_t nInitialValue,
 		case kCharCaseLower:
 		{
 			while((c = (uint8_t)*pData8++) != 0)
-				nInitialValue = (nInitialValue * UINT64_C(1099511628211)) ^ Tolower((char8_t)c);
+				nInitialValue = (nInitialValue * UINT64_C(1099511628211)) ^ Tolower((char)c);
 			break;
 		}
 
 		case kCharCaseUpper:
 		{
 			while((c = (uint8_t)*pData8++) != 0)
-				nInitialValue = (nInitialValue * UINT64_C(1099511628211)) ^ Toupper((char8_t)c);
+				nInitialValue = (nInitialValue * UINT64_C(1099511628211)) ^ Toupper((char)c);
 			break;
 		}
 	}

+ 7 - 7
source/EAMemory.cpp

@@ -303,9 +303,9 @@ EASTDC_API const void* Memcheck64(const void* p, uint64_t c, size_t byteCount)
 
 
 
-EASTDC_API const char8_t* Memchr(const char8_t* p, char8_t c, size_t nCharCount)
+EASTDC_API const char* Memchr(const char* p, char c, size_t nCharCount)
 {
-	for(const char8_t* p8 = (const char8_t*)p; nCharCount > 0; ++p8, --nCharCount)
+	for(const char* p8 = (const char*)p; nCharCount > 0; ++p8, --nCharCount)
 	{
 		if(*p8 == c)
 			return p8;
@@ -349,8 +349,8 @@ EASTDC_API const char32_t* Memchr32(const char32_t* pString, char32_t c, size_t
 
 EASTDC_API int Memcmp(const void* pString1, const void* pString2, size_t nCharCount)
 {
-	const char8_t* p1 = (const char8_t*)pString1;
-	const char8_t* p2 = (const char8_t*)pString2;
+	const char* p1 = (const char*)pString1;
+	const char* p2 = (const char*)pString2;
 
 	for(; nCharCount > 0; ++p1, ++p2, --nCharCount)
 	{
@@ -949,9 +949,9 @@ EASTDC_API void MemfillSpecific(void* pDestination, const void* pSource, size_t
 // as is usually the case for logical integer operations.
 EASTDC_API bool TimingSafeMemEqual(const void* pMem1, const void* pMem2, size_t byteCount)
 {
-	const char8_t* p1 = (const char8_t*)pMem1;
-	const char8_t* p2 = (const char8_t*)pMem2;
-	char8_t mask = 0;
+	const char* p1 = (const char*)pMem1;
+	const char* p2 = (const char*)pMem2;
+	char mask = 0;
 
 	for(; byteCount > 0; ++p1, ++p2, --byteCount)
 		mask |= (*p1 ^ *p2);    // Accumulate any differences between the memory.

+ 47 - 47
source/EAProcess.cpp

@@ -52,7 +52,7 @@ namespace EA
 	namespace StdC
 	{
 		//Used to determine if a given path is a bundle extension
-			const char8_t* kBundleExtensions[] = {
+			const char* kBundleExtensions[] = {
 			".app",
 			".bundle",
 			".plugin"
@@ -82,11 +82,11 @@ namespace StdC
 #endif
 
 #if EASTDC_SETCURRENTPROCESSPATH_REQUIRED
-	static char8_t gCurrentProcessPath[kMaxPathLength] = { 0 };
+	static char gCurrentProcessPath[kMaxPathLength] = { 0 };
 #endif
 
 
-EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
+EASTDC_API void SetCurrentProcessPath(const char* pPath)
 {
 	#if EASTDC_SETCURRENTPROCESSPATH_REQUIRED
 		Strlcpy(gCurrentProcessPath, pPath, EAArrayCount(gCurrentProcessPath));
@@ -120,7 +120,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 		return 0;
 	}
 
-	EASTDC_API size_t GetCurrentProcessPath(char8_t* pPath, int pathCapacity, int pathFlags)
+	EASTDC_API size_t GetCurrentProcessPath(char* pPath, int pathCapacity, int pathFlags)
 	{
 		EA_ASSERT(pathCapacity > 0); EA_UNUSED(pathCapacity);
 
@@ -163,7 +163,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 		return 0;
 	}
 
-	EASTDC_API size_t GetCurrentProcessDirectory(char8_t* pDirectory, int pathCapacity, int pathFlags)
+	EASTDC_API size_t GetCurrentProcessDirectory(char* pDirectory, int pathCapacity, int pathFlags)
 	{
 		EA_ASSERT(pathCapacity > 0); EA_UNUSED(pathCapacity);
 
@@ -185,7 +185,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 	// Gets the application file path. The path can only be obtained for applications run 
 	// from the host PC (run by Visual Studio, Neighborhood or the -run command).
 
-	EASTDC_API size_t GetCurrentProcessPath(char8_t* pPath, int pathCapacity, int /*pathFlags*/)
+	EASTDC_API size_t GetCurrentProcessPath(char* pPath, int pathCapacity, int /*pathFlags*/)
 	{
 		EA_ASSERT(pathCapacity > 0);
 
@@ -216,7 +216,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 	{
 		EA_ASSERT(pathCapacity > 0);
 
-		char8_t path8[kMaxPathLength];
+		char path8[kMaxPathLength];
 		GetCurrentProcessPath(path8, EAArrayCount(path8), pathFlags);
 
 		const int intendedStrlen = Strlcpy(pPath, path8, pathCapacity);
@@ -228,7 +228,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 		return 0;
 	}
 
-	EASTDC_API size_t GetCurrentProcessDirectory(char8_t* pDirectory, int pathCapacity, int /*pathFlags*/)
+	EASTDC_API size_t GetCurrentProcessDirectory(char* pDirectory, int pathCapacity, int /*pathFlags*/)
 	{
 		int32_t result;
 		if (gCurrentProcessPath[0])
@@ -263,7 +263,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 	{
 		EA_ASSERT(pathCapacity > 0);
 
-		char8_t path8[kMaxDirectoryLength];    // We don't have access to EAIO here.
+		char path8[kMaxDirectoryLength];    // We don't have access to EAIO here.
 		GetCurrentProcessDirectory(path8, EAArrayCount(path8), pathFlags);
 
 		const int intendedStrlen = Strlcpy(pDirectory, path8, pathCapacity);
@@ -281,7 +281,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 	{
 		EA_ASSERT(pathCapacity > 0); EA_UNUSED(pathCapacity);
 
-		char8_t path8[kMaxPathLength];
+		char path8[kMaxPathLength];
 		GetCurrentProcessPath(path8, EAArrayCount(path8), pathFlags);
 
 		const int intendedStrlen = Strlcpy(pPath, path8, pathCapacity);
@@ -293,7 +293,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 		return 0;
 	}
 	
-	static bool IsBundleFolder(char8_t* pPath, int pathCapacity)
+	static bool IsBundleFolder(char* pPath, int pathCapacity)
 	{
 		for(size_t i = 0; i < EAArrayCount(kBundleExtensions); i++)
 		{
@@ -308,7 +308,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 	// To consider: add a flag so user can specify if they want the path to the actual executable even if it is in a .extension
 	// EG: /path/to/MyApp.extension or /path/to/MyApp.extension/MyExecutable
 	// Currently /path/to/.extension is returned if it exists, otherwise it returns the executable path
-	EASTDC_API size_t GetCurrentProcessPath(char8_t* pPath, int pathCapacity, int pathFlags)
+	EASTDC_API size_t GetCurrentProcessPath(char* pPath, int pathCapacity, int pathFlags)
 	{
 		EA_ASSERT(pathCapacity > 0);
 
@@ -321,14 +321,14 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 		if(result == 0)
 		{
 			EA_ASSERT(pathCapacity >= kMaxPathLength);
-			char8_t absolutePath[PATH_MAX];
+			char absolutePath[PATH_MAX];
 
 			if(realpath(pPath, absolutePath) != NULL) // Obtain canonicalized absolute pathname.
 			{
 				if(pathFlags & kPathFlagBundlePath)
 				{
 					// We recursively call dirname() until we find .extension
-					char8_t appPath[kMaxPathLength];
+					char appPath[kMaxPathLength];
 					EA::StdC::Strlcpy(appPath, absolutePath, kMaxPathLength);
 					bool found = IsBundleFolder(appPath, kMaxPathLength);
 
@@ -360,7 +360,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 	{
 		EA_ASSERT(pathCapacity > 0); EA_UNUSED(pathCapacity);
 
-		char8_t path8[kMaxDirectoryLength];    // We don't have access to EAIO here.
+		char path8[kMaxDirectoryLength];    // We don't have access to EAIO here.
 		GetCurrentProcessDirectory(path8, EAArrayCount(path8), pathFlags);
 
 		const int intendedStrlen = Strlcpy(pDirectory, path8, pathCapacity);
@@ -372,7 +372,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 		return 0;
 	}
 
-	EASTDC_API size_t GetCurrentProcessDirectory(char8_t* pDirectory, int pathCapacity, int pathFlags)
+	EASTDC_API size_t GetCurrentProcessDirectory(char* pDirectory, int pathCapacity, int pathFlags)
 	{
 		EA_ASSERT(pathCapacity > 0);
 
@@ -393,7 +393,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 
 			if(intendedStrlen < (size_t)pathCapacity) // If succeeded...
 			{
-				for(char8_t* p = pDirectory + intendedStrlen; p > pDirectory; --p)
+				for(char* p = pDirectory + intendedStrlen; p > pDirectory; --p)
 				{
 					if(p[-1] == '/')
 					{
@@ -417,7 +417,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 
 #elif defined(EA_PLATFORM_LINUX)
 
-	EASTDC_API size_t GetCurrentProcessPath(char8_t* pPath, int pathCapacity, int /*pathFlags*/)
+	EASTDC_API size_t GetCurrentProcessPath(char* pPath, int pathCapacity, int /*pathFlags*/)
 	{
 		EA_ASSERT(pathCapacity > 0); EA_UNUSED(pathCapacity);
 
@@ -439,7 +439,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 	{
 		EA_ASSERT(pathCapacity > 0); EA_UNUSED(pathCapacity);
 
-		char8_t path8[kMaxPathLength];
+		char path8[kMaxPathLength];
 		GetCurrentProcessPath(path8, EAArrayCount(path8), pathFlags);
 
 		const int intendedStrlen = Strlcpy(pPath, path8, pathCapacity);
@@ -451,7 +451,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 		return 0;
 	}
 
-	EASTDC_API size_t GetCurrentProcessDirectory(char8_t* pDirectory, int pathCapacity, int /*pathFlags*/)
+	EASTDC_API size_t GetCurrentProcessDirectory(char* pDirectory, int pathCapacity, int /*pathFlags*/)
 	{
 		EA_ASSERT(pathCapacity > 0); EA_UNUSED(pathCapacity);
 
@@ -478,7 +478,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 	{
 		EA_ASSERT(pathCapacity > 0); EA_UNUSED(pathCapacity);
 
-		char8_t path8[kMaxDirectoryLength];    // We don't have access to EAIO here.
+		char path8[kMaxDirectoryLength];    // We don't have access to EAIO here.
 		GetCurrentProcessDirectory(path8, EAArrayCount(path8), pathFlags);
 
 		const int intendedStrlen = Strlcpy(pDirectory, path8, pathCapacity);
@@ -561,7 +561,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 	{
 		EA_ASSERT(pathCapacity > 0);
 
-		char8_t path8[kMaxPathLength];
+		char path8[kMaxPathLength];
 		GetCurrentProcessPath(path8, EAArrayCount(path8), pathFlags);
 
 		const int intendedStrlen = Strlcpy(pPath, path8, (size_t)pathCapacity);
@@ -573,7 +573,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 		return 0;
 	}
 
-	EASTDC_API size_t GetCurrentProcessPath(char8_t* pPath, int pathCapacity, int /*pathFlags*/)
+	EASTDC_API size_t GetCurrentProcessPath(char* pPath, int pathCapacity, int /*pathFlags*/)
 	{
 		EA_ASSERT(pathCapacity > 0);
 
@@ -592,7 +592,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 
 	EASTDC_API size_t GetCurrentProcessDirectory(char16_t* pDirectory, int pathCapacity, int pathFlags)
 	{
-		char8_t dir8[kMaxDirectoryLength];
+		char dir8[kMaxDirectoryLength];
 		GetCurrentProcessDirectory(dir8, EAArrayCount(dir8), pathFlags);
 
 		const int intendedStrlen = Strlcpy(pDirectory, dir8, (size_t)pathCapacity);
@@ -604,7 +604,7 @@ EASTDC_API void SetCurrentProcessPath(const char8_t* pPath)
 		return 0;
 	}
 
-	EASTDC_API size_t GetCurrentProcessDirectory(char8_t* pDirectory, int pathCapacity, int pathFlags)
+	EASTDC_API size_t GetCurrentProcessDirectory(char* pDirectory, int pathCapacity, int pathFlags)
 	{
 		EA_ASSERT(pathCapacity > 0);
 
@@ -638,7 +638,7 @@ EASTDC_API size_t GetCurrentProcessPath(char32_t* pPath, int pathCapacity, int p
 {
 	EA_ASSERT(pathCapacity > 0); EA_UNUSED(pathCapacity);
 
-	char8_t path8[kMaxPathLength];
+	char path8[kMaxPathLength];
 	GetCurrentProcessPath(path8, EAArrayCount(path8), pathFlags);
 
 	const int intendedStrlen = Strlcpy(pPath, path8, (size_t)pathCapacity);
@@ -654,7 +654,7 @@ EASTDC_API size_t GetCurrentProcessDirectory(char32_t* pDirectory, int pathCapac
 {
 	EA_ASSERT(pathCapacity > 0); EA_UNUSED(pathCapacity);
 
-	char8_t path8[kMaxDirectoryLength];    // We don't have access to EAIO here.
+	char path8[kMaxDirectoryLength];    // We don't have access to EAIO here.
 	GetCurrentProcessDirectory(path8, EAArrayCount(path8), pathFlags);
 
 	const int intendedStrlen = Strlcpy(pDirectory, path8, (size_t)pathCapacity);
@@ -687,8 +687,8 @@ EASTDC_API size_t GetEnvironmentVar(const char16_t* pName, char16_t* pValue, siz
 		return (size_t)dwLength;
 
 	#else
-		char8_t name8[260];    
-		char8_t value8[260];    
+		char name8[260];    
+		char value8[260];    
 
 		Strlcpy(name8, pName, 260);
 		const size_t len = GetEnvironmentVar(name8, value8, 260);
@@ -701,7 +701,7 @@ EASTDC_API size_t GetEnvironmentVar(const char16_t* pName, char16_t* pValue, siz
 }
 
 
-EASTDC_API size_t GetEnvironmentVar(const char8_t* pName, char8_t* pValue, size_t valueCapacity)
+EASTDC_API size_t GetEnvironmentVar(const char* pName, char* pValue, size_t valueCapacity)
 {
 	#if defined(EA_PLATFORM_WINDOWS) && EA_WINAPI_FAMILY_PARTITION(EA_WINAPI_PARTITION_DESKTOP)
 		DWORD dwLength = GetEnvironmentVariableA(pName, pValue, (DWORD)valueCapacity);
@@ -717,7 +717,7 @@ EASTDC_API size_t GetEnvironmentVar(const char8_t* pName, char8_t* pValue, size_
 		return (size_t)dwLength;
 
 	#elif defined(EA_PLATFORM_UNIX)
-		const char8_t* const var = getenv(pName);
+		const char* const var = getenv(pName);
 		if (var)
 			return Strlcpy(pValue, var, valueCapacity);
 		return (size_t)-1;
@@ -738,10 +738,10 @@ EASTDC_API bool SetEnvironmentVar(const char16_t* pName, const char16_t* pValue)
 		const BOOL bResult = SetEnvironmentVariableW(reinterpret_cast<const wchar_t*>(pName), reinterpret_cast<const wchar_t*>(pValue)); // Windows has the same behavior as us: NULL pValue removes the variable.
 		return (bResult != 0);
 	#else
-		char8_t name8[260];
+		char name8[260];
 		Strlcpy(name8, pName, 260);
 
-		char8_t value8[260];
+		char value8[260];
 		Strlcpy(value8, pValue, 260);
 
 		return SetEnvironmentVar(name8, value8);
@@ -749,7 +749,7 @@ EASTDC_API bool SetEnvironmentVar(const char16_t* pName, const char16_t* pValue)
 }
 
 
-EASTDC_API bool SetEnvironmentVar(const char8_t* pName, const char8_t* pValue)
+EASTDC_API bool SetEnvironmentVar(const char* pName, const char* pValue)
 {
 	#if defined(EA_PLATFORM_WINDOWS) && EA_WINAPI_FAMILY_PARTITION(EA_WINAPI_PARTITION_DESKTOP)
 		const BOOL bResult = SetEnvironmentVariableA(pName, pValue); // Windows has the same behavior as us: NULL pValue removes the variable.
@@ -784,14 +784,14 @@ EASTDC_API int Spawn(const char16_t* pPath, const char16_t* const* pArgumentArra
 		EA_UNUSED(pArgumentArray);
 		EA_UNUSED(wait);
 
-		// TODO: convert and call char8_t version
+		// TODO: convert and call char version
 		EA_FAIL_MESSAGE("Spawn: Not implemented for this platform.");
 		return -1;
 	#endif
 }
 
 
-EASTDC_API int Spawn(const char8_t* pPath, const char8_t* const* pArgumentArray, bool wait)
+EASTDC_API int Spawn(const char* pPath, const char* const* pArgumentArray, bool wait)
 {
 	#if defined(EA_PLATFORM_WINDOWS) && EA_WINAPI_FAMILY_PARTITION(EA_WINAPI_PARTITION_DESKTOP)
 		if(wait)
@@ -840,7 +840,7 @@ EASTDC_API int ExecuteShellCommand(const char16_t* pCommand)
 		// Todo: verify that newlines work here and support them if not.
 		return _wsystem(reinterpret_cast<const wchar_t*>(pCommand)); // We could do this via the shell api as well.
 	#else
-		char8_t command8[260];   
+		char command8[260];   
 		Strlcpy(command8, pCommand, 260);
 
 		return ExecuteShellCommand(command8);
@@ -848,7 +848,7 @@ EASTDC_API int ExecuteShellCommand(const char16_t* pCommand)
 }
 
 
-int ExecuteShellCommand(const char8_t* pCommand)
+int ExecuteShellCommand(const char* pCommand)
 {
 	#if defined(EA_PLATFORM_WINDOWS) && EA_WINAPI_FAMILY_PARTITION(EA_WINAPI_PARTITION_DESKTOP)
 		// Todo: verify that newlines work here and support them if not.
@@ -864,7 +864,7 @@ int ExecuteShellCommand(const char8_t* pCommand)
 
 
 #if defined(DISABLED_____EA_PLATFORM_UNIX) // Need to implement this in a way that doesn't use EASTL or an allocator.
-	EASTDC_API bool SearchEnvPathWithMode(const char8_t* pathListVar, const char8_t* fileName, int mode, eastl::string8* fullPath)
+	EASTDC_API bool SearchEnvPathWithMode(const char* pathListVar, const char* fileName, int mode, eastl::string8* fullPath)
 	{
 		if (*fileName == '/' || *fileName == '\\')
 		{
@@ -921,8 +921,8 @@ EASTDC_API bool SearchEnvironmentPath(const char16_t* pFileName, char16_t* pPath
 		return (*pPath != 0);
 
 	#else 
-		char8_t path8    [260]; 
-		char8_t fileName8[260]; 
+		char path8    [260]; 
+		char fileName8[260]; 
 
 		Strlcpy(path8,     pPath,     260);
 		Strlcpy(fileName8, pFileName, 260);
@@ -931,7 +931,7 @@ EASTDC_API bool SearchEnvironmentPath(const char16_t* pFileName, char16_t* pPath
 
 		if (pEnvironmentVar)
 		{
-			char8_t environmentVariable8[260]; 
+			char environmentVariable8[260]; 
 			Strlcpy(environmentVariable8, pEnvironmentVar, 260);
 
 			success = EA::StdC::SearchEnvironmentPath(fileName8, path8, environmentVariable8);
@@ -945,7 +945,7 @@ EASTDC_API bool SearchEnvironmentPath(const char16_t* pFileName, char16_t* pPath
 }
 
 
-EASTDC_API bool SearchEnvironmentPath(const char8_t* pFileName, char8_t* pPath, const char8_t* pEnvironmentVar)
+EASTDC_API bool SearchEnvironmentPath(const char* pFileName, char* pPath, const char* pEnvironmentVar)
 {
 	#if defined(EA_PLATFORM_WINDOWS) && EA_WINAPI_FAMILY_PARTITION(EA_WINAPI_PARTITION_DESKTOP)
 		if(!pEnvironmentVar)
@@ -1025,7 +1025,7 @@ EASTDC_API bool SearchEnvironmentPath(const char8_t* pFileName, char8_t* pPath,
 		return ((uintptr_t)hInstance > 32);
 	}
 
-	EASTDC_API bool OpenFile(const char8_t* pPath)
+	EASTDC_API bool OpenFile(const char* pPath)
 	{
 		char16_t path16[260]; 
 		Strlcpy(path16, pPath, 260);
@@ -1037,16 +1037,16 @@ EASTDC_API bool SearchEnvironmentPath(const char8_t* pFileName, char8_t* pPath,
 
 	EASTDC_API bool OpenFile(const char16_t* pPath)
 	{
-		char8_t path8[260];
+		char path8[260];
 		Strlcpy(path8, pPath, 260);
 
 		return OpenFile(path8);
 	}
 
-	EASTDC_API bool OpenFile(const char8_t* pPath)
+	EASTDC_API bool OpenFile(const char* pPath)
 	{
 		#if defined (EA_PLATFORM_OSX)
-			const char8_t* args[] =
+			const char* args[] =
 			{
 				"open",
 				pPath,

+ 9 - 9
source/EAScanf.cpp

@@ -14,10 +14,10 @@ namespace StdC
 {
 
 ///////////////////////////////////////////////////////////////////////////////
-// char8_t functions
+// char functions
 ///////////////////////////////////////////////////////////////////////////////
 
-EASTDC_API int Cscanf(ReadFunction8 pReadFunction8, void* pContext, const char8_t* pFormat, ...)
+EASTDC_API int Cscanf(ReadFunction8 pReadFunction8, void* pContext, const char* pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -25,7 +25,7 @@ EASTDC_API int Cscanf(ReadFunction8 pReadFunction8, void* pContext, const char8_
 	return ScanfLocal::VscanfCore(pReadFunction8, pContext, pFormat, arguments); 
 }
 
-EASTDC_API int Fscanf(FILE* pFile, const char8_t* pFormat, ...)
+EASTDC_API int Fscanf(FILE* pFile, const char* pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -33,7 +33,7 @@ EASTDC_API int Fscanf(FILE* pFile, const char8_t* pFormat, ...)
 	return ScanfLocal::VscanfCore(ScanfLocal::FILEReader8, pFile, pFormat, arguments); 
 }
 
-EASTDC_API int Scanf(const char8_t* pFormat, ...)
+EASTDC_API int Scanf(const char* pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -41,7 +41,7 @@ EASTDC_API int Scanf(const char8_t* pFormat, ...)
 	return ScanfLocal::VscanfCore(ScanfLocal::FILEReader8, stdin, pFormat, arguments); 
 }
 
-EASTDC_API int Sscanf(const char8_t* pDestination, const char8_t* pFormat, ...)
+EASTDC_API int Sscanf(const char* pDestination, const char* pFormat, ...)
 {
 	ScanfLocal::SscanfContext8 sc(pDestination);
 
@@ -52,22 +52,22 @@ EASTDC_API int Sscanf(const char8_t* pDestination, const char8_t* pFormat, ...)
 }
 
 
-EASTDC_API int Vcscanf(ReadFunction8 pReadFunction8, void* pContext, const char8_t* pFormat, va_list arguments)
+EASTDC_API int Vcscanf(ReadFunction8 pReadFunction8, void* pContext, const char* pFormat, va_list arguments)
 {
 	return ScanfLocal::VscanfCore(pReadFunction8, pContext, pFormat, arguments); 
 }
 
-EASTDC_API int Vfscanf(FILE* pFile, const char8_t* pFormat, va_list arguments)
+EASTDC_API int Vfscanf(FILE* pFile, const char* pFormat, va_list arguments)
 {
 	return ScanfLocal::VscanfCore(ScanfLocal::FILEReader8, pFile, pFormat, arguments); 
 }
 
-EASTDC_API int Vscanf(const char8_t* pFormat, va_list arguments)
+EASTDC_API int Vscanf(const char* pFormat, va_list arguments)
 {
 	return ScanfLocal::VscanfCore(ScanfLocal::FILEReader8, stdin, pFormat, arguments); 
 }
 
-EASTDC_API int Vsscanf(const char8_t* pDestination, const char8_t* pFormat, va_list arguments)
+EASTDC_API int Vsscanf(const char* pDestination, const char* pFormat, va_list arguments)
 {
 	ScanfLocal::SscanfContext8 sc(pDestination);
 

+ 26 - 26
source/EAScanfCore.cpp

@@ -291,7 +291,7 @@ double DoubleValue::ToDouble() const
 		// provided strtod function, which in many cases will implement such 
 		// an algorithm itself internally.
 
-		char8_t buffer[kMaxSignificandDigits + 12];
+		char buffer[kMaxSignificandDigits + 12];
 		int     i;
 
 		for(i = 0; i < mSigLen; ++i)
@@ -319,7 +319,7 @@ double DoubleValue::ToDouble() const
 
 			while(multiplier)
 			{
-				buffer[i++] = (char8_t)('0' + (e / multiplier));
+				buffer[i++] = (char)('0' + (e / multiplier));
 				e          %= multiplier;
 				multiplier /= 10;
 			}
@@ -669,7 +669,7 @@ public:
 						switch (stringTypeSize)
 						{
 							case 1:
-								*((char8_t*)pArgumentCurrent)  = 0;
+								*((char*)pArgumentCurrent)  = 0;
 								break;
 
 							case 2:
@@ -750,7 +750,7 @@ public:
 										//    ReportScanfWarning(loss of information);
 									#endif
 
-									*((char8_t*)pArgumentCurrent) = (char8_t)(uint8_t)(unsigned)c;
+									*((char*)pArgumentCurrent) = (char)(uint8_t)(unsigned)c;
 									break;
 
 								case 2:
@@ -961,16 +961,16 @@ private:
 				}
 				break;
 
-			case 'c': // We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char8_t, char16_t, char32_t)
-			case 'C': // We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char8_t, char16_t, char32_t)
-			case 's': // We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char8_t, char16_t, char32_t)
-			case 'S': // We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char8_t, char16_t, char32_t)
+			case 'c': // We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char, char16_t, char32_t)
+			case 'C': // We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char, char16_t, char32_t)
+			case 's': // We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char, char16_t, char32_t)
+			case 'S': // We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char, char16_t, char32_t)
 			{
 				// Microsoft's library goes against the C and C++ standard: %s is 
-				// not interpreted to mean char8_t string but instead is interpreted 
-				// to be either char8_t or wchar_t depending on what the output
+				// not interpreted to mean char string but instead is interpreted 
+				// to be either char or wchar_t depending on what the output
 				// text fd is. This is non-standard but has the convenience
-				// of allowing users to migrate between char8_t and wchar_t usage
+				// of allowing users to migrate between char and wchar_t usage
 				// more easily. So we allow EASCANF_MS_STYLE_S_FORMAT to control this.
 
 				if(fd.mModifier == kModifierLong)
@@ -981,9 +981,9 @@ private:
 				{
 					#if EASCANF_MS_STYLE_S_FORMAT
 						if((c == 's') || (c == 'c'))
-							fd.mModifier = (sizeof(*pFormat) == sizeof(char8_t)) ? kModifierChar : kModifierWChar;
+							fd.mModifier = (sizeof(*pFormat) == sizeof(char)) ? kModifierChar : kModifierWChar;
 						else
-							fd.mModifier = (sizeof(*pFormat) == sizeof(char8_t)) ? kModifierWChar : kModifierChar;
+							fd.mModifier = (sizeof(*pFormat) == sizeof(char)) ? kModifierWChar : kModifierChar;
 					#else
 						if((c == 's') || (c == 'c'))
 							fd.mModifier = kModifierChar;
@@ -1093,7 +1093,7 @@ private:
 				else if(fd.mModifier == kModifierNone)
 				{
 					#if EASCANF_MS_STYLE_S_FORMAT
-						fd.mModifier = (sizeof(*pFormat) == sizeof(char8_t)) ? kModifierChar : kModifierWChar;
+						fd.mModifier = (sizeof(*pFormat) == sizeof(char)) ? kModifierChar : kModifierWChar;
 					#else
 						fd.mModifier = (sizeof(*pFormat) == sizeof(char16_t)) ? kModifierWChar : kModifierChar;  //TODO: This condition seems odd, needs review.
 					#endif
@@ -1119,7 +1119,7 @@ private:
 				}
 
 				// To do: We need to read UTF8 character sequences here instead of just ascii values.
-				EA_ASSERT((sizeof(CharT) != sizeof(char8_t)) || ((uint8_t)(char8_t)c < 128)); // A c >= 128 refers to a UTF8 sequence, which we don't yet support.
+				EA_ASSERT((sizeof(CharT) != sizeof(char)) || ((uint8_t)(char)c < 128)); // A c >= 128 refers to a UTF8 sequence, which we don't yet support.
 
 				while(c && (c != ']'))  // Walk through the characters until we encounter a closing ']' char. Use '-' char to indicate character ranges, as in "a-d"
 				{
@@ -1468,7 +1468,7 @@ private:
 					if(Isdigit((CharT)c))
 					{
 						if(doubleValue.mSigLen < kMaxSignificandDigits)  // If we have any more room...
-							doubleValue.mSigStr[doubleValue.mSigLen++] = (char8_t)c;
+							doubleValue.mSigStr[doubleValue.mSigLen++] = (char)c;
 						else
 							nExponentAdd++; // Lose significant digits but increase the exponent multiplier, so that the final result is close intended value, though chopped.
 
@@ -1509,7 +1509,7 @@ private:
 							nExponentAdd--;  // Fractional digits reduce our multiplier.
 
 							if((c != '0') || doubleValue.mSigLen)
-								doubleValue.mSigStr[doubleValue.mSigLen++] = (char8_t)c;
+								doubleValue.mSigStr[doubleValue.mSigLen++] = (char)c;
 						} // Else lose the remaining fractional part.
 
 						c = pReadFunction(kReadActionRead, 0, pContext);
@@ -1780,9 +1780,9 @@ private:
 
 bool ReadFormatSpan8(FormatData& fd, int& c, ReadFunction8 pReadFunction, void* pContext, int stringTypeSize, char*& pArgumentCurrent, int& nReadCount)
 {
-	while(fd.mnWidth-- && ((c = pReadFunction(kReadActionRead, 0, pContext)) != -1) && fd.mCharBitmap.Get((char8_t)c)) 
+	while(fd.mnWidth-- && ((c = pReadFunction(kReadActionRead, 0, pContext)) != -1) && fd.mCharBitmap.Get((char)c)) 
 	{
-		uint8_t c8 = (uint8_t)c; // It's easier to work with uint8_t instead of char8_t, which might be signed.
+		uint8_t c8 = (uint8_t)c; // It's easier to work with uint8_t instead of char, which might be signed.
 
 		switch (stringTypeSize)
 		{
@@ -1806,13 +1806,13 @@ bool ReadFormatSpan8(FormatData& fd, int& c, ReadFunction8 pReadFunction, void*
 					// We need to convert from UTF8 to UCS here. However, this can be complicated because 
 					// multiple UTF8 chars may correspond to a single UCS char. Luckily, the UTF8 format  
 					// allows us to know how many chars are in a multi-byte sequence based on the char value.
-					char8_t      buffer[7];
+					char      buffer[7];
 					const size_t utf8Len = utf8lengthTable[c8];
 					char16_t     c16[2];
 					char32_t     c32[2];
 					int          result;
 
-					buffer[0] = (char8_t)c8;
+					buffer[0] = (char)c8;
 
 					for(size_t i = 1; i < utf8Len; ++i)
 					{
@@ -1822,7 +1822,7 @@ bool ReadFormatSpan8(FormatData& fd, int& c, ReadFunction8 pReadFunction, void*
 							return false;
 	 
 						++nReadCount;
-						buffer[i] = (char8_t)c;
+						buffer[i] = (char)c;
 					}
 
 							
@@ -1862,7 +1862,7 @@ bool ReadFormatSpan16(FormatData& fd, int& c, ReadFunction16 pReadFunction, void
 			// We need to convert from UCS2 to UTF8 here. One UCS2 char may convert to 
 			// as many as six UTF8 chars (though usually no more than three). 
 			// This Strlcpy (16 to 8) can never fail.
-			pArgumentCurrent += Strlcpy((char8_t*)pArgumentCurrent, &c16, 7, 1);
+			pArgumentCurrent += Strlcpy((char*)pArgumentCurrent, &c16, 7, 1);
 			break;
 
 		case 2:
@@ -1893,7 +1893,7 @@ bool ReadFormatSpan32(FormatData& fd, int& c, ReadFunction32 pReadFunction, void
 			// We need to convert from UCS4 to UTF8 here. One UCS4 char may convert to 
 			// as many as six UTF8 chars (though usually no more than three). 
 			// This Strlcpy (32 to 8) can never fail.
-			pArgumentCurrent += Strlcpy((char8_t*)pArgumentCurrent, &c32, 7, 1);
+			pArgumentCurrent += Strlcpy((char*)pArgumentCurrent, &c32, 7, 1);
 			break;
 
 		case 2:
@@ -1916,9 +1916,9 @@ typedef bool(*ReadFormatSpanFunction8)(FormatData& fd, int& c, ReadFunction8 pRe
 typedef bool(*ReadFormatSpanFunction16)(FormatData& fd, int& c, ReadFunction16 pReadFunction, void* pContext, int stringTypeSize, char*& pArgumentCurrent, int& nReadCount);
 typedef bool(*ReadFormatSpanFunction32)(FormatData& fd, int& c, ReadFunction32 pReadFunction, void* pContext, int stringTypeSize, char*& pArgumentCurrent, int& nReadCount);
 
-int VscanfCore(ReadFunction8 pReadFunction8, void* pContext, const char8_t* pFormat, va_list arguments)
+int VscanfCore(ReadFunction8 pReadFunction8, void* pContext, const char* pFormat, va_list arguments)
 {
-	VscanfUtil<ReadFunction8, ReadFormatSpanFunction8, char8_t> scanner;
+	VscanfUtil<ReadFunction8, ReadFormatSpanFunction8, char> scanner;
 	return scanner.VscanfCore(pReadFunction8, ReadFormatSpan8, pContext, pFormat, arguments);
 }
 

+ 15 - 69
source/EASprintf.cpp

@@ -25,15 +25,15 @@ namespace StdC
 
 
 ///////////////////////////////////////////////////////////////////////////////
-// char8_t 
+// char 
 ///////////////////////////////////////////////////////////////////////////////
 
-EASTDC_API int Vcprintf(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int Vcprintf(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pContext, const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	return SprintfLocal::VprintfCore(pWriteFunction8, pContext, pFormat, arguments);
 }
 
-EASTDC_API int Vfprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int Vfprintf(FILE* EA_RESTRICT pFile, const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	#if EASTDC_PRINTF_DEBUG_ENABLED
 		if((pFile == stdout) || (pFile == stderr))
@@ -46,7 +46,7 @@ EASTDC_API int Vfprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFor
 	return SprintfLocal::VprintfCore(SprintfLocal::FILEWriter8, pFile, pFormat, arguments);
 }
 
-EASTDC_API int Vprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int Vprintf(const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	#if EASTDC_PRINTF_DEBUG_ENABLED
 		SprintfLocal::PlatformLogWriterContext8 context;
@@ -56,12 +56,12 @@ EASTDC_API int Vprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments)
 	#endif
 }
 
-EASTDC_API int Vsprintf(char8_t* EA_RESTRICT pDestination, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int Vsprintf(char* EA_RESTRICT pDestination, const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	return Vsnprintf(pDestination, (size_t)-1, pFormat, arguments);
 }
 
-EASTDC_API int Vsnprintf(char8_t* EA_RESTRICT pDestination, size_t n, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int Vsnprintf(char* EA_RESTRICT pDestination, size_t n, const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	SprintfLocal::SnprintfContext8 sc(pDestination, 0, pDestination ? n : 0);
 
@@ -92,13 +92,13 @@ EASTDC_API int Vsnprintf(char8_t* EA_RESTRICT pDestination, size_t n, const char
 	#endif
 }
 
-EASTDC_API int Vscprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int Vscprintf(const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	// vscprintf returns the number of chars that are needed for a printf operation.
 	return Vsnprintf(NULL, 0, pFormat, arguments);
 }
 
-EASTDC_API int Vdprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int Vdprintf(const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	SprintfLocal::PlatformLogWriterContext8 context;
 	return SprintfLocal::VprintfCore(SprintfLocal::PlatformLogWriter8, &context, pFormat, arguments);
@@ -107,7 +107,7 @@ EASTDC_API int Vdprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments)
 
 
 
-EASTDC_API int Cprintf(WriteFunction8 pWriteFunction, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, ...)
+EASTDC_API int Cprintf(WriteFunction8 pWriteFunction, void* EA_RESTRICT pContext, const char* EA_RESTRICT pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -119,7 +119,7 @@ EASTDC_API int Cprintf(WriteFunction8 pWriteFunction, void* EA_RESTRICT pContext
 	return result;
 }
 
-EASTDC_API int Fprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFormat, ...)
+EASTDC_API int Fprintf(FILE* EA_RESTRICT pFile, const char* EA_RESTRICT pFormat, ...)
 {
 	int result;
 
@@ -142,7 +142,7 @@ EASTDC_API int Fprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pForm
 	return result;
 }
 
-EASTDC_API int Printf(const char8_t* EA_RESTRICT pFormat, ...)
+EASTDC_API int Printf(const char* EA_RESTRICT pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -159,7 +159,7 @@ EASTDC_API int Printf(const char8_t* EA_RESTRICT pFormat, ...)
 	return result;
 }
 
-EASTDC_API int Sprintf(char8_t* EA_RESTRICT pDestination, const char8_t* EA_RESTRICT pFormat, ...)
+EASTDC_API int Sprintf(char* EA_RESTRICT pDestination, const char* EA_RESTRICT pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -171,7 +171,7 @@ EASTDC_API int Sprintf(char8_t* EA_RESTRICT pDestination, const char8_t* EA_REST
 	return result;
 }
 
-EASTDC_API int Snprintf(char8_t* EA_RESTRICT pDestination, size_t n, const char8_t* EA_RESTRICT pFormat, ...)
+EASTDC_API int Snprintf(char* EA_RESTRICT pDestination, size_t n, const char* EA_RESTRICT pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -183,7 +183,7 @@ EASTDC_API int Snprintf(char8_t* EA_RESTRICT pDestination, size_t n, const char8
 	return result;
 }
 
-EASTDC_API int Dprintf(const char8_t* EA_RESTRICT pFormat, ...)
+EASTDC_API int Dprintf(const char* EA_RESTRICT pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -451,62 +451,8 @@ EASTDC_API int Snprintf(char32_t* EA_RESTRICT pDestination, size_t n, const char
 // Deprecated functionality
 ///////////////////////////////////////////////////////////////////////////
 
-struct Bridge8
-{
-	WriteFunction8Old mpOldWriteFunction;
-	void*             mpUserContext;
-};
-
-static int WriteFunctionBridge8(const char8_t* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8, WriteFunctionState /*wfs*/)
-{
-	Bridge8* pBridge8 = (Bridge8*)pContext8;
-	return pBridge8->mpOldWriteFunction(pData, nCount, pBridge8->mpUserContext);
-}
-
-struct Bridge16
-{
-	WriteFunction16Old mpOldWriteFunction;
-	void*              mpUserContext;
-};
-
-static int WriteFunctionBridge16(const char16_t* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext16, WriteFunctionState /*wfs*/)
-{
-	Bridge16* pBridge16 = (Bridge16*)pContext16;
-	return pBridge16->mpOldWriteFunction(pData, nCount, pBridge16->mpUserContext);
-}
-
-EASTDC_API int Cprintf(WriteFunction8Old pWriteFunction, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, ...)
-{
-	va_list arguments;
-	va_start(arguments, pFormat);
-	int result = Vcprintf(pWriteFunction, pContext, pFormat, arguments);
-	va_end(arguments);
-	return result;
-}
-
-EASTDC_API int Cprintf(WriteFunction16Old pWriteFunction, void* EA_RESTRICT pContext, const char16_t* EA_RESTRICT pFormat, ...)
-{
-	va_list arguments;
-	va_start(arguments, pFormat);
-	int result = Vcprintf(pWriteFunction, pContext, pFormat, arguments);
-	va_end(arguments);
-	return result;
-}
-
-EASTDC_API int Vcprintf(WriteFunction8Old pWriteFunction8, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, va_list arguments)
-{
-	Bridge8 bridge8 = { pWriteFunction8, pContext };
-	return SprintfLocal::VprintfCore(WriteFunctionBridge8, &bridge8, pFormat, arguments);
-}
-
-EASTDC_API int Vcprintf(WriteFunction16Old pWriteFunction16, void* EA_RESTRICT pContext, const char16_t* EA_RESTRICT pFormat, va_list arguments)
-{
-	Bridge16 bridge16 = { pWriteFunction16, pContext };
-	return SprintfLocal::VprintfCore(WriteFunctionBridge16, &bridge16, pFormat, arguments);
-}
-
 #if EASTDC_VSNPRINTF8_ENABLED
-	EASTDC_API int Vsnprintf8(char8_t* EA_RESTRICT pDestination, size_t n, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+	EASTDC_API int Vsnprintf8(char* EA_RESTRICT pDestination, size_t n, const char* EA_RESTRICT pFormat, va_list arguments)
 	{
 		return Vsnprintf(pDestination, n, pFormat, arguments);
 	}

+ 21 - 21
source/EASprintfCore.cpp

@@ -52,7 +52,7 @@ namespace SprintfLocal
 {
 
 
-int StringWriter8(const char8_t* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8, WriteFunctionState /*wfs*/)
+int StringWriter8(const char* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8, WriteFunctionState /*wfs*/)
 {
 	using namespace SprintfLocal;
 
@@ -133,10 +133,10 @@ int StringWriter32(const char32_t* EA_RESTRICT pData, size_t nCount, void* EA_RE
 
 
 
-int FILEWriter8(const char8_t* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8, WriteFunctionState /*wfs*/)
+int FILEWriter8(const char* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8, WriteFunctionState /*wfs*/)
 {
 	FILE* const pFile = (FILE*)pContext8;
-	const size_t nResult = fwrite(pData, sizeof(char8_t), nCount, pFile); // It's OK if nCount == 0.
+	const size_t nResult = fwrite(pData, sizeof(char), nCount, pFile); // It's OK if nCount == 0.
 	if(nResult == nCount)
 		return (int)(unsigned)nResult;
 	return -1;
@@ -165,7 +165,7 @@ int FILEWriter32(const char32_t* EA_RESTRICT pData, size_t nCount, void* EA_REST
 ///////////////////////////////////////////////////////////////////////////////
 // PlatformLogWriter8
 //
-int PlatformLogWriter8(const char8_t* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8, WriteFunctionState)
+int PlatformLogWriter8(const char* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8, WriteFunctionState)
 {
 	#if defined(EA_PLATFORM_ANDROID)
 		// The __android_log_write function appends a \n to every call you make to it. This is a problem for 
@@ -386,7 +386,7 @@ template <typename CharT>
 const CharT* StringNull();
 
 template <>
-const char8_t* StringNull<char8_t>() { return kStringNull8; }
+const char* StringNull<char>() { return kStringNull8; }
 
 template <>
 const char16_t* StringNull<char16_t>() { return kStringNull16; }
@@ -573,7 +573,7 @@ int StringFormat(int(*pWriteFunction)(const OutCharT* EA_RESTRICT pData, size_t
 // ReadFormat
 //
 // Reads the current format into FormatData. Return value is pointer to first
-// char8_t after the format data.
+// char after the format data.
 //
 // To know how printf truly needs to work, see the ISO C 1999 standard, section 7.19.6.1.
 // See http://www.cplusplus.com/ref/cstdio/printf.html or http://www.opengroup.org/onlinepubs/007908799/xsh/fprintf.html 
@@ -718,7 +718,7 @@ const CharT* ReadFormat(const CharT* EA_RESTRICT pFormat, SprintfLocal::FormatDa
 		case 'h':
 			if(pFormatCurrent[1] == 'h') // If the user specified %hh ...
 			{
-				// Specifies that a following d, i, o, u, x, or X conversion specifier applies to a signed char or unsigned char argument (the argument will have been promoted according to the integer promotions, but its value shall be converted to signed char8_t or unsigned char8_t before printing); or that a following n conversion specifier applies to a pointer to a signed char8_t argument.
+				// Specifies that a following d, i, o, u, x, or X conversion specifier applies to a signed char or unsigned char argument (the argument will have been promoted according to the integer promotions, but its value shall be converted to signed char or unsigned char before printing); or that a following n conversion specifier applies to a pointer to a signed char argument.
 				fd.mModifier = kModifierChar;
 				c = *++pFormatCurrent;
 			}
@@ -858,20 +858,20 @@ const CharT* ReadFormat(const CharT* EA_RESTRICT pFormat, SprintfLocal::FormatDa
 
 			break;
 
-		case 'c': // We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char8_t, char16_t, char32_t)
-		case 'C': // We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char8_t, char16_t, char32_t)
-		case 's': // We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char8_t, char16_t, char32_t)
-		case 'S': // We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char8_t, char16_t, char32_t)
+		case 'c': // We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char, char16_t, char32_t)
+		case 'C': // We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char, char16_t, char32_t)
+		case 's': // We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char, char16_t, char32_t)
+		case 'S': // We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char, char16_t, char32_t)
 			// If the user specified zero-fill above, then it is a mistake and we 
 			// need to use spaces instead. So we restore the fallback alignment.
 			if(fd.mAlignment == kAlignmentZeroFill)
 				fd.mAlignment = alignmentNonZeroFill;
 
 			// Microsoft's library goes against the standard: %s is 
-			// interpreted to mean char8_t string but instead is interpreted 
-			// to be either char8_t or wchar_t depending on what the output
+			// interpreted to mean char string but instead is interpreted 
+			// to be either char or wchar_t depending on what the output
 			// text format is. This is non-standard but has the convenience
-			// of allowing users to migrate between char8_t and wchar_t usage
+			// of allowing users to migrate between char and wchar_t usage
 			// more easily. So we allow EASPRINTF_MS_STYLE_S_FORMAT to control this.
 			if(fd.mModifier == kModifierShort)
 				fd.mModifier = kModifierChar;
@@ -1207,7 +1207,7 @@ CharT* WriteDouble(const SprintfLocal::FormatData& fd, double dValue, CharT* EA_
 
 				if(!((nExponent < -4) || (nExponent >= nPrecision)))
 				{
-					if(!IsSameType<CharT, char8_t>::value)
+					if(!IsSameType<CharT, char>::value)
 					{
 						if(nExponent >= 0) // If there are any digits to the left of the decimal...
 							nPrecision -= (nExponent + 1);
@@ -1722,8 +1722,8 @@ int VprintfCoreInternal(int(*pWriteFunction)(const CharT* EA_RESTRICT pData, siz
 					{
 						case 1:
 						{
-							const char8_t* pBufferData8 = va_arg(arguments, char8_t*);
-							nWriteCount = StringFormat<char8_t, CharT>(pWriteFunction, pWriteFunctionContext, fd, pBuffer, pBufferData8);
+							const char* pBufferData8 = va_arg(arguments, char*);
+							nWriteCount = StringFormat<char, CharT>(pWriteFunction, pWriteFunctionContext, fd, pBuffer, pBufferData8);
 							if (nWriteCount < 0)
 								goto FormatError;
 							nWriteCountSum += nWriteCount;
@@ -1764,7 +1764,7 @@ int VprintfCoreInternal(int(*pWriteFunction)(const CharT* EA_RESTRICT pData, siz
 					{
 						case kModifierInt8:
 						case kModifierChar:
-							*(char8_t*)pCountBufferData = (char8_t)nWriteCountSum;
+							*(char*)pCountBufferData = (char)nWriteCountSum;
 							break;
 
 						case kModifierInt16:
@@ -1848,7 +1848,7 @@ int VprintfCoreInternal(int(*pWriteFunction)(const CharT* EA_RESTRICT pData, siz
 					{
 					case 1:
 					{
-						const char8_t c8 = (char8_t)va_arg(arguments, int); // We make the assumption here that sizeof(char16_t) is <= sizeof(int) and thus that a char16_t argument was promoted to int.
+						const char c8 = (char)va_arg(arguments, int); // We make the assumption here that sizeof(char16_t) is <= sizeof(int) and thus that a char16_t argument was promoted to int.
 						pBuffer[0] = (CharT)(uint32_t)c8;
 						pBufferData = pBuffer;
 						nWriteCount = 1;
@@ -1877,7 +1877,7 @@ int VprintfCoreInternal(int(*pWriteFunction)(const CharT* EA_RESTRICT pData, siz
 
 				case '%':
 				{
-					// In this case we just write a single '%' char8_t to the output.
+					// In this case we just write a single '%' char to the output.
 					pBuffer[0] = '%';
 					pBufferData = pBuffer;
 					nWriteCount = 1;
@@ -1920,7 +1920,7 @@ FunctionError:
 ///////////////////////////////////////////////////////////////////////////////
 // VprintfCore
 //
-int VprintfCore(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pWriteFunctionContext8, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+int VprintfCore(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pWriteFunctionContext8, const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	return VprintfCoreInternal(pWriteFunction8, pWriteFunctionContext8, pFormat, arguments);
 }

+ 20 - 20
source/EASprintfOrdered.cpp

@@ -42,12 +42,12 @@ static const int kSpanFormatCapacity = 16;
 
 struct Span8
 {
-	const char8_t* mpBegin;                         // The first char in the span.
-	const char8_t* mpEnd;                           // One-past the last used char.
+	const char* mpBegin;                         // The first char in the span.
+	const char* mpEnd;                           // One-past the last used char.
 	Modifier       mType;                           // This tells us what the type of the argument is (e.g. kModifierInt).
 	AllTypes       mValue;                          // This stores the value, which is of type mType.
-	char8_t        mFormat[kSpanFormatCapacity];    // The format to use (e.g. %5.3f). If empty then this is a string span.
-	char8_t        mFormatChar;                     // The last char in the mFormat string.
+	char        mFormat[kSpanFormatCapacity];    // The format to use (e.g. %5.3f). If empty then this is a string span.
+	char        mFormatChar;                     // The last char in the mFormat string.
 	int            mUserIndex;                      // The index the user assigned to this format. Negative value if this is a string span.
 	bool           mbEscapePresent;                 // True if the span is a string and it has a %% sequence. We can optimize writes if we know that it doesn't.
 
@@ -106,7 +106,7 @@ struct Span32
 
 // This function exists for the sole purpose of passing an arbitrary argument to VprintfCore
 // along with an existing WriteFunction8/pWriteFunctionContext8. 
-static int CallVprintfCore(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pWriteFunctionContext8, const char8_t* EA_RESTRICT pFormat, ...)
+static int CallVprintfCore(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pWriteFunctionContext8, const char* EA_RESTRICT pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -143,7 +143,7 @@ static int CallVprintfCore(WriteFunction32 pWriteFunction32, void* EA_RESTRICT p
 // Non-format segments are simply copied to the output. Format segments are written to the output
 // by a call to VPrintfCore each. 
 //
-static int OVprintfCore(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pWriteFunctionContext8, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+static int OVprintfCore(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pWriteFunctionContext8, const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	const int       kArgCapacity = 10;           // Currently only single digit ('0'-'9') order values are supported.
 	const int       kSpanCapacity = 21;          // Worst case scenario of 21 spans. For example: " %2:d %7:d %1:d %6:d %3:d %5:d %4:d %0:d %8:d %9:d " or "%0:d%1:d%2:d%3:d%4:d%5:d%6:d%7:d%8:d%9:d"
@@ -155,8 +155,8 @@ static int OVprintfCore(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pWrite
 	int             nFormatLength      = 0;
 	int             nWriteCountSum     = 0;
 	int             startIndex         = 1;      // This is 1 or 0, and it defaults to 1 (but may change below) in order to mean that user formats start at 1, as in "%1:d". However, we have a feature whereby we detect that the user is using %0 as the start index.
-	const char8_t*  p;
-	const char8_t*  pEnd;
+	const char*  p;
+	const char*  pEnd;
 	int             result;
 
 	static_assert((EAArrayCount(spans) == kSpanCapacity) && (EAArrayCount(spanArgOrder) == kArgCapacity), "spans and spanArgOrder are not using constants for their array size.");
@@ -1240,30 +1240,30 @@ static int OVprintfCore(WriteFunction32 pWriteFunction32, void* EA_RESTRICT pWri
 
 
 ///////////////////////////////////////////////////////////////////////////////
-// char8_t
+// char
 ///////////////////////////////////////////////////////////////////////////////
 
-EASTDC_API int OVcprintf(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int OVcprintf(WriteFunction8 pWriteFunction8, void* EA_RESTRICT pContext, const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	return SprintfLocal::OVprintfCore(pWriteFunction8, pContext, pFormat, arguments);
 }
 
-EASTDC_API int OVfprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int OVfprintf(FILE* EA_RESTRICT pFile, const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	return SprintfLocal::OVprintfCore(SprintfLocal::FILEWriter8, pFile, pFormat, arguments);
 }
 
-EASTDC_API int OVprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int OVprintf(const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	return SprintfLocal::OVprintfCore(SprintfLocal::FILEWriter8, stdout, pFormat, arguments);
 }
 
-EASTDC_API int OVsprintf(char8_t* EA_RESTRICT pDestination, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int OVsprintf(char* EA_RESTRICT pDestination, const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	return OVsnprintf(pDestination, (size_t)-1, pFormat, arguments);
 }
 
-EASTDC_API int OVsnprintf(char8_t* EA_RESTRICT pDestination, size_t n, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int OVsnprintf(char* EA_RESTRICT pDestination, size_t n, const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	SprintfLocal::SnprintfContext8 sc(pDestination, 0, pDestination ? n : 0);
 
@@ -1292,20 +1292,20 @@ EASTDC_API int OVsnprintf(char8_t* EA_RESTRICT pDestination, size_t n, const cha
 	#endif
 }
 
-EASTDC_API int OVscprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments)
+EASTDC_API int OVscprintf(const char* EA_RESTRICT pFormat, va_list arguments)
 {
 	// vscprintf returns the number of chars that are needed for a printf operation.
 	return OVsnprintf(NULL, 0, pFormat, arguments);
 }
 
-EASTDC_API int OCprintf(WriteFunction8 pWriteFunction, void* EA_RESTRICT pContext, const char8_t* EA_RESTRICT pFormat, ...)
+EASTDC_API int OCprintf(WriteFunction8 pWriteFunction, void* EA_RESTRICT pContext, const char* EA_RESTRICT pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
 	return SprintfLocal::OVprintfCore(pWriteFunction, pContext, pFormat, arguments);
 }
 
-EASTDC_API int OFprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFormat, ...)
+EASTDC_API int OFprintf(FILE* EA_RESTRICT pFile, const char* EA_RESTRICT pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -1313,7 +1313,7 @@ EASTDC_API int OFprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFor
 	return SprintfLocal::OVprintfCore(SprintfLocal::FILEWriter8, pFile, pFormat, arguments);
 }
 
-EASTDC_API int OPrintf(const char8_t* EA_RESTRICT pFormat, ...)
+EASTDC_API int OPrintf(const char* EA_RESTRICT pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -1321,7 +1321,7 @@ EASTDC_API int OPrintf(const char8_t* EA_RESTRICT pFormat, ...)
 	return SprintfLocal::OVprintfCore(SprintfLocal::FILEWriter8, stdout, pFormat, arguments);
 }
 
-EASTDC_API int OSprintf(char8_t* EA_RESTRICT pDestination, const char8_t* EA_RESTRICT pFormat, ...)
+EASTDC_API int OSprintf(char* EA_RESTRICT pDestination, const char* EA_RESTRICT pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);
@@ -1329,7 +1329,7 @@ EASTDC_API int OSprintf(char8_t* EA_RESTRICT pDestination, const char8_t* EA_RES
 	return OVsnprintf(pDestination, (size_t)SprintfLocal::kNoPrecision, pFormat, arguments);
 }
 
-EASTDC_API int OSnprintf(char8_t* EA_RESTRICT pDestination, size_t n, const char8_t* EA_RESTRICT pFormat, ...)
+EASTDC_API int OSnprintf(char* EA_RESTRICT pDestination, size_t n, const char* EA_RESTRICT pFormat, ...)
 {
 	va_list arguments;
 	va_start(arguments, pFormat);

+ 1 - 1
source/EAStopwatch.cpp

@@ -194,7 +194,7 @@ void EAStdCStopwatchSetup()
 			// Stopwatch Frequency
 			mnStopwatchFrequency = mnCPUFrequency;
 
-		#elif defined(EA_PLATFORM_CAPILANO)
+		#elif defined(EA_PLATFORM_XBOXONE)
 			// Microsoft has stated (https://forums.xboxlive.com/AnswerPage.aspx?qid=c3fcdad5-f3e4-46d9-85f9-d337506f0d6b&tgt=1) that  
 			// QueryPerformanceCounter / QueryPerformanceFrequency map to rdtsc and they are stable throughout the life of the process.
 			// Thus we can use QueryPerformanceFrequency to portable tell the CPU frequency for our usage of rdtsc.

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 168 - 168
source/EAString.cpp


+ 55 - 55
source/EATextUtil.cpp

@@ -53,7 +53,7 @@ extern uint8_t utf8lengthTable[256];
 // See 'http://www.cl.cam.ac.uk/~mgk25/unicode.html' or search for "UTF8 FAQ"
 // on the Internet for more details on UTF8 and Unicode.
 //
-EASTDC_API bool UTF8Validate(const char8_t* pText, size_t nLength)
+EASTDC_API bool UTF8Validate(const char* pText, size_t nLength)
 {
 	const uint8_t*       pSource8    = (const uint8_t*)pText;
 	const uint8_t* const pSource8End = pSource8 + nLength;
@@ -145,7 +145,7 @@ EASTDC_API bool UTF8Validate(const char8_t* pText, size_t nLength)
 // The string must be a valid UTF8 string or else the behavior is undefined.
 // If the string is not known to be valid, then it should be first validated independently
 // or a validating version of this function should be used instead.
-EASTDC_API char8_t* UTF8Increment(const char8_t* p, size_t n)
+EASTDC_API char* UTF8Increment(const char* p, size_t n)
 {
 	while(n--)
 	{
@@ -169,7 +169,7 @@ EASTDC_API char8_t* UTF8Increment(const char8_t* p, size_t n)
 			p += 1;           // Error. We return 1 instead of 0 or -1 because the user is probably iterating a string and so this is safer.
 	}
 
-	return (char8_t*)p;
+	return (char*)p;
 }
 
 
@@ -179,7 +179,7 @@ EASTDC_API char8_t* UTF8Increment(const char8_t* p, size_t n)
 // The string must be a valid UTF8 string or else the behavior is undefined.
 // If the string is not known to be valid, then it should be first validated independently
 // or a validating version of this function should be used instead.
-EASTDC_API char8_t* UTF8Decrement(const char8_t* p, size_t n)
+EASTDC_API char* UTF8Decrement(const char* p, size_t n)
 {
 	while(n)
 	{
@@ -187,7 +187,7 @@ EASTDC_API char8_t* UTF8Decrement(const char8_t* p, size_t n)
 			--n;
 	}
 
-	return (char8_t*)p;
+	return (char*)p;
 }
 
 
@@ -197,7 +197,7 @@ EASTDC_API char8_t* UTF8Decrement(const char8_t* p, size_t n)
 // The string must be a valid UTF8 string or else the behavior is undefined.
 // If the string is not known to be valid, then it should be first validated independently
 // or a validating version of this function should be used instead.
-EASTDC_API size_t UTF8Length(const char8_t* p)
+EASTDC_API size_t UTF8Length(const char* p)
 {
 	size_t n = 0;
 
@@ -280,7 +280,7 @@ EASTDC_API size_t UTF8Length(const char32_t* p)
 // 0xfc-0xfd are first byte of a 6-tuplet.
 // 0xfe-0xff are invalid values for a leading UTF8 char.
 //
-EASTDC_API size_t UTF8CharSize(const char8_t* p)
+EASTDC_API size_t UTF8CharSize(const char* p)
 {
 	// To do: Change this code to instead use the utf8lengthTable fropm EAString.cpp
 
@@ -345,10 +345,10 @@ EASTDC_API size_t UTF8CharSize(char32_t c)
 }
 
 
-EASTDC_API char16_t UTF8ReadChar(const char8_t* p, const char8_t** ppEnd)
+EASTDC_API char16_t UTF8ReadChar(const char* p, const char** ppEnd)
 {
 	char16_t        c = 0;
-	const char8_t*  pCurrent;
+	const char*  pCurrent;
 	uint8_t         cChar0((uint8_t)*p), cChar1, cChar2, cChar3;
 
 	//assert((cChar0 != 0xFE) && (cChar0 != 0xFF));     //  No byte can contain 0xFE or 0xFF
@@ -423,29 +423,29 @@ EASTDC_API char16_t UTF8ReadChar(const char8_t* p, const char8_t** ppEnd)
 // This function assumes that there is enough space at p to write the char.
 // At most three bytes are needed to write a char16_t value and 6 bytes are
 // needed to write a char32_t value.
-EASTDC_API char8_t* UTF8WriteChar(char8_t* p, char16_t c)
+EASTDC_API char* UTF8WriteChar(char* p, char16_t c)
 {
 	if(c < 0x80)
 	{
-		*p++ = (char8_t)(uint8_t)c;
+		*p++ = (char)(uint8_t)c;
 	}
 	else if(c < 0x0800)
 	{
-		*p++ = (char8_t)(uint8_t)((c >> 6) | 0xC0);
-		*p++ = (char8_t)(uint8_t)((c & 0x3F) | 0x80);
+		*p++ = (char)(uint8_t)((c >> 6) | 0xC0);
+		*p++ = (char)(uint8_t)((c & 0x3F) | 0x80);
 	}
 	else // if(c < 0x00010000)
 	{
-		*p++ = (char8_t)(uint8_t)((c >> 12) | 0xE0);
-		*p++ = (char8_t)(uint8_t)(((c >> 6) & 0x3F) | 0x80);
-		*p++ = (char8_t)(uint8_t)((c & 0x3F) | 0x80);
+		*p++ = (char)(uint8_t)((c >> 12) | 0xE0);
+		*p++ = (char)(uint8_t)(((c >> 6) & 0x3F) | 0x80);
+		*p++ = (char)(uint8_t)((c & 0x3F) | 0x80);
 	}
 	//else
 	//{
-	//    *p++ = (char8_t)(uint8_t)((c >> 18) | 0xF0);
-	//    *p++ = (char8_t)(uint8_t)(((c >> 12) & 0x3F) | 0x80);
-	//    *p++ = (char8_t)(uint8_t)(((c >> 6) & 0x3F) | 0x80);
-	//    *p++ = (char8_t)(uint8_t)((c & 0x3F) | 0x80);
+	//    *p++ = (char)(uint8_t)((c >> 18) | 0xF0);
+	//    *p++ = (char)(uint8_t)(((c >> 12) & 0x3F) | 0x80);
+	//    *p++ = (char)(uint8_t)(((c >> 6) & 0x3F) | 0x80);
+	//    *p++ = (char)(uint8_t)((c & 0x3F) | 0x80);
 	//}
 
 	return p;
@@ -454,29 +454,29 @@ EASTDC_API char8_t* UTF8WriteChar(char8_t* p, char16_t c)
 // This function assumes that there is enough space at p to write the char.
 // At most three bytes are needed to write a char32_t value and 6 bytes are
 // needed to write a char32_t value.
-EASTDC_API char8_t* UTF8WriteChar(char8_t* p, char32_t c)
+EASTDC_API char* UTF8WriteChar(char* p, char32_t c)
 {
 	if((uint32_t)c < 0x80)
 	{
-		*p++ = (char8_t)(uint8_t)c;
+		*p++ = (char)(uint8_t)c;
 	}
 	else if((uint32_t)c < 0x0800)
 	{
-		*p++ = (char8_t)(uint8_t)((c >> 6) | 0xC0);
-		*p++ = (char8_t)(uint8_t)((c & 0x3F) | 0x80);
+		*p++ = (char)(uint8_t)((c >> 6) | 0xC0);
+		*p++ = (char)(uint8_t)((c & 0x3F) | 0x80);
 	}
 	else if((uint32_t)c < 0x00010000)
 	{
-		*p++ = (char8_t)(uint8_t)((c >> 12) | 0xE0);
-		*p++ = (char8_t)(uint8_t)(((c >> 6) & 0x3F) | 0x80);
-		*p++ = (char8_t)(uint8_t)((c & 0x3F) | 0x80);
+		*p++ = (char)(uint8_t)((c >> 12) | 0xE0);
+		*p++ = (char)(uint8_t)(((c >> 6) & 0x3F) | 0x80);
+		*p++ = (char)(uint8_t)((c & 0x3F) | 0x80);
 	}
 	else
 	{
-		*p++ = (char8_t)(uint8_t)((c >> 18) | 0xF0);
-		*p++ = (char8_t)(uint8_t)(((c >> 12) & 0x3F) | 0x80);
-		*p++ = (char8_t)(uint8_t)(((c >> 6) & 0x3F) | 0x80);
-		*p++ = (char8_t)(uint8_t)((c & 0x3F) | 0x80);
+		*p++ = (char)(uint8_t)((c >> 18) | 0xF0);
+		*p++ = (char)(uint8_t)(((c >> 12) & 0x3F) | 0x80);
+		*p++ = (char)(uint8_t)(((c >> 6) & 0x3F) | 0x80);
+		*p++ = (char)(uint8_t)((c & 0x3F) | 0x80);
 	}
 
 	return p;
@@ -489,7 +489,7 @@ EASTDC_API char8_t* UTF8WriteChar(char8_t* p, char32_t c)
 /// entirely valid UTF8 content. It only trims the string if there is an incomplete UTF8 sequence at the
 /// end. The resulting string will always be a valid UTF8 string, whereas the input string may not be.
 /// Returns the strlen of the trimmed string.
-size_t UTF8TrimPartialChar(char8_t* pString, size_t nLength)
+size_t UTF8TrimPartialChar(char* pString, size_t nLength)
 {
 	size_t validPos = 0;
 
@@ -516,7 +516,7 @@ size_t UTF8TrimPartialChar(char8_t* pString, size_t nLength)
 // This function replaces all invalidate UTF8 characters with the user provided
 // 8-bit replacement. The returned character array is guaranteed null-terminated.
 //
-EASTDC_API char8_t* UTF8ReplaceInvalidChar(const char8_t* pIn, size_t nLength, char8_t* pOut, char8_t replaceWith)
+EASTDC_API char* UTF8ReplaceInvalidChar(const char* pIn, size_t nLength, char* pOut, char replaceWith)
 {
 	size_t validPos = 0;
 
@@ -588,16 +588,16 @@ bool MatchPattern(const CharT* pElement, const CharT* pPattern)
 //
 // We go through extra effort below to avoid doing memory allocation in most cases.
 //
-EASTDC_API bool WildcardMatch(const char8_t* pString, const char8_t* pPattern, bool bCaseSensitive)
+EASTDC_API bool WildcardMatch(const char* pString, const char* pPattern, bool bCaseSensitive)
 {
 	if(bCaseSensitive)
 		return MatchPattern(pString, pPattern);
 	else
 	{
 		// Do efficient string conversion to lower case...
-		char8_t  pStringLBuffer[384];
-		char8_t* pStringL;
-		char8_t* pStringLAllocated;
+		char  pStringLBuffer[384];
+		char* pStringL;
+		char* pStringLAllocated;
 		size_t   nStringLLength = Strlen(pString);
 
 		if(nStringLLength >= (sizeof(pStringLBuffer) / sizeof(pStringLBuffer[0]) - 1))
@@ -614,9 +614,9 @@ EASTDC_API bool WildcardMatch(const char8_t* pString, const char8_t* pPattern, b
 		Strlwr(pStringL);
 
 		// Do efficient pattern conversion to lower case...
-		char8_t  pPatternLBuffer[32];
-		char8_t* pPatternL;
-		char8_t* pPatternLAllocated;
+		char  pPatternLBuffer[32];
+		char* pPatternL;
+		char* pPatternLAllocated;
 		size_t   nPatternLLength = Strlen(pPattern);
 
 		if(nPatternLLength >= (sizeof(pPatternLBuffer) / sizeof(pPatternLBuffer[0]) - 1))
@@ -762,7 +762,7 @@ EASTDC_API bool WildcardMatch(const char32_t* pString, const char32_t* pPattern,
 //////////////////////////////////////////////////////////////////////////
 // GetTextLine
 //
-EASTDC_API const char8_t* GetTextLine(const char8_t* pText, const char8_t* pTextEnd, const char8_t** ppNewText)
+EASTDC_API const char* GetTextLine(const char* pText, const char* pTextEnd, const char** ppNewText)
 {
 	if(pText < pTextEnd)
 	{
@@ -843,8 +843,8 @@ EASTDC_API const char32_t* GetTextLine(const char32_t* pText, const char32_t* pT
 
 
 
-EASTDC_API bool ParseDelimitedText(const char8_t* pText, const char8_t* pTextEnd, char8_t cDelimiter, 
-								   const char8_t*& pToken, const char8_t*& pTokenEnd, const char8_t** ppNewText)
+EASTDC_API bool ParseDelimitedText(const char* pText, const char* pTextEnd, char cDelimiter, 
+								   const char*& pToken, const char*& pTokenEnd, const char** ppNewText)
 {
 	int  nQuoteLevel     = 0;
 	bool bDelimiterFound = false;
@@ -1045,18 +1045,18 @@ EASTDC_API bool ParseDelimitedText(const char32_t* pText, const char32_t* pTextE
 // array  must have space for at least twice the amount of bytes
 // as 'nBinaryDataLength' + 1.
 //
-EASTDC_API void ConvertBinaryDataToASCIIArray(const void* pBinaryData_, size_t nBinaryDataLength, char8_t* pASCIIArray)
+EASTDC_API void ConvertBinaryDataToASCIIArray(const void* pBinaryData_, size_t nBinaryDataLength, char* pASCIIArray)
 {
 	const uint8_t* pBinaryData = (uint8_t*)pBinaryData_;
 	const uint8_t* pEnd = pBinaryData + nBinaryDataLength;
 
 	while(pBinaryData < pEnd)
 	{
-		*pASCIIArray = (char8_t)('0' + ((*pBinaryData & 0xf0) >> 4));  // Convert the high byte to a number between 1 and 15.
+		*pASCIIArray = (char)('0' + ((*pBinaryData & 0xf0) >> 4));  // Convert the high byte to a number between 1 and 15.
 		if(*pASCIIArray > '9')
 			*pASCIIArray += 7; // Convert the ':' to 'A', for example.
 		pASCIIArray++;
-		*pASCIIArray = (char8_t)('0' + (*pBinaryData & 0x0f));         // Convert the low byte to a number between 1 and 15.
+		*pASCIIArray = (char)('0' + (*pBinaryData & 0x0f));         // Convert the low byte to a number between 1 and 15.
 		if(*pASCIIArray > '9')
 			*pASCIIArray += 7; // Convert the ':' to 'A', for example.
 		pASCIIArray++;
@@ -1117,11 +1117,11 @@ EASTDC_API void ConvertBinaryDataToASCIIArray(const void* pBinaryData_, size_t n
 // corrupt. We check for this corruption and return false if so, while converting
 // all corrupt bytes to valid ones.
 //
-EASTDC_API bool ConvertASCIIArrayToBinaryData(const char8_t* pASCIIArray, size_t nASCIIArrayLength, void* pBinaryData)
+EASTDC_API bool ConvertASCIIArrayToBinaryData(const char* pASCIIArray, size_t nASCIIArrayLength, void* pBinaryData)
 {
 	uint8_t*        pBinaryData8 = (uint8_t*)pBinaryData;
-	const char8_t*  pEnd = pASCIIArray + nASCIIArrayLength;
-	char8_t         cTemp;
+	const char*  pEnd = pASCIIArray + nASCIIArrayLength;
+	char         cTemp;
 	bool            bReturnValue(true);
 
 	while(pASCIIArray < pEnd)
@@ -1283,8 +1283,8 @@ EASTDC_API bool ConvertASCIIArrayToBinaryData(const char32_t* pASCIIArray, size_
 //////////////////////////////////////////////////////////////////////////////
 // SplitTokenDelimited (8 bit version)
 //  
-EASTDC_API bool SplitTokenDelimited(const char8_t* pSource, size_t nSourceLength, char8_t cDelimiter, 
-									char8_t* pToken, size_t nTokenLength, const char8_t** ppNewSource)
+EASTDC_API bool SplitTokenDelimited(const char* pSource, size_t nSourceLength, char cDelimiter, 
+									char* pToken, size_t nTokenLength, const char** ppNewSource)
 {
 	// terminate the token (so it appears empty if we don't find anything)
 	if(pToken && nTokenLength)
@@ -1295,7 +1295,7 @@ EASTDC_API bool SplitTokenDelimited(const char8_t* pSource, size_t nSourceLength
 		// look for the delimiter
 		for(size_t i = 0; i < nSourceLength && *pSource; i++)
 		{
-			const char8_t cTemp(*pSource);
+			const char cTemp(*pSource);
 
 			// update new source pointer if present
 			if(ppNewSource)
@@ -1419,8 +1419,8 @@ EASTDC_API bool SplitTokenDelimited(const char32_t* pSource, size_t nSourceLengt
 //////////////////////////////////////////////////////////////////////////////
 // SplitTokenSeparated (8 bit version)
 //
-EASTDC_API bool SplitTokenSeparated(const char8_t* pSource, size_t nSourceLength, char8_t c, 
-									char8_t* pToken, size_t nTokenLength, const char8_t** ppNewSource)
+EASTDC_API bool SplitTokenSeparated(const char* pSource, size_t nSourceLength, char c, 
+									char* pToken, size_t nTokenLength, const char** ppNewSource)
 {
 	// terminate the token (so it appears empty if we don't find anything)
 
@@ -1440,7 +1440,7 @@ EASTDC_API bool SplitTokenSeparated(const char8_t* pSource, size_t nSourceLength
 		for(size_t i = 0; i < nSourceLength; i++)
 		{
 			// get the character
-			const char8_t cTemp(*pSource);
+			const char cTemp(*pSource);
 
 			// quit if we found the terminating null character
 			if(cTemp != '\0')

+ 46 - 45
test/source/TestCType.cpp

@@ -24,12 +24,13 @@ int TestCType()
 			EATEST_VERIFY((Is##category((char##type##_t)c) != 0) == positive);\
 	}
 
+
 	// Make sure all chars are accepted
 	int32_t  i;
-	char8_t  n8;
+	char  n8;
 	char16_t n16;
 	int      n32;
-	char8_t  c8;
+	char  c8;
 	char16_t c16;
 
 	for(c8 = INT8_MIN, i = INT8_MIN; i <= INT8_MAX; ++c8, ++i)
@@ -98,20 +99,20 @@ int TestCType()
 	}
 
 	// ********************* alnum
-	ISCHAR_CATEGORY_TEST(8,  alnum, '0', '9', true);
-	ISCHAR_CATEGORY_TEST(8,  alnum, 'a', 'z', true);
-	ISCHAR_CATEGORY_TEST(8,  alnum, 'A', 'Z', true);
-	ISCHAR_CATEGORY_TEST(8,  alnum, '\x0', '\x15', false);
+	// ISCHAR_CATEGORY_TEST(8,  alnum, '0', '9', true);
+	// ISCHAR_CATEGORY_TEST(8,  alnum, 'a', 'z', true);
+	// ISCHAR_CATEGORY_TEST(8,  alnum, 'A', 'Z', true);
+	// ISCHAR_CATEGORY_TEST(8,  alnum, '\x0', '\x15', false);
 
 	ISCHAR_CATEGORY_TEST(16, alnum, '0', '9', true);
 	ISCHAR_CATEGORY_TEST(16, alnum, 'a', 'z', true);
 	ISCHAR_CATEGORY_TEST(16, alnum, 'A', 'Z', true);
 
 	// ********************* alpha
-	ISCHAR_CATEGORY_TEST(8,  alpha, '0', '9', false);
-	ISCHAR_CATEGORY_TEST(8,  alpha, 'a', 'z', true);
-	ISCHAR_CATEGORY_TEST(8,  alpha, 'A', 'Z', true);
-	ISCHAR_CATEGORY_TEST(8,  alpha, '\x0', '\x15', false);
+	// ISCHAR_CATEGORY_TEST(8,  alpha, '0', '9', false);
+	// ISCHAR_CATEGORY_TEST(8,  alpha, 'a', 'z', true);
+	// ISCHAR_CATEGORY_TEST(8,  alpha, 'A', 'Z', true);
+	// ISCHAR_CATEGORY_TEST(8,  alpha, '\x0', '\x15', false);
 
 	ISCHAR_CATEGORY_TEST(16, alpha, '0', '9', false);
 	ISCHAR_CATEGORY_TEST(16, alpha, 'a', 'z', true);
@@ -119,10 +120,10 @@ int TestCType()
 	ISCHAR_CATEGORY_TEST(16, alpha, '(', '('+10, false);
 
 	// digit
-	ISCHAR_CATEGORY_TEST(8,  digit, '0', '9', true);
-	ISCHAR_CATEGORY_TEST(8,  digit, 'a', 'z', false);
-	ISCHAR_CATEGORY_TEST(8,  digit, 'A', 'Z', false);
-	ISCHAR_CATEGORY_TEST(8,  digit, '\x0', '\x15', false);
+	// ISCHAR_CATEGORY_TEST(8,  digit, '0', '9', true);
+	// ISCHAR_CATEGORY_TEST(8,  digit, 'a', 'z', false);
+	// ISCHAR_CATEGORY_TEST(8,  digit, 'A', 'Z', false);
+	// ISCHAR_CATEGORY_TEST(8,  digit, '\x0', '\x15', false);
 
 	ISCHAR_CATEGORY_TEST(16, digit, '0', '9', true);
 	ISCHAR_CATEGORY_TEST(16, digit, 'a', 'z', false);
@@ -130,10 +131,10 @@ int TestCType()
 	ISCHAR_CATEGORY_TEST(16, digit, '\x70', '\x71', false);
 
 	// xdigit
-	ISCHAR_CATEGORY_TEST(8,  xdigit, '0', '9', true);
-	ISCHAR_CATEGORY_TEST(8,  xdigit, 'a', 'f', true);
-	ISCHAR_CATEGORY_TEST(8,  xdigit, 'A', 'F', true);
-	ISCHAR_CATEGORY_TEST(8,  xdigit, '\x0', '\x15', false);
+	// ISCHAR_CATEGORY_TEST(8,  xdigit, '0', '9', true);
+	// ISCHAR_CATEGORY_TEST(8,  xdigit, 'a', 'f', true);
+	// ISCHAR_CATEGORY_TEST(8,  xdigit, 'A', 'F', true);
+	// ISCHAR_CATEGORY_TEST(8,  xdigit, '\x0', '\x15', false);
 
 	ISCHAR_CATEGORY_TEST(16, xdigit, '0', '9', true);
 	ISCHAR_CATEGORY_TEST(16, xdigit, 'a', 'f', true);
@@ -141,18 +142,18 @@ int TestCType()
 	ISCHAR_CATEGORY_TEST(16, xdigit, 'z'+1, 'z'+60, false);
 
 	// graph
-	ISCHAR_CATEGORY_TEST(8,  graph, '\x21','\x7e', true);
-	ISCHAR_CATEGORY_TEST(8,  graph, '\x0', '\x20', false);
+	// ISCHAR_CATEGORY_TEST(8,  graph, '\x21','\x7e', true);
+	// ISCHAR_CATEGORY_TEST(8,  graph, '\x0', '\x20', false);
 
 	ISCHAR_CATEGORY_TEST(16, graph, '!', '!'+14, true);
 	ISCHAR_CATEGORY_TEST(16,  graph, '0', 'z', true);
 	ISCHAR_CATEGORY_TEST(16,  graph, '\x0', '\x20', false);
 
 	// lower
-	ISCHAR_CATEGORY_TEST(8,  lower, '0', '9', false);
-	ISCHAR_CATEGORY_TEST(8,  lower, 'a', 'z', true);
-	ISCHAR_CATEGORY_TEST(8,  lower, 'A', 'Z', false);
-	ISCHAR_CATEGORY_TEST(8,  lower, '\x0', '\x15', false);
+	// ISCHAR_CATEGORY_TEST(8,  lower, '0', '9', false);
+	// ISCHAR_CATEGORY_TEST(8,  lower, 'a', 'z', true);
+	// ISCHAR_CATEGORY_TEST(8,  lower, 'A', 'Z', false);
+	// ISCHAR_CATEGORY_TEST(8,  lower, '\x0', '\x15', false);
 
 	ISCHAR_CATEGORY_TEST(16, lower, '0', '9', false);
 	ISCHAR_CATEGORY_TEST(16, lower, 'a', 'z', true);
@@ -160,10 +161,10 @@ int TestCType()
 	ISCHAR_CATEGORY_TEST(16, lower, '!', '!'+14, false);
 
 	// upper
-	ISCHAR_CATEGORY_TEST(8,  upper, '0', '9', false);
-	ISCHAR_CATEGORY_TEST(8,  upper, 'a', 'z', false);
-	ISCHAR_CATEGORY_TEST(8,  upper, 'A', 'Z', true);
-	ISCHAR_CATEGORY_TEST(8,  upper, '\x0', '\x15', false);
+	// ISCHAR_CATEGORY_TEST(8,  upper, '0', '9', false);
+	// ISCHAR_CATEGORY_TEST(8,  upper, 'a', 'z', false);
+	// ISCHAR_CATEGORY_TEST(8,  upper, 'A', 'Z', true);
+	// ISCHAR_CATEGORY_TEST(8,  upper, '\x0', '\x15', false);
 
 	ISCHAR_CATEGORY_TEST(16, upper, '0', '9', false);
 	ISCHAR_CATEGORY_TEST(16, upper, 'a', 'z', false);
@@ -171,14 +172,14 @@ int TestCType()
 	ISCHAR_CATEGORY_TEST(16, upper, '!', '!'+14, false);
 
 	// punct
-	ISCHAR_CATEGORY_TEST(8,  punct, '0', '9', false);
-	ISCHAR_CATEGORY_TEST(8,  punct, 'a', 'z', false);
-	ISCHAR_CATEGORY_TEST(8,  punct, 'A', 'Z', false);
-	ISCHAR_CATEGORY_TEST(8,  punct, '\x0', '\x15', false);
-	ISCHAR_CATEGORY_TEST(8, punct, '!', '!', true);
-	ISCHAR_CATEGORY_TEST(8, punct, '?', '?', true);
-	ISCHAR_CATEGORY_TEST(8, punct, '.', '.', true);
-	ISCHAR_CATEGORY_TEST(8, punct, ',', ',', true);
+	// ISCHAR_CATEGORY_TEST(8,  punct, '0', '9', false);
+	// ISCHAR_CATEGORY_TEST(8,  punct, 'a', 'z', false);
+	// ISCHAR_CATEGORY_TEST(8,  punct, 'A', 'Z', false);
+	// ISCHAR_CATEGORY_TEST(8,  punct, '\x0', '\x15', false);
+	// ISCHAR_CATEGORY_TEST(8, punct, '!', '!', true);
+	// ISCHAR_CATEGORY_TEST(8, punct, '?', '?', true);
+	// ISCHAR_CATEGORY_TEST(8, punct, '.', '.', true);
+	// ISCHAR_CATEGORY_TEST(8, punct, ',', ',', true);
 
 	ISCHAR_CATEGORY_TEST(16, punct, '0', '9', false);
 	ISCHAR_CATEGORY_TEST(16, punct, 'a', 'z', false);
@@ -190,24 +191,24 @@ int TestCType()
 	ISCHAR_CATEGORY_TEST(16, punct, ':', ';', true);
 
 	// space
-	ISCHAR_CATEGORY_TEST(8,  space, '0', '9', false);
-	ISCHAR_CATEGORY_TEST(8,  space, ' ', ' ', true);
-	ISCHAR_CATEGORY_TEST(8,  space, '\x0a', '\x0a', true);
+	// ISCHAR_CATEGORY_TEST(8,  space, '0', '9', false);
+	// ISCHAR_CATEGORY_TEST(8,  space, ' ', ' ', true);
+	// ISCHAR_CATEGORY_TEST(8,  space, '\x0a', '\x0a', true);
 
 	ISCHAR_CATEGORY_TEST(16,  space, 'a', 'z', false);
 	ISCHAR_CATEGORY_TEST(16,  space, '\x09', '\x09', true);
 	ISCHAR_CATEGORY_TEST(16,  space, '\x0d', '\x0d', true);
 
 	// cntrl
-	ISCHAR_CATEGORY_TEST(8,  cntrl, 0, '\x1f', true);
-	ISCHAR_CATEGORY_TEST(8,  cntrl, '\x7f', '\x7f', true);
+	// ISCHAR_CATEGORY_TEST(8,  cntrl, 0, '\x1f', true);
+	// ISCHAR_CATEGORY_TEST(8,  cntrl, '\x7f', '\x7f', true);
 
 	ISCHAR_CATEGORY_TEST(16,  cntrl, 0, '\x1f', true);
 	ISCHAR_CATEGORY_TEST(16,  cntrl, '\x7f', '\x7f', true);
 
 	// ascii
-	ISCHAR_CATEGORY_TEST(8,   ascii, '\x0', '\x7f', true);
-	ISCHAR_CATEGORY_TEST(8,   ascii, '\x80', '\xff', false);
+	// ISCHAR_CATEGORY_TEST(8,   ascii, '\x0', '\x7f', true);
+	// ISCHAR_CATEGORY_TEST(8,   ascii, '\x80', '\xff', false);
 
 	ISCHAR_CATEGORY_TEST(16,  ascii, '\x0', '\x7f', true);
 	ISCHAR_CATEGORY_TEST(16,  ascii, '\x80', '\xff', false);
@@ -216,8 +217,8 @@ int TestCType()
 	// Toupper8 / Tolower8 / Toupper16 Tolower16
 	for (int c = 'a'; c < 'z'; ++c)
 	{
-		EATEST_VERIFY(Toupper((char8_t)c) == 'A' + c - 'a');
-		EATEST_VERIFY(Tolower((char8_t)('A' + c - 'a')) == (char8_t)c);
+		EATEST_VERIFY(Toupper((char)c) == 'A' + c - 'a');
+		EATEST_VERIFY(Tolower((char)('A' + c - 'a')) == (char)c);
 
 		EATEST_VERIFY(Toupper((char16_t)c) == char16_t('A' + c - 'a'));
 		EATEST_VERIFY(Tolower((char16_t)('A' + c - 'a')) == char16_t((char16_t)c));

+ 11 - 11
test/source/TestDateTime.cpp

@@ -598,7 +598,7 @@ int TestDateTime()
 		char*        pBuffer = new char[kBufferSize];
 		tm           tmValue1, tmValue2;
 		size_t       n;
-		char8_t*     p;
+		char*     p;
 
 		{
 			DateTime dt(1999, 12, 31, 23, 59, 58);
@@ -636,8 +636,8 @@ int TestDateTime()
 
 				memcpy(&tmValue2, &tmValue1, sizeof(tmValue2));
 
-				const char8_t* kFormat = "%t %t%%%n%n%%";
-				const char8_t* kResult = "\t \t%\n\n%";
+				const char* kFormat = "%t %t%%%n%n%%";
+				const char* kResult = "\t \t%\n\n%";
 				n = Strftime(pBuffer, kBufferSize, kFormat, &tmValue1, NULL);
 				EATEST_VERIFY((n == Strlen(kResult)) && (Strcmp(pBuffer, kResult) == 0));
 				EATEST_VERIFY(memcmp(&tmValue1, &tmValue2, sizeof(tmValue2)) == 0);   // Verify that tmValue1 was not written to.
@@ -650,7 +650,7 @@ int TestDateTime()
 				// %a   Replaced by the locale's abbreviated weekday name. [ tm_wday]
 				// %A   Replaced by the locale's full weekday name. [ tm_wday]
 
-				const char8_t* kExpectedResults[7] = 
+				const char* kExpectedResults[7] = 
 				{
 					"Sun | Sun | Sunday | Sunday",
 					"Mon | Mon | Monday | Monday",
@@ -684,7 +684,7 @@ int TestDateTime()
 				// %h   Equivalent to %b. [ tm_mon]
 				// %m   Replaced by the month as a decimal number [01,12]. [ tm_mon]
 
-				const char8_t* kExpectedResults[12] = 
+				const char* kExpectedResults[12] = 
 				{
 					"Jan | Jan | January | January | Jan | Jan | 01 | 1",
 					"Feb | Feb | February | February | Feb | Feb | 02 | 2",
@@ -925,7 +925,7 @@ int TestDateTime()
 					2100,
 				};
 
-				const char8_t* kExpectedResults[5] = 
+				const char* kExpectedResults[5] = 
 				{
 					"19 | 19",
 					"20 | 20",
@@ -973,7 +973,7 @@ int TestDateTime()
 
 			{
 				// %D   Equivalent to %m/%d/%y. [ tm_mon, tm_mday, tm_year]
-				const char8_t* kExpectedResults[12] = 
+				const char* kExpectedResults[12] = 
 				{
 					"01/01/66",
 					"02/02/67",
@@ -1026,7 +1026,7 @@ int TestDateTime()
 
 			{
 				// %F   Equivalent to %Y - %m - %d (the ISO 8601:2000 standard date format). [ tm_year, tm_mon, tm_mday]
-				const char8_t* kExpectedResults[12] = 
+				const char* kExpectedResults[12] = 
 				{
 					"2001-01-01",
 					"2002-02-02",
@@ -1119,7 +1119,7 @@ int TestDateTime()
 
 			{
 				// %j   Replaced by the day of the year as a decimal number [001,366]. [ tm_yday]
-				const char8_t* kExpectedResults[4] = 
+				const char* kExpectedResults[4] = 
 				{
 					"366 | 366",
 					"365 | 365",
@@ -1169,7 +1169,7 @@ int TestDateTime()
 				// %r   Replaced by the time in a.m. and p.m. notation; [CX] [Option Start]  in the POSIX locale this shall be equivalent to %I : %M : %S %p. [Option End] [ tm_hour, tm_min, tm_sec]
 				// %R   Replaced by the time in 24-hour notation ( %H : %M ). [ tm_hour, tm_min]
 				// %T   Replaced by the time ( %H : %M : %S ). [ tm_hour, tm_min, tm_sec]
-				const char8_t* kExpectedResults[8] = 
+				const char* kExpectedResults[8] = 
 				{
 					"AM", "10:11:12 AM", "10:11", "10:11:12",
 					"PM", "01:02:03 PM", "13:02", "13:02:03",
@@ -1474,7 +1474,7 @@ int TestDateTime()
 					1969,
 				};
 
-				const char8_t* kExpectedResults[5] = 
+				const char* kExpectedResults[5] = 
 				{
 					"00 | 0 | 2000",
 					"01 | 1 | 2001",

+ 4 - 4
test/source/TestHash.cpp

@@ -92,8 +92,8 @@ int TestHash()
 
 	uint8_t*  pDataA   = new uint8_t[kDataLength];
 	uint8_t*  pDataB   = new uint8_t[kDataLength];
-	char8_t*  pData8A  = new char8_t[kDataLength];
-	char8_t*  pData8B  = new char8_t[kDataLength];
+	char*  pData8A  = new char[kDataLength];
+	char*  pData8B  = new char[kDataLength];
 	char16_t* pData16A = new char16_t[kDataLength];
 	char16_t* pData16B = new char16_t[kDataLength];
 	char32_t* pData32A = new char32_t[kDataLength];
@@ -106,8 +106,8 @@ int TestHash()
 
 		pDataA[i]    = (uint8_t) c;
 		pDataB[i]    = (uint8_t) c;
-		pData8A[i]   = (char8_t) c;
-		pData8B[i]   = (char8_t) c;
+		pData8A[i]   = (char) c;
+		pData8B[i]   = (char) c;
 		pData16A[i]  = (char16_t)c;
 		pData16B[i]  = (char16_t)c;
 		pData32A[i]  = (char32_t)c;

+ 24 - 35
test/source/TestMemory.cpp

@@ -335,8 +335,8 @@ static int TestMemset()
 	{
 		// To do: We need a more extensive test.
 
-		char8_t        buffer[2000];
-		const char8_t* pattern = "012345678";
+		char        buffer[2000];
+		const char* pattern = "012345678";
 		size_t         sl = Strlen(pattern);
 
 		EATEST_VERIFY(buffer == MemsetN(buffer, pattern, sl, 2000));
@@ -603,25 +603,14 @@ static int TestMemchr()
 	int nErrorCount = 0;
 
 	{   // Memchr8
-		const char8_t* const s = "qwertyuiopASDFGHJKL:!@#$%^&*,=/";
+		const char* const s = "qwertyuiopASDFGHJKL:!@#$%^&*,=/";
 
-		EATEST_VERIFY((char8_t*)Memchr(s, (char8_t)'q', Strlen(s)) - s ==  0);
-		EATEST_VERIFY((char8_t*)Memchr(s, (char8_t)'F', Strlen(s)) - s == 13);
-		EATEST_VERIFY((char8_t*)Memchr(s, (char8_t)':', Strlen(s)) - s == 19);
-		EATEST_VERIFY((char8_t*)Memchr(s, (char8_t)'&', Strlen(s)) - s == 26);
+		EATEST_VERIFY((char*)Memchr(s, (char)'q', Strlen(s)) - s ==  0);
+		EATEST_VERIFY((char*)Memchr(s, (char)'F', Strlen(s)) - s == 13);
+		EATEST_VERIFY((char*)Memchr(s, (char)':', Strlen(s)) - s == 19);
+		EATEST_VERIFY((char*)Memchr(s, (char)'&', Strlen(s)) - s == 26);
 	}
 
-	#if EASTDC_MEMCHR16_ENABLED && defined(EA_CHAR16)
-		{   // Memchr16
-			const char16_t* const s = EA_CHAR16("qwertyuiopASDFGHJKL:!@#$%^&*,=/");
-
-			EATEST_VERIFY((char16_t*)Memchr(s, (char16_t)'q', Strlen(s)) - s ==  0);
-			EATEST_VERIFY((char16_t*)Memchr(s, (char16_t)'F', Strlen(s)) - s == 13);
-			EATEST_VERIFY((char16_t*)Memchr(s, (char16_t)':', Strlen(s)) - s == 19);
-			EATEST_VERIFY((char16_t*)Memchr(s, (char16_t)'&', Strlen(s)) - s == 26);
-		}
-	#endif
-
 	return nErrorCount;
 }
 
@@ -633,9 +622,9 @@ static int TestMemcmp()
 	int nErrorCount = 0;
 
 	{   // Memcmp8
-		char8_t buffer1[] = "01234567a";
-		char8_t buffer2[] = "01234567b";
-		char8_t buffer3[] = "01234567c";
+		char buffer1[] = "01234567a";
+		char buffer2[] = "01234567b";
+		char buffer3[] = "01234567c";
 
 		EATEST_VERIFY(Memcmp(buffer1, buffer1, 9) == 0);
 		EATEST_VERIFY(Memcmp(buffer2, buffer1, 9) >  0);
@@ -669,7 +658,7 @@ static int TestMemmem()
 	int nErrorCount = 0;
 
 	const size_t  kSize = 37;
-	const char8_t buffer1[kSize] = "abcdefghijklmnopqrstuvwxyz0123456789";
+	const char buffer1[kSize] = "abcdefghijklmnopqrstuvwxyz0123456789";
 
 	EATEST_VERIFY(Memmem(buffer1,     0, "",            0) == NULL);            // An empty haystack always results in NULL, regardless of the needle.
 	EATEST_VERIFY(Memmem(buffer1, kSize, "",            0) == buffer1);         // Otherwise, an empty needle results in success.
@@ -698,8 +687,8 @@ static int TestMemcpy()
 	int nErrorCount = 0;
 
 	{   // MemcpyC
-		char8_t buffer1[] = "         ";
-		char8_t buffer2[] = "01234567b";
+		char buffer1[] = "         ";
+		char buffer2[] = "01234567b";
 
 		EATEST_VERIFY(buffer1 == MemcpyC(buffer1, buffer2, 9));
 		EATEST_VERIFY(Memcmp(buffer2, buffer1, 9) ==  0);
@@ -716,7 +705,7 @@ static int TestMemcpy()
 	#endif
 
 
-	{ // char8_t* MemcpyC(void* pDestination, const void* pSource, size_t nByteCount);
+	{ // char* MemcpyC(void* pDestination, const void* pSource, size_t nByteCount);
 
 		EA::StdC::Random r;
 		const void* pCheck;
@@ -754,7 +743,7 @@ static int TestMemcpy()
 	}
 
 
-	{   // char8_t* Memcpy128(void* pDestination, const void* pSource, size_t nByteCount);
+	{   // char* Memcpy128(void* pDestination, const void* pSource, size_t nByteCount);
 
 		EA::StdC::Stopwatch stopwatch1(EA::StdC::Stopwatch::kUnitsCPUCycles);
 		EA::StdC::Stopwatch stopwatch2(EA::StdC::Stopwatch::kUnitsCPUCycles);
@@ -816,7 +805,7 @@ static int TestMemcpy()
 		}
 	}
 
-	{   // char8_t* Memcpy128C(void* pDestination, const void* pSource, size_t nByteCount);
+	{   // char* Memcpy128C(void* pDestination, const void* pSource, size_t nByteCount);
 		for(size_t i = 0; i < 50; i++)
 		{
 			const size_t copySize = i * 128;
@@ -855,13 +844,13 @@ static int TestMemmove()
 	int nErrorCount = 0;
 
 	{    // Memmove8
-		char8_t buffer1[] = "..........."; 
-		char8_t buffer2[] = ".......0123"; 
-		char8_t buffer3[] = "0123......."; 
+		char buffer1[] = "..........."; 
+		char buffer2[] = ".......0123"; 
+		char buffer3[] = "0123......."; 
 
 		EATEST_VERIFY(buffer1 == MemmoveC(buffer1, buffer2, Strlen(buffer2)));
 		EATEST_VERIFY(memcmp(buffer1, buffer2, Strlen(buffer2)) ==  0);
-		EATEST_VERIFY(memset(buffer1, (char8_t )0, Strlen(buffer1)) != NULL);
+		EATEST_VERIFY(memset(buffer1, (char )0, Strlen(buffer1)) != NULL);
 
 		EATEST_VERIFY(buffer1 == MemmoveC(buffer1, buffer2+7, Strlen(buffer2) - 7));
 		EATEST_VERIFY(memcmp(buffer1, buffer2+7, Strlen(buffer2) - 7) ==  0);
@@ -914,10 +903,10 @@ static int TestTimingSafe()
 		// bool TimingSafeMemIsClear(const void* p, size_t n);
 
 		{   // Basic accuracy tests.
-			char8_t buffer1[] = "01234567a";
-			char8_t buffer2[] = "01234567b";
-			char8_t buffer3[] = "01234567c";
-			char8_t buffer4[] = "\0\0\0\0\0\0\0\0\0";
+			char buffer1[] = "01234567a";
+			char buffer2[] = "01234567b";
+			char buffer3[] = "01234567c";
+			char buffer4[] = "\0\0\0\0\0\0\0\0\0";
 
 			EATEST_VERIFY(TimingSafeMemcmp(buffer1, buffer1, 0) == Memcmp(buffer1, buffer1, 0));
 			EATEST_VERIFY(TimingSafeMemcmp(buffer2, buffer1, 9) == Memcmp(buffer2, buffer1, 9));

+ 15 - 15
test/source/TestProcess.cpp

@@ -20,7 +20,7 @@
 
 
 #if defined(EA_PLATFORM_WINDOWS) && EA_WINAPI_FAMILY_PARTITION(EA_WINAPI_PARTITION_DESKTOP)
-	template <typename T> // T is one of char8_t, char16_t, char32_t.
+	template <typename T> // T is one of char, char16_t, char32_t.
 	static void TestEnvironmentVar(int& nErrorCount)
 	{
 		using namespace EA::StdC;
@@ -73,14 +73,14 @@
 		nRequiredStrlen = GetEnvironmentVar(name, valueOut, EAArrayCount(valueOut));
 		EATEST_VERIFY((nRequiredStrlen == 17) && (Strcmp(valueIn, valueOut) == 0));
 
-		// Verify that GetEnvironmentVar(T) yields the same result as GetEnvironmentVar(char8_t) (T may be char16_t).
-		char8_t valueOut8[32];
+		// Verify that GetEnvironmentVar(T) yields the same result as GetEnvironmentVar(char) (T may be char16_t).
+		char valueOut8[32];
 		T       valueOutT[32];
 		nRequiredStrlen = GetEnvironmentVar("NameExisting", valueOut8, EAArrayCount(valueOut8));
-		Strlcpy(valueOutT, valueOut8, EAArrayCount(valueOutT)); // Need to convert char8_t to T, as Strcmp only exists for like types.
+		Strlcpy(valueOutT, valueOut8, EAArrayCount(valueOutT)); // Need to convert char to T, as Strcmp only exists for like types.
 		EATEST_VERIFY((nRequiredStrlen == 17) && (Strcmp(valueOut, valueOutT) == 0));
 
-		// Verify that GetEnvironmentVar(T) yields the same result as GetEnvironmentVar(char16_t) (T may be char8_t).
+		// Verify that GetEnvironmentVar(T) yields the same result as GetEnvironmentVar(char16_t) (T may be char).
 		char16_t name16[32];
 		char16_t valueOut16[32];
 		Strlcpy(name16, name, EAArrayCount(name16));
@@ -99,17 +99,17 @@ int TestProcess()
 	EA::UnitTest::Report("TestProcess\n");
 
 	{
-		// size_t GetCurrentProcessPath(char8_t*  pPath);
+		// size_t GetCurrentProcessPath(char*  pPath);
 		// size_t GetCurrentProcessPath(char16_t* pPath);
 		// size_t GetCurrentProcessPath(char32_t* pPath);
-		// size_t GetCurrentProcessDirectory(char8_t*  pDirectory);
+		// size_t GetCurrentProcessDirectory(char*  pDirectory);
 		// size_t GetCurrentProcessDirectory(char16_t* pDirectory);
 		// size_t GetCurrentProcessDirectory(char32_t* pDirectory);
 	
 		// Currently we have known support for Windows. With other platforms support is inconsistent.
 		#if EA_WINAPI_FAMILY_PARTITION(EA_WINAPI_PARTITION_DESKTOP) || defined(EA_PLATFORM_APPLE) || defined(EA_PLATFORM_LINUX) || (defined(EA_PLATFORM_SONY) && EA_SCEDBG_ENABLED)
 			char16_t path16[EA::StdC::kMaxPathLength];
-			char8_t  path8[EA::StdC::kMaxPathLength];
+			char  path8[EA::StdC::kMaxPathLength];
 			size_t   n;
 			size_t   processPathLen;
 
@@ -178,15 +178,15 @@ int TestProcess()
 	}
 
 	{
-		// size_t GetEnvironmentVar(const char8_t*  pName, char8_t*  pValue, size_t valueCapacity);
+		// size_t GetEnvironmentVar(const char*  pName, char*  pValue, size_t valueCapacity);
 		// size_t GetEnvironmentVar(const char16_t* pName, char16_t* pValue, size_t valueCapacity);
 		// size_t GetEnvironmentVar(const char32_t* pName, char32_t* pValue, size_t valueCapacity);
-		// bool   SetEnvironmentVar(const char8_t*  pName, const char8_t* pValue);
+		// bool   SetEnvironmentVar(const char*  pName, const char* pValue);
 		// bool   SetEnvironmentVar(const char16_t* pName, const char16_t* pValue);
 		// bool   SetEnvironmentVar(const char32_t* pName, const char32_t* pValue);
 
 		#if defined(EA_PLATFORM_WINDOWS) && EA_WINAPI_FAMILY_PARTITION(EA_WINAPI_PARTITION_DESKTOP) // To do: Enable this for other platforms when possible.
-			TestEnvironmentVar<char8_t>(nErrorCount);
+			TestEnvironmentVar<char>(nErrorCount);
 			TestEnvironmentVar<char16_t>(nErrorCount);
 		  //TestEnvironmentVar<char32_t>(nErrorCount); // Doesn't yet exist.
 		#endif
@@ -195,16 +195,16 @@ int TestProcess()
 	/*
 	{
 		// int Spawn(const char16_t* pPath, const char16_t* const* pArgumentArray, bool wait = false);
-		// int Spawn(const char8_t*  pPath, const char8_t*  const* pArgumentArray, bool wait = false);
+		// int Spawn(const char*  pPath, const char*  const* pArgumentArray, bool wait = false);
 
 		// int ExecuteShellCommand(const char16_t* pCommand);
-		// int ExecuteShellCommand(const char8_t*  pCommand);
+		// int ExecuteShellCommand(const char*  pCommand);
 
 		// bool SearchEnvironmentPath(const char16_t* pFileName, char16_t* pPath, const char16_t* pEnvironmentVar = NULL);
-		// bool SearchEnvironmentPath(const char8_t*  pFileName, char8_t*  pPath, const char8_t*  pEnvironmentVar = NULL);
+		// bool SearchEnvironmentPath(const char*  pFileName, char*  pPath, const char*  pEnvironmentVar = NULL);
 
 		// bool OpenFile(const char16_t* pPath); // e.g. http://www.bozo.com/somefile.html
-		// bool OpenFile(const char8_t*  pPath); // e.g. /system/settings/somefile.txt
+		// bool OpenFile(const char*  pPath); // e.g. /system/settings/somefile.txt
 	}
 	*/
 

+ 26 - 26
test/source/TestScanf.cpp

@@ -67,10 +67,10 @@ struct Values
 	uint64_t            uint64_[8];
   //EA::StdC::int128_t  int128_[8];     // int128_t has constructors and so is not a POD and cannot be part of the Values union.
   //EA::StdC::uint128_t uint128_[8];
-	char8_t             char8_[8];
+	char             char8_[8];
 	char16_t            char16_[8];
 	char32_t            char32_[8];
-	char8_t             str8_[8][64];
+	char             str8_[8][64];
 	char16_t            str16_[8][64];
 	char32_t            str32_[8][64];
 	wchar_t             strw_[8][64];
@@ -95,7 +95,7 @@ struct Values
 
 uint32_t Values::assertCount_ = 0;
 
-static int TestCRTVsscanf(const char8_t* pBuffer, const char8_t* pFormat, ...)
+static int TestCRTVsscanf(const char* pBuffer, const char* pFormat, ...)
 {
 	va_list vList;
 	va_start(vList, pFormat);
@@ -460,12 +460,12 @@ static int TestScanfMisc()
 		}
 
 		{   // String tests
-			// We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char8_t, char16_t, char32_t)
-			// We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char8_t, char16_t, char32_t)
-			// We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char8_t, char16_t, char32_t)
-			// We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char8_t, char16_t, char32_t)
+			// We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char, char16_t, char32_t)
+			// We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char, char16_t, char32_t)
+			// We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char, char16_t, char32_t)
+			// We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char, char16_t, char32_t)
 
-			{   // char8_t
+			{   // char
 				v.Clear();
 				n = Sscanf("a b c d e f", "%hc %c %lc %I8c %I16c %I32c", &v.char_[0], &v.char_[1], &v.wchar_[0], &v.char8_[0], &v.char16_[0], &v.char32_[0]);
 				EATEST_VERIFY(n == 6);
@@ -499,7 +499,7 @@ static int TestScanfMisc()
 
 			{   // char16_t
 				v.Clear();
-				#if EASCANF_MS_STYLE_S_FORMAT // Microsoft style means that the meanings of S/C and s/c are reversed for non-char8_t Sprintf.
+				#if EASCANF_MS_STYLE_S_FORMAT // Microsoft style means that the meanings of S/C and s/c are reversed for non-char Sprintf.
 					n = Sscanf(EA_CHAR16("a b c d e f"), EA_CHAR16("%hc %c %lc %I8c %I16c %I32c"), &v.char_[0], &v.wchar_[0], &v.wchar_[1], &v.char8_[0], &v.char16_[0], &v.char32_[0]);
 					EATEST_VERIFY(n == 6);
 					EATEST_VERIFY((v.char_[0] == 'a') && (v.wchar_[0] == 'b') && (v.wchar_[1] == 'c') && (v.char8_[0] == 'd') && (v.char16_[0] == 'e') && (v.char32_[0] == 'f'));
@@ -565,7 +565,7 @@ static int TestScanfMisc()
 
 			{   // char32_t
 				v.Clear();
-				#if EASCANF_MS_STYLE_S_FORMAT // Microsoft style means that the meanings of S/C and s/c are reversed for non-char8_t Sprintf.
+				#if EASCANF_MS_STYLE_S_FORMAT // Microsoft style means that the meanings of S/C and s/c are reversed for non-char Sprintf.
 					n = Sscanf(EA_CHAR32("a b c d e f"), EA_CHAR32("%hc %c %lc %I8c %I16c %I32c"), &v.char_[0], &v.wchar_[0], &v.wchar_[1], &v.char8_[0], &v.char16_[0], &v.char32_[0]);
 					EATEST_VERIFY(n == 6);
 					EATEST_VERIFY((v.char_[0] == 'a') && (v.wchar_[0] == 'b') && (v.wchar_[1] == 'c') && (v.char8_[0] == 'd') && (v.char16_[0] == 'e') && (v.char32_[0] == 'f'));
@@ -2118,12 +2118,12 @@ static int TestScanfMisc()
 
 		{
 			v.Clear();
-			v.char8_[0] = (char8_t)(uint8_t)0xdd;
+			v.char8_[0] = (char)(uint8_t)0xdd;
 			n = Sscanf("10:11", "%d:%d%c", &v.int_[0], &v.int_[1], &v.char8_[0]);
 			EATEST_VERIFY(n == 2);
 			EATEST_VERIFY(v.int_[0] == 10);
 			EATEST_VERIFY(v.int_[1] == 11);
-			EATEST_VERIFY(v.char8_[0] == (char8_t)(uint8_t)0xdd);
+			EATEST_VERIFY(v.char8_[0] == (char)(uint8_t)0xdd);
 
 			v.Clear();
 			#if EASCANF_MS_STYLE_S_FORMAT
@@ -2131,9 +2131,9 @@ static int TestScanfMisc()
 				n = Sscanf(EA_CHAR16("10:11"), EA_CHAR16("%d:%d%c"), &v.int_[0], &v.int_[1], &v.wchar_[0]);
 				EATEST_VERIFY(v.wchar_[0] == 0xdd);
 			#else
-				v.char8_[0] = (char8_t)(uint8_t)0xdd;
+				v.char8_[0] = (char)(uint8_t)0xdd;
 				n = Sscanf(EA_CHAR16("10:11"), EA_CHAR16("%d:%d%c"), &v.int_[0], &v.int_[1], &v.char8_[0]);
-				EATEST_VERIFY(v.char8_[0] == (char8_t)(uint8_t)0xdd);
+				EATEST_VERIFY(v.char8_[0] == (char)(uint8_t)0xdd);
 			#endif
 			EATEST_VERIFY(n == 2);
 			EATEST_VERIFY(v.int_[0] == 10);
@@ -2145,9 +2145,9 @@ static int TestScanfMisc()
 				n = Sscanf(EA_CHAR32("10:11"), EA_CHAR32("%d:%d%c"), &v.int_[0], &v.int_[1], &v.wchar_[0]);
 				EATEST_VERIFY(v.wchar_[0] == 0xdd);
 			#else
-				v.char8_[0] = (char8_t)(uint8_t)0xdd;
+				v.char8_[0] = (char)(uint8_t)0xdd;
 				n = Sscanf(EA_CHAR32("10:11"), EA_CHAR32("%d:%d%c"), &v.int_[0], &v.int_[1], &v.char8_[0]);
-				EATEST_VERIFY(v.char8_[0] == (char8_t)(uint8_t)0xdd);
+				EATEST_VERIFY(v.char8_[0] == (char)(uint8_t)0xdd);
 			#endif
 			EATEST_VERIFY(n == 2);
 			EATEST_VERIFY(v.int_[0] == 10);
@@ -2361,7 +2361,7 @@ static int TestScanfUnusual()
 			EATEST_VERIFY((uintptr_t)v.voidptr_[0] == 0xffffffff);
 		}
 
-		{   // Make sure we support explicit char8_t strings.
+		{   // Make sure we support explicit char strings.
 			v.Clear();
 			n = Sscanf("2.0", "%hs", v.str8_[0]);    
 			EATEST_VERIFY(n == 1);
@@ -2395,7 +2395,7 @@ static int TestScanfUnusual()
 			EATEST_VERIFY(Strcmp(v.strw_[0], EA_WCHAR("2.0")) == 0);
 		}
 
-		{   // Make sure we support explicit char8_t chars.
+		{   // Make sure we support explicit char chars.
 			v.Clear();
 			n = Sscanf("2.0", "%hc", &v.char8_[0]);
 			EATEST_VERIFY(n == 1);
@@ -2669,10 +2669,10 @@ static int TestScanfVariants()
 
 		// To do: Implement some of these:
 		/*
-		EASTDC_API int Cscanf(ReadFunction8 pReadFunction8, void* pContext, const char8_t* pFormat, ...);
-		EASTDC_API int Fscanf(FILE* pFile, const char8_t* pFormat, ...);
-		EASTDC_API int Scanf(const char8_t* pFormat, ...);
-		EASTDC_API int Sscanf(const char8_t*  pTextBuffer, const char8_t* pFormat, ...);
+		EASTDC_API int Cscanf(ReadFunction8 pReadFunction8, void* pContext, const char* pFormat, ...);
+		EASTDC_API int Fscanf(FILE* pFile, const char* pFormat, ...);
+		EASTDC_API int Scanf(const char* pFormat, ...);
+		EASTDC_API int Sscanf(const char*  pTextBuffer, const char* pFormat, ...);
 
 		EASTDC_API int Cscanf(ReadFunction16 pReadFunction16, void* pContext, const char16_t* pFormat, ...);
 		EASTDC_API int Fscanf(FILE* pFile, const char16_t* pFormat, ...);
@@ -2685,10 +2685,10 @@ static int TestScanfVariants()
 		EASTDC_API int Sscanf(const char32_t* pTextBuffer, const char32_t* pFormat, ...);
 
 
-		EASTDC_API int Vcscanf(ReadFunction8 pReadFunction8, void* pContext, const char8_t* pFormat, va_list arguments);
-		EASTDC_API int Vfscanf(FILE* pFile, const char8_t* pFormat, va_list arguments);
-		EASTDC_API int Vscanf(const char8_t* pFormat, va_list arguments);
-		EASTDC_API int Vsscanf(const char8_t* pTextBuffer, const char8_t* pFormat, va_list arguments);
+		EASTDC_API int Vcscanf(ReadFunction8 pReadFunction8, void* pContext, const char* pFormat, va_list arguments);
+		EASTDC_API int Vfscanf(FILE* pFile, const char* pFormat, va_list arguments);
+		EASTDC_API int Vscanf(const char* pFormat, va_list arguments);
+		EASTDC_API int Vsscanf(const char* pTextBuffer, const char* pFormat, va_list arguments);
 
 		EASTDC_API int Vcscanf(ReadFunction16 pReadFunction16, void* pContext, const char16_t* pFormat, va_list arguments);
 		EASTDC_API int Vfscanf(FILE* pFile, const char16_t* pFormat, va_list arguments);

+ 103 - 147
test/source/TestSprintf.cpp

@@ -16,7 +16,7 @@
 #include <stdarg.h>
 
 
-static void TestCRTVsnprintf(char8_t* pDestination, size_t n, const char8_t* pFormat, ...)
+static void TestCRTVsnprintf(char* pDestination, size_t n, const char* pFormat, ...)
 {
 	va_list vList;
 	va_start(vList, pFormat);
@@ -42,7 +42,7 @@ static void TestCRTVsnprintf(char32_t* pDestination, size_t n, const char32_t* p
 
 
 #if EASTDC_VSNPRINTF8_ENABLED
-	static void TestCRTVsnprintf8(char8_t* pDestination, size_t n, const char8_t* pFormat, ...)
+	static void TestCRTVsnprintf8(char* pDestination, size_t n, const char* pFormat, ...)
 	{
 		va_list vList;
 		va_start(vList, pFormat);
@@ -90,7 +90,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 	// int Snprintf(char_t* pDestination, size_t n, const char_t* pFormat, ...);
 	{
-		char8_t sn18[128];
+		char sn18[128];
 		Snprintf(sn18, 128, "%5s%-4d%03i", "abc", -12, 3);
 		EATEST_VERIFY(!Strcmp("  abc-12 003", sn18));
 		Snprintf(sn18, 128, "%.2f", 3.1415);
@@ -99,7 +99,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 	// int Vsnprintf(char_t* pDestination, size_t n, const char_t* pFormat, ...);
 	{
-		char8_t sn18[128];
+		char sn18[128];
 		TestCRTVsnprintf(sn18, 128, "%5s%-5d%04i", "abc", -12, 3);
 		EATEST_VERIFY(!Strcmp("  abc-12  0003", sn18));
 		TestCRTVsnprintf(sn18, 128, "%.2f", 3.1415);
@@ -108,7 +108,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 	#if EASTDC_VSNPRINTF8_ENABLED
 		{
-			char8_t sn18[128];
+			char sn18[128];
 			TestCRTVsnprintf8(sn18, 128, "%5s%-5d%04i", "abc", -12, 3);
 			EATEST_VERIFY(!Strcmp("  abc-12  0003", sn18));
 			TestCRTVsnprintf8(sn18, 128, "%.2f", 3.1415);
@@ -130,12 +130,12 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	// template <typename String>
-	// int StringVcprintf(String& s, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+	// int StringVcprintf(String& s, const char* EA_RESTRICT pFormat, va_list arguments)
 	{
 		va_list arguments;
 		va_start(arguments, unused);
 
-		eastl::string8 s8;
+		eastl::string s8;
 		int result = StringVcprintf(s8, "hello", arguments);
 		EATEST_VERIFY((result == 5) && (s8 == "hello"));
 
@@ -146,7 +146,7 @@ static int TestSprintf8(int unused = 0, ...)
 	// template <typename String> 
 	// int StringPrintf(String& s, const typename String::value_type* EA_RESTRICT pFormat, ...)
 	{
-		eastl::string8 s8;
+		eastl::string s8;
 		int result = StringPrintf(s8, "%s", "hello");
 		EATEST_VERIFY((result == 5) && (s8 == "hello"));
 	}
@@ -159,14 +159,14 @@ static int TestSprintf8(int unused = 0, ...)
 
 	{
 		// Test for parsing of PRI constants in format strings
-		char8_t buffer[128];
+		char buffer[128];
 		Sprintf(buffer, "%" PRIxPTR, (intptr_t) 0xDEADBEEF);
 		EATEST_VERIFY(Strcmp(buffer, "deadbeef") == 0);
 	}
 
 	// Sprintf
 	{
-		char8_t buffer[128];
+		char buffer[128];
 		const int kHexValue = 0x12;
 
 		Sprintf(buffer, "%.4x", kHexValue);
@@ -202,7 +202,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{
-		char8_t buffer[128];
+		char buffer[128];
 
 		Sprintf(buffer, "decimal negative: \"%d\"\n", -2345);
 		EATEST_VERIFY(Strcmp(buffer, "decimal negative: \"-2345\"\n") == 0);
@@ -249,9 +249,9 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{
-		char8_t buffer[1024];
-		char8_t str1[] = "abc de";
-		char8_t str2[] = "abd def ghi jkl mno pqr stu vwz yz.";
+		char buffer[1024];
+		char str1[] = "abc de";
+		char str2[] = "abd def ghi jkl mno pqr stu vwz yz.";
 
 		// The C99 standard specifies that leading zeros only put zeroes in front of numerical types. Spaces for others.
 		Sprintf(buffer, "zero-padded string: \"%010s\"\n", str1);
@@ -269,13 +269,13 @@ static int TestSprintf8(int unused = 0, ...)
 		Sprintf(buffer, "limited string: \"%.22s\"\n", str2);
 		EATEST_VERIFY(Strcmp(buffer, "limited string: \"abd def ghi jkl mno pq\"\n") == 0);
 
-		Sprintf(buffer, "null string: \"%s\"\n", (char8_t*)NULL);
+		Sprintf(buffer, "null string: \"%s\"\n", (char*)NULL);
 		EATEST_VERIFY(Strcmp(buffer, "null string: \"(null)\"\n") == 0);
 
-		Sprintf(buffer, "%10s\n", (char8_t*)NULL);
+		Sprintf(buffer, "%10s\n", (char*)NULL);
 		EATEST_VERIFY(Strcmp(buffer, "    (null)\n") == 0);
 
-		Sprintf(buffer, "%-10s\n", (char8_t*)NULL);
+		Sprintf(buffer, "%-10s\n", (char*)NULL);
 		EATEST_VERIFY(Strcmp(buffer, "(null)    \n") == 0);
 
 		Sprintf(buffer, "%*s%*s%*s", -1, "one", -20, "two", -30, "three");
@@ -298,20 +298,20 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{   // String tests
-		// We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char8_t, char16_t, char32_t)
-		// We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char8_t, char16_t, char32_t)
-		// We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char8_t, char16_t, char32_t)
-		// We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char8_t, char16_t, char32_t)
+		// We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char, char16_t, char32_t)
+		// We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char, char16_t, char32_t)
+		// We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char, char16_t, char32_t)
+		// We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char, char16_t, char32_t)
 
-		char8_t  buffer[32];
-		char8_t  dStr8[2]  = { 'd', 0 };
+		char  buffer[32];
+		char  dStr8[2]  = { 'd', 0 };
 		char16_t eStr16[2] = { 'e', 0 };
 		char32_t fStr32[2] = { 'f', 0 };
 
-		Sprintf(buffer, "%hc %c %lc %I8c %I16c %I32c", 'a', 'b',           EA_WCHAR('c'), (char8_t)'d', (char16_t)'e', (char32_t)'f');
+		Sprintf(buffer, "%hc %c %lc %I8c %I16c %I32c", 'a', 'b',           EA_WCHAR('c'), (char)'d', (char16_t)'e', (char32_t)'f');
 		EATEST_VERIFY(Strcmp(buffer, "a b c d e f") == 0);
 
-		Sprintf(buffer, "%hC %C %lC %I8C %I16C %I32C", 'a', EA_WCHAR('b'), EA_WCHAR('c'), (char8_t)'d', (char16_t)'e', (char32_t)'f');
+		Sprintf(buffer, "%hC %C %lC %I8C %I16C %I32C", 'a', EA_WCHAR('b'), EA_WCHAR('c'), (char)'d', (char16_t)'e', (char32_t)'f');
 		EATEST_VERIFY(Strcmp(buffer, "a b c d e f") == 0);
 
 		Sprintf(buffer, "%hs %s %ls %I8s %I16s %I32s", "a", "b",           EA_WCHAR("c"), dStr8,        eStr16,         fStr32);
@@ -323,7 +323,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{ // NaN/Inf functionality tests
-		char8_t buffer[256];
+		char buffer[256];
 
 		const float     kFloat32PositiveInfinity     = FloatFromBitRepr(UINT32_C(0x7f800000));
 		const float     kFloat32NegativeInfinity     = FloatFromBitRepr(UINT32_C(0xff800000));
@@ -367,7 +367,7 @@ static int TestSprintf8(int unused = 0, ...)
 		Sprintf(buffer, "%e %f %g", kFloat64NegativeNaN, kFloat64NegativeNaN, kFloat64NegativeNaN);
 		EATEST_VERIFY(Strcmp(buffer, "-nan -nan -nan") == 0);
 
-		#if !defined(EA_PLATFORM_CAPILANO)
+		#if !defined(EA_PLATFORM_XBOXONE)
 			// This test should theoretically work on Capilano.  But currently it must be disabled or it
 			// will cause the runtime to assert.  A bug has been logged with MS so hopefully the issue
 			// will be resolved in the future.  We should try to enable the test later if it is resolved.
@@ -382,7 +382,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 	{ // Extended functionality tests
 
-		char8_t buffer[256];
+		char buffer[256];
 
 		Sprintf(buffer, "%08x %032b", 0xaaaaaaaa, 0xaaaaaaaa);
 		EATEST_VERIFY(Strcmp(buffer, "aaaaaaaa 10101010101010101010101010101010") == 0);
@@ -396,7 +396,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{
-		char8_t buffer[1024];
+		char buffer[1024];
 		int i;
 
 		Sprintf(buffer, "e-style >= 1: \"%e\"\n", 12.34);
@@ -502,8 +502,8 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{
-		char8_t        buffer[256];
-		const char8_t* pExpected;
+		char        buffer[256];
+		const char* pExpected;
 
 		// VC++ sprintf would fail these tests, as the Standard says to print no more 
 		// than 2 unless necessary, yet VC++ sprintf prints 3 digits exponents.
@@ -542,28 +542,28 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{
-		char8_t buffer[256];
+		char buffer[256];
 
 		// Verify that snprintf follows the C99 convention of returning the number of characters
 		// required. This is as opposed to the non-standard way that some libraries just return 
 		// -1 if the buffer isn't big enough.
 
 		const int kBuf1Capacity = 20;
-		char8_t   buf1[kBuf1Capacity];
+		char   buf1[kBuf1Capacity];
 		int       n1 = Snprintf(buf1, kBuf1Capacity, "%30s", "foo");
 		Sprintf(buffer, "snprintf(\"%%30s\", \"foo\") == %d, \"%.*s\"\n", n1, kBuf1Capacity, buf1);
 		EATEST_VERIFY(Strcmp(buffer, "snprintf(\"%30s\", \"foo\") == 30, \"                   \"\n") == 0); // VC++ fails this, as it's version of snprintf doesn't use C99 standard snprintf return value conventions.
 
 		const int kBuf2Capacity = 512;
-		char8_t   buf2[kBuf2Capacity];
+		char   buf2[kBuf2Capacity];
 		int       n2 = Snprintf(buf2, kBuf2Capacity, "%.1000u", 10);
 		Sprintf(buffer, "snprintf(\"%%.1000u\", 10) == %d\n", n2);
 		EATEST_VERIFY(Strcmp(buffer, "snprintf(\"%.1000u\", 10) == 1000\n") == 0); // VC++ fails this, as it's version of snprintf doesn't use C99 standard snprintf return value conventions.
 
 		const int kBuf3Capacity = 512;
-		char8_t   buf3[kBuf3Capacity];
-		char8_t*  pString = new char8_t[100000];
-		memset(pString, '_', 100000 * sizeof(char8_t));
+		char   buf3[kBuf3Capacity];
+		char*  pString = new char[100000];
+		memset(pString, '_', 100000 * sizeof(char));
 		pString[100000 - 1] = 0;
 		int n3 = Snprintf(buf3, kBuf2Capacity, "%s", pString);
 		Sprintf(buffer, "snprintf(\"%%s\", pString) == %d\n", n3);
@@ -581,7 +581,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{
-		char8_t buffer[16][256];
+		char buffer[16][256];
 
 		int n = 0, i, j, k, m;
 
@@ -593,8 +593,8 @@ static int TestSprintf8(int unused = 0, ...)
 				{
 					for(m = 0; m < 2; m++)
 					{
-						char8_t prefix[7];
-						char8_t format[128];
+						char prefix[7];
+						char format[128];
 
 						Strcpy(prefix, "%");
 						if(i == 0)
@@ -639,8 +639,8 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{
-		char8_t        buffer[256];
-		const char8_t* pExpected;
+		char        buffer[256];
+		const char* pExpected;
 
 		Sprintf(buffer, "%e", 1234567.8); // VC++ sprintf would fail this, as it uses 3 exponent digits, but the Standard says to print no more than 2 unless necessary.
 		pExpected = "1.234568e+06";
@@ -703,8 +703,8 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{   // Test the ' extension, which cases numbers to be printed with a thousands separator.
-		char8_t        buffer[64];
-		const char8_t* pExpected;
+		char        buffer[64];
+		const char* pExpected;
 
 		Sprintf(buffer, "%'u", 123456789);
 		EATEST_VERIFY(Strcmp(buffer, "123,456,789") == 0);
@@ -762,7 +762,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{
-		char8_t buffer[256];
+		char buffer[256];
 
 		Sprintf(buffer, "%hhu", UCHAR_MAX + 2);
 		EATEST_VERIFY(Strcmp(buffer, "1") == 0); // VC++ fails this, as it doesn't implement the C99 standard %hh modifier.
@@ -773,7 +773,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{
-		char8_t buffer[128];
+		char buffer[128];
 
 		Sprintf(buffer, "%5.s", "xyz");
 		EATEST_VERIFY(Strcmp(buffer, "     ") == 0);
@@ -796,7 +796,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 
 	{
-		char8_t buffer[128];
+		char buffer[128];
 		int     precision;
 		//for %g, precision 0 is not valid, if specified 0, it is taken as 1
 		precision = 0;
@@ -831,7 +831,7 @@ static int TestSprintf8(int unused = 0, ...)
 
 	{   // EAC tests
 
-		char8_t dest1[1024], dest3[1024];
+		char dest1[1024], dest3[1024];
 
 		// Test #1
 		Sprintf(dest1, "Hello.  Test.");
@@ -850,8 +850,8 @@ static int TestSprintf8(int unused = 0, ...)
 		EATEST_VERIFY(Strcmp(dest1, "Float.  -0.010000 10.000000 0.000000\n") == 0);
 
 		// Test #5
-		Sprintf(dest1, "Str/char8_t: %s %c %c", "test", 'b', 0341);
-		EATEST_VERIFY(Strcmp(dest1, "Str/char8_t: test b \341") == 0);
+		Sprintf(dest1, "Str/char: %s %c %c", "test", 'b', 0341);
+		EATEST_VERIFY(Strcmp(dest1, "Str/char: test b \341") == 0);
 
 		// Test #6
 		Sprintf(dest1,"Hex: %x %X",3829,-392);
@@ -942,38 +942,38 @@ static int TestSprintf8(int unused = 0, ...)
 
 		const float list1f[]={0.832f,0.00832f,8.32f,0.0f,-0.15f};
 
-		const char8_t* list1[]={"0.832000","0.008320","8.320000","0.000000","-0.150000"};
+		const char* list1[]={"0.832000","0.008320","8.320000","0.000000","-0.150000"};
 
 		const float list2f[]={0.0000000000123f,0.000000000123f,0.00000000123f,0.0000000123f
 								,0.000000123f,0.00000123f,0.0000123f,0.000123f,0.00123f,0.0123f,0.123f,1.23f
 								,12.3f,123.0f,1230.0f,12300.0f,123000.0f,1230000.0f,12300000.0f,123000000.0f,12300000000.0f};
 
-		const char8_t* list2[]={"0.000000","0.000000","0.000000","0.000000"
+		const char* list2[]={"0.000000","0.000000","0.000000","0.000000"
 								,"0.000000","0.000001","0.000012","0.000123","0.001230","0.012300","0.123000","1.230000"
 								,"12.300000","123.000000","1230.000000","12300.000000","123000.000000","1230000.000000",
 								"12300000.000000","123000000.000000","12300000000.000000"};
 
-		const char8_t* list22D[]={"0.00","0.00","0.00","0.00"
+		const char* list22D[]={"0.00","0.00","0.00","0.00"
 								,"0.00","0.00","0.00","0.00","0.00","0.01","0.12","1.23"
 								,"12.30","123.00","1230.00","12300.00","123000.00","1230000.00","12300000.00",
 								"123000000.00","12300000000.00"};
 
-		const char8_t* list23DSL[]={"1.230e-11","1.230e-10","1.230e-09","1.230e-08"
+		const char* list23DSL[]={"1.230e-11","1.230e-10","1.230e-09","1.230e-08"
 								,"1.230e-07","1.230e-06","1.230e-05","1.230e-04","1.230e-03","1.230e-02","1.230e-01","1.230e+00"
 								,"1.230e+01","1.230e+02","1.230e+03","1.230e+04","1.230e+05","1.230e+06","1.230e+07","1.230e+08"
 								,"1.230e+10"};
 
-		const char8_t* list24DSL[]={"1.230E-11","1.230E-10","1.230E-09","1.230E-08"
+		const char* list24DSL[]={"1.230E-11","1.230E-10","1.230E-09","1.230E-08"
 								,"1.230E-07","1.230E-06","1.230E-05","1.230E-04","1.230E-03","1.230E-02","1.230E-01","1.230E+00"
 								,"1.230E+01","1.230E+02","1.230E+03","1.230E+04","1.230E+05","1.230E+06","1.230E+07","1.230E+08"
 								,"1.230E+10"};
 
-		const char8_t* list31DSL[]={"1.23e-11","1.23e-10","1.23e-09","1.23e-08"
+		const char* list31DSL[]={"1.23e-11","1.23e-10","1.23e-09","1.23e-08"
 								,"1.23e-07","1.23e-06","1.23e-05","0","0.001","0.012","0.123","1.23"
 								,"12.3","123","1.23e+03","1.23e+04","1.23e+05","1.23e+06","1.23e+07","1.23e+08"
 								,"1.23e+10"};
 
-		const char8_t* list32DSL[]={"1.23E-11","1.23E-10","1.23E-09","1.23E-08"
+		const char* list32DSL[]={"1.23E-11","1.23E-10","1.23E-09","1.23E-08"
 								,"1.23E-07","1.23E-06","1.23E-05","0","0.001","0.012","0.123","1.23"
 								,"12.3","123","1.23E+03","1.23E+04","1.23E+05","1.23E+06","1.23E+07","1.23E+08"
 								,"1.23E+10"};
@@ -981,7 +981,7 @@ static int TestSprintf8(int unused = 0, ...)
 		int32_t list1size = sizeof(list1f)/sizeof(list1f[0]);
 		int32_t list2size = sizeof(list2f)/sizeof(list2f[0]);
 		int32_t i, error;
-		char8_t str[256];
+		char str[256];
 
 		error = 0;
 		for(i = 0; i < list1size; i++)
@@ -1076,13 +1076,13 @@ static int TestSprintf8(int unused = 0, ...)
 		EA::StdC::Snprintf(format, sizeof(format), "%%.%us%%c123", kBufferSize - 1);
 		EATEST_VERIFY(Strcmp(format, "%.2047s%c123") == 0);
 
-		auto unique_buffer = eastl::make_unique<char8_t[]>(kBufferSize);
-		auto unique_expect = eastl::make_unique<char8_t[]>(kBufferSize + 16);
-		auto unique_actual = eastl::make_unique<char8_t[]>(kBufferSize + 16);
+		auto unique_buffer = eastl::make_unique<char[]>(kBufferSize);
+		auto unique_expect = eastl::make_unique<char[]>(kBufferSize + 16);
+		auto unique_actual = eastl::make_unique<char[]>(kBufferSize + 16);
 
-		char8_t* buffer = unique_buffer.get();
-		char8_t* expectedOutput = unique_expect.get();
-		char8_t* actualOutput = unique_actual.get();
+		char* buffer = unique_buffer.get();
+		char* expectedOutput = unique_expect.get();
+		char* actualOutput = unique_actual.get();
 
 		memset(buffer, '?', kBufferSize);
 		buffer[kBufferSize - 1] = 0;
@@ -1099,8 +1099,8 @@ static int TestSprintf8(int unused = 0, ...)
 		static const int kSourceSize = 1024 * 5;
 		static const int kOutputSize = kSourceSize + 100;
 		char16_t value[kSourceSize];
-		char8_t destination[kOutputSize];
-		char8_t comparison[kOutputSize];
+		char destination[kOutputSize];
+		char comparison[kOutputSize];
 
 		for(int i = 0; i < kSourceSize - 1; ++i)
 		{
@@ -1120,9 +1120,9 @@ static int TestSprintf8(int unused = 0, ...)
 	/* Copied from rwstdc but not completed.
 	// Compare with Sprintf
 	{
-		char8_t  buffer1[128];
-		char8_t  buffer2[128];
-		char8_t* test = "test %d %5.2f   %s \n \t\t\\\\  %X";
+		char  buffer1[128];
+		char  buffer2[128];
+		char* test = "test %d %5.2f   %s \n \t\t\\\\  %X";
 
 		Sprintf(buffer1, test, -3923, 0.38293, "test", 4568);
 		Snprintf(buffer2, 128, test, -3923, 0.38293, "test", 4568);
@@ -1132,8 +1132,8 @@ static int TestSprintf8(int unused = 0, ...)
 
 	// Compare with standard sprintf
 	{
-		char8_t buffer1[128];
-		char8_t buffer2[128];
+		char buffer1[128];
+		char buffer2[128];
 		char*   test = "test %d %5.2f   %s \n \t\t\\\\  %X";
 
 		sprintf(buffer1, test, -3923, 0.38293, "test", 4568);
@@ -1228,7 +1228,7 @@ static int TestSprintf16(int unused = 0, ...)
 	}
 
 	// template <typename String>
-	// int StringVcprintf(String& s, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+	// int StringVcprintf(String& s, const char* EA_RESTRICT pFormat, va_list arguments)
 	{
 		va_list arguments;
 		va_start(arguments, unused);
@@ -1381,21 +1381,21 @@ static int TestSprintf16(int unused = 0, ...)
 
 
 	{   // String tests
-		// We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char8_t, char16_t, char32_t)
-		// We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char8_t, char16_t, char32_t)
-		// We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char8_t, char16_t, char32_t)
-		// We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char8_t, char16_t, char32_t)
+		// We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char, char16_t, char32_t)
+		// We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char, char16_t, char32_t)
+		// We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char, char16_t, char32_t)
+		// We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char, char16_t, char32_t)
 
 		char16_t buffer[32];
-		char8_t  dStr8[2]  = { 'd', 0 };
+		char  dStr8[2]  = { 'd', 0 };
 		char16_t eStr16[2] = { 'e', 0 };
 		char32_t fStr32[2] = { 'f', 0 };
 
-		#if EASPRINTF_MS_STYLE_S_FORMAT // Microsoft style means that the meanings of S and s are reversed for non-char8_t Sprintf.
-			Sprintf(buffer, EA_CHAR16("%hc %c %lc %I8c %I16c %I32c"), 'a', EA_WCHAR('b'), EA_WCHAR('c'), (char8_t)'d', (char16_t)'e', (char32_t)'f');
+		#if EASPRINTF_MS_STYLE_S_FORMAT // Microsoft style means that the meanings of S and s are reversed for non-char Sprintf.
+			Sprintf(buffer, EA_CHAR16("%hc %c %lc %I8c %I16c %I32c"), 'a', EA_WCHAR('b'), EA_WCHAR('c'), (char)'d', (char16_t)'e', (char32_t)'f');
 			EATEST_VERIFY(Strcmp(buffer, EA_CHAR16("a b c d e f")) == 0);
 
-			Sprintf(buffer, EA_CHAR16("%hC %C %lC %I8C %I16C %I32C"), 'a', 'b',           EA_WCHAR('c'), (char8_t)'d', (char16_t)'e', (char32_t)'f');
+			Sprintf(buffer, EA_CHAR16("%hC %C %lC %I8C %I16C %I32C"), 'a', 'b',           EA_WCHAR('c'), (char)'d', (char16_t)'e', (char32_t)'f');
 			EATEST_VERIFY(Strcmp(buffer, EA_CHAR16("a b c d e f")) == 0);
 
 			Sprintf(buffer, EA_CHAR16("%hs %s %ls %I8s %I16s %I32s"), "a", EA_WCHAR("b"), EA_WCHAR("c"), dStr8,        eStr16,         fStr32);
@@ -1404,10 +1404,10 @@ static int TestSprintf16(int unused = 0, ...)
 			Sprintf(buffer, EA_CHAR16("%hS %S %lS %I8S %I16S %I32S"), "a", "b",           EA_WCHAR("c"), dStr8,        eStr16,         fStr32);
 			EATEST_VERIFY(Strcmp(buffer, EA_CHAR16("a b c d e f")) == 0);
 		#else
-			Sprintf(buffer, EA_CHAR16("%hc %c %lc %I8c %I16c %I32c"), 'a', 'b',           EA_WCHAR('c'), (char8_t)'d', (char16_t)'e', (char32_t)'f');
+			Sprintf(buffer, EA_CHAR16("%hc %c %lc %I8c %I16c %I32c"), 'a', 'b',           EA_WCHAR('c'), (char)'d', (char16_t)'e', (char32_t)'f');
 			EATEST_VERIFY(Strcmp(buffer, EA_CHAR16("a b c d e f")) == 0);
 
-			Sprintf(buffer, EA_CHAR16("%hC %C %lC %I8C %I16C %I32C"), 'a', EA_WCHAR('b'), EA_WCHAR('c'), (char8_t)'d', (char16_t)'e', (char32_t)'f');
+			Sprintf(buffer, EA_CHAR16("%hC %C %lC %I8C %I16C %I32C"), 'a', EA_WCHAR('b'), EA_WCHAR('c'), (char)'d', (char16_t)'e', (char32_t)'f');
 			EATEST_VERIFY(Strcmp(buffer, EA_CHAR16("a b c d e f)") == 0);
 
 			Sprintf(buffer, EA_CHAR16("%hs %s %ls %I8s %I16s %I32s"), "a", "b",           EA_WCHAR("c"), dStr8,        eStr16,         fStr32);
@@ -1803,7 +1803,7 @@ static int TestSprintf16(int unused = 0, ...)
 	{
 		static const int kSourceSize = 1024 * 5;
 		static const int kOutputSize = kSourceSize + 100;
-		char8_t value[kSourceSize];
+		char value[kSourceSize];
 		char16_t destination[kOutputSize];
 		char16_t comparison[kOutputSize];
 
@@ -1872,7 +1872,7 @@ static int TestSprintf32(int unused = 0, ...)
 	}
 
 	// template <typename String>
-	// int StringVcprintf(String& s, const char8_t* EA_RESTRICT pFormat, va_list arguments)
+	// int StringVcprintf(String& s, const char* EA_RESTRICT pFormat, va_list arguments)
 	{
 		va_list arguments;
 		va_start(arguments, unused);
@@ -2025,21 +2025,21 @@ static int TestSprintf32(int unused = 0, ...)
 
 
 	{   // String tests
-		// We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char8_t, char16_t, char32_t)
-		// We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char8_t, char16_t, char32_t)
-		// We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char8_t, char16_t, char32_t)
-		// We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char8_t, char16_t, char32_t)
+		// We accept %hc, %c, %lc, %I8c, %I16c, %I32c (regular, regular, wide, char, char16_t, char32_t)
+		// We accept %hC, %C, %lC, %I8C, %I16C, %I32C (regular, wide,    wide, char, char16_t, char32_t)
+		// We accept %hs, %s, %ls, %I8s, %I16s, %I32s (regular, regular, wide, char, char16_t, char32_t)
+		// We accept %hS, %S, %lS, %I8s, %I16s, %I32s (regular, wide,    wide, char, char16_t, char32_t)
 
 		char32_t buffer[32];
-		char8_t  dStr8[2]  = { 'd', 0 };
+		char  dStr8[2]  = { 'd', 0 };
 		char16_t eStr16[2] = { 'e', 0 };
 		char32_t fStr32[2] = { 'f', 0 };
 
-		#if EASPRINTF_MS_STYLE_S_FORMAT // Microsoft style means that the meanings of S and s are reversed for non-char8_t Sprintf.
-			Sprintf(buffer, EA_CHAR32("%hc %c %lc %I8c %I16c %I32c"), 'a', EA_WCHAR('b'), EA_WCHAR('c'), (char8_t)'d', (char16_t)'e', (char32_t)'f');
+		#if EASPRINTF_MS_STYLE_S_FORMAT // Microsoft style means that the meanings of S and s are reversed for non-char Sprintf.
+			Sprintf(buffer, EA_CHAR32("%hc %c %lc %I8c %I16c %I32c"), 'a', EA_WCHAR('b'), EA_WCHAR('c'), (char)'d', (char16_t)'e', (char32_t)'f');
 			EATEST_VERIFY(Strcmp(buffer, EA_CHAR32("a b c d e f")) == 0);
 
-			Sprintf(buffer, EA_CHAR32("%hC %C %lC %I8C %I16C %I32C"), 'a', 'b',           EA_WCHAR('c'), (char8_t)'d', (char16_t)'e', (char32_t)'f');
+			Sprintf(buffer, EA_CHAR32("%hC %C %lC %I8C %I16C %I32C"), 'a', 'b',           EA_WCHAR('c'), (char)'d', (char16_t)'e', (char32_t)'f');
 			EATEST_VERIFY(Strcmp(buffer, EA_CHAR32("a b c d e f")) == 0);
 
 			Sprintf(buffer, EA_CHAR32("%hs %s %ls %I8s %I16s %I32s"), "a", EA_WCHAR("b"), EA_WCHAR("c"), dStr8,        eStr16,         fStr32);
@@ -2048,10 +2048,10 @@ static int TestSprintf32(int unused = 0, ...)
 			Sprintf(buffer, EA_CHAR32("%hS %S %lS %I8S %I16S %I32S"), "a", "b",           EA_WCHAR("c"), dStr8,        eStr16,         fStr32);
 			EATEST_VERIFY(Strcmp(buffer, EA_CHAR32("a b c d e f")) == 0);
 		#else
-			Sprintf(buffer, EA_CHAR32("%hc %c %lc %I8c %I16c %I32c"), 'a', 'b',           EA_WCHAR('c'), (char8_t)'d', (char16_t)'e', (char32_t)'f');
+			Sprintf(buffer, EA_CHAR32("%hc %c %lc %I8c %I16c %I32c"), 'a', 'b',           EA_WCHAR('c'), (char)'d', (char16_t)'e', (char32_t)'f');
 			EATEST_VERIFY(Strcmp(buffer, EA_CHAR32("a b c d e f")) == 0);
 
-			Sprintf(buffer, EA_CHAR32("%hC %C %lC %I8C %I16C %I32C"), 'a', EA_WCHAR('b'), EA_WCHAR('c'), (char8_t)'d', (char16_t)'e', (char32_t)'f');
+			Sprintf(buffer, EA_CHAR32("%hC %C %lC %I8C %I16C %I32C"), 'a', EA_WCHAR('b'), EA_WCHAR('c'), (char)'d', (char16_t)'e', (char32_t)'f');
 			EATEST_VERIFY(Strcmp(buffer, EA_CHAR32("a b c d e f)") == 0);
 
 			Sprintf(buffer, EA_CHAR32("%hs %s %ls %I8s %I16s %I32s"), "a", "b",           EA_WCHAR("c"), dStr8,        eStr16,         fStr32);
@@ -2446,7 +2446,7 @@ static int TestSprintf32(int unused = 0, ...)
 	{
 		static const int kSourceSize = 1024 * 5;
 		static const int kOutputSize = kSourceSize + 100;
-		char8_t value[kSourceSize];
+		char value[kSourceSize];
 		char32_t destination[kOutputSize];
 		char32_t comparison[kOutputSize];
 
@@ -2480,11 +2480,11 @@ static int TestDrintf8()
 
 		Dprintf("Begin Dprintf (debug output printf) testing...\n");
 
-		// EASTDC_API int Vdprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments);
-		// EASTDC_API int Dprintf(const char8_t* EA_RESTRICT pFormat, ...);
+		// EASTDC_API int Vdprintf(const char* EA_RESTRICT pFormat, va_list arguments);
+		// EASTDC_API int Dprintf(const char* EA_RESTRICT pFormat, ...);
 		eastl::string8 sBuffer;
 		for(eastl_size_t i = 0; i < 1024; i++) // This size should be > than the size of the buffer(s) used in PlatformLogWriter8, though those buffer sizes aren't publicly exposed.
-			sBuffer.push_back('a' + (char8_t)(i % 26));
+			sBuffer.push_back('a' + (char)(i % 26));
 
 		EA::UnitTest::Rand rand((uint32_t)EA::StdC::GetTime());
 
@@ -2497,10 +2497,10 @@ static int TestDrintf8()
 		}
 
 		#if EASTDC_PRINTF_DEBUG_ENABLED
-			// EASTDC_API int Fprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFormat, ...);
-			// EASTDC_API int Printf(const char8_t* EA_RESTRICT pFormat, ...);
-			// EASTDC_API int Vfprintf(FILE* EA_RESTRICT pFile, const char8_t* EA_RESTRICT pFormat, va_list arguments);
-			// EASTDC_API int Vprintf(const char8_t* EA_RESTRICT pFormat, va_list arguments);
+			// EASTDC_API int Fprintf(FILE* EA_RESTRICT pFile, const char* EA_RESTRICT pFormat, ...);
+			// EASTDC_API int Printf(const char* EA_RESTRICT pFormat, ...);
+			// EASTDC_API int Vfprintf(FILE* EA_RESTRICT pFile, const char* EA_RESTRICT pFormat, va_list arguments);
+			// EASTDC_API int Vprintf(const char* EA_RESTRICT pFormat, va_list arguments);
 			result = Printf("%s", "Printf test (EASTDC_PRINTF_DEBUG_ENABLED).\n");
 			EATEST_VERIFY(result > 0);
 
@@ -2522,7 +2522,7 @@ static int TestOsprintf8()
 	int nErrorCount = 0;
 
 	{
-		char8_t buffer[32];
+		char buffer[32];
 		int     result;
 
 		memset(buffer, 0, sizeof(buffer));
@@ -2710,47 +2710,6 @@ static int TestOsprintf32()
 }
 
 
-///////////////////////////////////////////////////////////////////////////////
-// TestDeprecated
-///////////////////////////////////////////////////////////////////////////////
-
-static int StringWriterOld8(const char8_t* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext8)
-{
-	eastl::string8* pString8 = static_cast<eastl::string8*>(pContext8);
-	pString8->append(pData, (eastl_size_t)nCount);
-	return (int)nCount;
-}
-
-static int StringWriterOld16(const char16_t* EA_RESTRICT pData, size_t nCount, void* EA_RESTRICT pContext16)
-{
-	eastl::string16* pString16 = static_cast<eastl::string16*>(pContext16);
-	pString16->append(pData, (eastl_size_t)nCount);
-	return (int)nCount;
-}
-
-static int TestDeprecated()
-{
-	using namespace EA::StdC;
-
-	int nErrorCount = 0;
-
-	{
-		eastl::string8  s8;
-		eastl::string16 s16;
-		int             result;
-
-		result = Cprintf(StringWriterOld8,  &s8, "Hello world");
-		EATEST_VERIFY(result == (int)Strlen("Hello world"));
-		EATEST_VERIFY(s8 == "Hello world");
-
-		result = Cprintf(StringWriterOld16, &s16, EA_CHAR16("Hello world"));
-		EATEST_VERIFY(result == (int)Strlen(EA_CHAR16("Hello world")));
-		EATEST_VERIFY(s16 == EA_CHAR16("Hello world"));
-	}
-
-	return nErrorCount;
-}
-
 
 ///////////////////////////////////////////////////////////////////////////////
 // TestSprintf
@@ -2775,9 +2734,6 @@ int TestSprintf()
 	nErrorCount += TestOsprintf16();
 	nErrorCount += TestOsprintf32();
 
-	// Test deprecated functionality
-	nErrorCount += TestDeprecated();
-
 	return nErrorCount;
 }
 

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 191 - 191
test/source/TestString.cpp


+ 88 - 82
test/source/TestTextUtil.cpp

@@ -17,7 +17,7 @@
 #endif
 
 
-typedef eastl::basic_string<char8_t>  String8;
+typedef eastl::basic_string<char>  String8;
 typedef eastl::basic_string<char16_t> String16;
 typedef eastl::basic_string<char32_t> String32;
 
@@ -30,10 +30,10 @@ static int TestUTF8()
 	int nErrorCount(0);
 
 	bool           bResult;
-	const char8_t* pResult;
+	const char* pResult;
 	char16_t       cResult;
 	size_t         nResult;
-	char8_t        buffer[32];
+	char        buffer[32];
 
 	// We would need a lot more strings than this to test this functionality well.
 	const uint8_t str1[]    = { 0 };
@@ -41,12 +41,12 @@ static int TestUTF8()
 	const uint8_t str3[]    = { 0xe8,    0x8f, 0xa4,    0xc8, 0x80,    0x61,    0 }; // 0x83e4, 0x0200, 0x0061
 	const uint8_t str4[]    = { 0x7f,    0xc4, 0x80,    0xef, 0xbf,    0xb0,    0 }; // 0x007f, 0x0100, 0xfff0
 
-	const char8_t* strArray[] =
+	const char* strArray[] =
 	{ 
-		reinterpret_cast<const char8_t*>(str1), 
-		reinterpret_cast<const char8_t*>(str2), 
-		reinterpret_cast<const char8_t*>(str3), 
-		reinterpret_cast<const char8_t*>(str4)
+		reinterpret_cast<const char*>(str1), 
+		reinterpret_cast<const char*>(str2), 
+		reinterpret_cast<const char*>(str3), 
+		reinterpret_cast<const char*>(str4)
 	};
 
 	// These represent bad combinations of bytes that any UTF8 decoder should recognize.
@@ -62,21 +62,21 @@ static int TestUTF8()
 	//const uint8_t strBad8[] = { 0xed, 0xbf, 0xbf, 0 };
 	//const uint8_t strBad9[] = { 0xef, 0xbf, 0xbe, 0 };
 
-	const char8_t* strBadArray[] =
+	const char* strBadArray[] =
 	{
-		reinterpret_cast<const char8_t*>(strBad1), 
-		reinterpret_cast<const char8_t*>(strBad2), 
-		reinterpret_cast<const char8_t*>(strBad3), 
-		reinterpret_cast<const char8_t*>(strBad4), 
-		reinterpret_cast<const char8_t*>(strBad5), 
-		reinterpret_cast<const char8_t*>(strBad6)
-	/*, reinterpret_cast<const char8_t*>(strBad7), 
-		reinterpret_cast<const char8_t*>(strBad8), 
-		reinterpret_cast<const char8_t*>(strBad9) */
+		reinterpret_cast<const char*>(strBad1), 
+		reinterpret_cast<const char*>(strBad2), 
+		reinterpret_cast<const char*>(strBad3), 
+		reinterpret_cast<const char*>(strBad4), 
+		reinterpret_cast<const char*>(strBad5), 
+		reinterpret_cast<const char*>(strBad6)
+	/*, reinterpret_cast<const char*>(strBad7), 
+		reinterpret_cast<const char*>(strBad8), 
+		reinterpret_cast<const char*>(strBad9) */
 	};
 
 
-	// bool UTF8Validate(const char8_t* p, size_t nLength);
+	// bool UTF8Validate(const char* p, size_t nLength);
 	for(size_t i = 0; i < sizeof(strArray)/sizeof(strArray[0]); ++i)
 	{
 		bResult = UTF8Validate(strArray[i], strlen(strArray[i]));
@@ -90,8 +90,8 @@ static int TestUTF8()
 	}
 
 
-	// char8_t* UTF8Increment(const char8_t* p, size_t n);
-	// char8_t* UTF8Decrement(const char8_t* p, size_t n);
+	// char* UTF8Increment(const char* p, size_t n);
+	// char* UTF8Decrement(const char* p, size_t n);
 	pResult = UTF8Increment(strArray[0], 1);
 	EATEST_VERIFY(pResult == (strArray[0] + 1));
 	pResult = UTF8Decrement(pResult, 1);
@@ -113,7 +113,7 @@ static int TestUTF8()
 	EATEST_VERIFY(pResult == strArray[3]);
 
 
-	// size_t UTF8Length(const char8_t* p);
+	// size_t UTF8Length(const char* p);
 	EATEST_VERIFY(UTF8Length("0123456789") == 10);
 	EATEST_VERIFY(UTF8Length("") == 0);
 	EATEST_VERIFY(UTF8Length("\xc2" "\xa2") == 1);
@@ -155,7 +155,7 @@ static int TestUTF8()
 	EATEST_VERIFY(UTF8Length(s32.c_str()) == 9);
 
 
-	// size_t UTF8CharSize(const char8_t* p);
+	// size_t UTF8CharSize(const char* p);
 	EATEST_VERIFY(UTF8CharSize(strArray[0]) == 1);
 	EATEST_VERIFY(UTF8CharSize(strArray[1]) == 1);
 	EATEST_VERIFY(UTF8CharSize(strArray[2] + 0) == 3);
@@ -204,7 +204,7 @@ static int TestUTF8()
 	EATEST_VERIFY(nResult == 3);
 
 
-	// char16_t UTF8ReadChar(const char8_t* p, const char8_t** ppEnd = NULL);
+	// char16_t UTF8ReadChar(const char* p, const char** ppEnd = NULL);
 	pResult = strArray[0];
 	cResult = UTF8ReadChar(pResult, &pResult);
 	EATEST_VERIFY((cResult == 0x0000) && (pResult == strArray[0] + 1));
@@ -237,63 +237,63 @@ static int TestUTF8()
 	EATEST_VERIFY((cResult == 0xfff0) && (pResult == strArray[3] + 6));
 
 
-	// char8_t* UTF8WriteChar(char8_t* p, char16_t c);
+	// char* UTF8WriteChar(char* p, char16_t c);
 	pResult = buffer;
-	pResult = UTF8WriteChar((char8_t*)pResult, (char16_t)0x83e4);
-	pResult = UTF8WriteChar((char8_t*)pResult, (char16_t)0x0200);
-	pResult = UTF8WriteChar((char8_t*)pResult, (char16_t)0x0061);
-	pResult = UTF8WriteChar((char8_t*)pResult, (char16_t)0x0000);
+	pResult = UTF8WriteChar((char*)pResult, (char16_t)0x83e4);
+	pResult = UTF8WriteChar((char*)pResult, (char16_t)0x0200);
+	pResult = UTF8WriteChar((char*)pResult, (char16_t)0x0061);
+	pResult = UTF8WriteChar((char*)pResult, (char16_t)0x0000);
 	EATEST_VERIFY((strcmp(buffer, strArray[2]) == 0) && (pResult == buffer + 7));
 
 
-	// char8_t* UTF8WriteChar(char8_t* p, char32_t c);
+	// char* UTF8WriteChar(char* p, char32_t c);
 	pResult = buffer;
-	pResult = UTF8WriteChar((char8_t*)pResult, (char32_t)0x83e4);
-	pResult = UTF8WriteChar((char8_t*)pResult, (char32_t)0x0200);
-	pResult = UTF8WriteChar((char8_t*)pResult, (char32_t)0x0061);
-	pResult = UTF8WriteChar((char8_t*)pResult, (char32_t)0x0000);
+	pResult = UTF8WriteChar((char*)pResult, (char32_t)0x83e4);
+	pResult = UTF8WriteChar((char*)pResult, (char32_t)0x0200);
+	pResult = UTF8WriteChar((char*)pResult, (char32_t)0x0061);
+	pResult = UTF8WriteChar((char*)pResult, (char32_t)0x0000);
 	EATEST_VERIFY((strcmp(buffer, strArray[2]) == 0) && (pResult == buffer + 7));
 
 
-	// bool UTF8IsSoloByte(char8_t c);
+	// bool UTF8IsSoloByte(char c);
 	EATEST_VERIFY( UTF8IsSoloByte('\0'));
 	EATEST_VERIFY( UTF8IsSoloByte('\n'));
 	EATEST_VERIFY( UTF8IsSoloByte('a'));
-	EATEST_VERIFY( UTF8IsSoloByte((char8_t)0x7f));
-	EATEST_VERIFY(!UTF8IsSoloByte((char8_t)0x80));
-	EATEST_VERIFY(!UTF8IsSoloByte((char8_t)0xfd));
-	EATEST_VERIFY(!UTF8IsSoloByte((char8_t)0xfe));
-	EATEST_VERIFY(!UTF8IsSoloByte((char8_t)0xff));
+	EATEST_VERIFY( UTF8IsSoloByte((char)0x7f));
+	EATEST_VERIFY(!UTF8IsSoloByte((char)0x80));
+	EATEST_VERIFY(!UTF8IsSoloByte((char)0xfd));
+	EATEST_VERIFY(!UTF8IsSoloByte((char)0xfe));
+	EATEST_VERIFY(!UTF8IsSoloByte((char)0xff));
 
 
-	// bool UTF8IsLeadByte(char8_t c);
+	// bool UTF8IsLeadByte(char c);
 	EATEST_VERIFY( UTF8IsSoloByte('\0'));
 	EATEST_VERIFY( UTF8IsSoloByte('\n'));
 	EATEST_VERIFY( UTF8IsSoloByte('a'));
-	EATEST_VERIFY( UTF8IsSoloByte((char8_t)0x7f));
-	EATEST_VERIFY(!UTF8IsSoloByte((char8_t)0xc0));
-	EATEST_VERIFY(!UTF8IsSoloByte((char8_t)0xd1));
-	EATEST_VERIFY(!UTF8IsSoloByte((char8_t)0xe4));
-	EATEST_VERIFY(!UTF8IsSoloByte((char8_t)0xf0));       // This assumes that we don't support 4, 5, 6 byte sequences.
-	EATEST_VERIFY(!UTF8IsSoloByte((char8_t)0xfe));
-	EATEST_VERIFY(!UTF8IsSoloByte((char8_t)0xff));
-
-
-	// bool UTF8IsFollowByte(char8_t c);
-	EATEST_VERIFY(!UTF8IsFollowByte((char8_t)0x00));
-	EATEST_VERIFY(!UTF8IsFollowByte((char8_t)0x7f));
-	EATEST_VERIFY( UTF8IsFollowByte((char8_t)0x80));
-	EATEST_VERIFY( UTF8IsFollowByte((char8_t)0xbf));
-	EATEST_VERIFY(!UTF8IsFollowByte((char8_t)0xc0));
-	EATEST_VERIFY(!UTF8IsFollowByte((char8_t)0xff));
-
-	// char8_t* UTF8ReplaceInvalidChar(char8_t* pIn, size_t nLength, char8_t replaceWith);
+	EATEST_VERIFY( UTF8IsSoloByte((char)0x7f));
+	EATEST_VERIFY(!UTF8IsSoloByte((char)0xc0));
+	EATEST_VERIFY(!UTF8IsSoloByte((char)0xd1));
+	EATEST_VERIFY(!UTF8IsSoloByte((char)0xe4));
+	EATEST_VERIFY(!UTF8IsSoloByte((char)0xf0));       // This assumes that we don't support 4, 5, 6 byte sequences.
+	EATEST_VERIFY(!UTF8IsSoloByte((char)0xfe));
+	EATEST_VERIFY(!UTF8IsSoloByte((char)0xff));
+
+
+	// bool UTF8IsFollowByte(char c);
+	EATEST_VERIFY(!UTF8IsFollowByte((char)0x00));
+	EATEST_VERIFY(!UTF8IsFollowByte((char)0x7f));
+	EATEST_VERIFY( UTF8IsFollowByte((char)0x80));
+	EATEST_VERIFY( UTF8IsFollowByte((char)0xbf));
+	EATEST_VERIFY(!UTF8IsFollowByte((char)0xc0));
+	EATEST_VERIFY(!UTF8IsFollowByte((char)0xff));
+
+	// char* UTF8ReplaceInvalidChar(char* pIn, size_t nLength, char replaceWith);
 	{
-		char outBuffer[256] = {0};
-
 		{
-			auto* pBad  = u8"foofoobaazong";
-			auto* pGood = u8"foofoobaazong";
+			char8_t outBuffer[256] = {0};
+
+			auto* pBad  = EA_CHAR8("foofoobaazong");
+			auto* pGood = EA_CHAR8("foofoobaazong");
 
 			auto* pOut = UTF8ReplaceInvalidChar(pBad, UTF8Length(pBad), outBuffer, '?');
 
@@ -302,6 +302,8 @@ static int TestUTF8()
 		}
 
 		{
+			char outBuffer[256] = {0};
+
 			auto* pBad = "foofoo\xfa" "baazong";
 			auto* pGood = "foofoo?baazong";
 
@@ -313,6 +315,8 @@ static int TestUTF8()
 
 
 		{
+			char outBuffer[256] = {0};
+
 			auto* pBad = "foofoo\xfa\xfa\xfa\xfa\xfa" "baazong";
 			auto* pGood = "foofoo?????baazong";
 
@@ -323,6 +327,8 @@ static int TestUTF8()
 		}
 
 		{
+			char outBuffer[256] = {0};
+
 			auto* pBad = "foo\xfa" "foo\xfa\xfa" "b\xfa" "a\xfa" "a\xfa" "z\xfa" "o\xfa" "n\xfa" "g\xfa";
 			auto* pGood = "foo?foo??b?a?a?z?o?n?g?";
 
@@ -350,7 +356,7 @@ int TestTextUtil()
 
 	// WildcardMatch
 	{
-		// char8_t
+		// char
 		EATEST_VERIFY(WildcardMatch("abcde", "*e",     false) == true);
 		EATEST_VERIFY(WildcardMatch("abcde", "*f",     false) == false);
 		EATEST_VERIFY(WildcardMatch("abcde", "???de",  false) == true);
@@ -415,8 +421,8 @@ int TestTextUtil()
 	}
 
 
-	// EASTDC_API bool ParseDelimitedText(const char8_t* pText, const char8_t* pTextEnd, char8_t cDelimiter, 
-	//                                    const char8_t*& pToken, const char8_t*& pTokenEnd, const char8_t** ppNewText);
+	// EASTDC_API bool ParseDelimitedText(const char* pText, const char* pTextEnd, char cDelimiter, 
+	//                                    const char*& pToken, const char*& pTokenEnd, const char** ppNewText);
 	// EASTDC_API bool ParseDelimitedText(const char16_t* pText, const char16_t* pTextEnd, char16_t cDelimiter, 
 	//                                    const char16_t*& pToken, const char16_t*& pTokenEnd, const char16_t** ppNewText);
 	// EASTDC_API bool ParseDelimitedText(const char32_t* pText, const char32_t* pTextEnd, char32_t cDelimiter, 
@@ -503,7 +509,7 @@ int TestTextUtil()
 	// ConvertBinaryDataToASCIIArray / ConvertASCIIArrayToBinaryData
 	{
 		uint8_t  data[4] = { 0x12, 0x34, 0x56, 0x78 };
-		char8_t  result8[32];
+		char  result8[32];
 		char16_t result16[32];
 		char32_t result32[32];
 
@@ -547,20 +553,20 @@ int TestTextUtil()
 	}
 
 
-	// EASTDC_API const char8_t*  GetTextLine(const char8_t* pText, const char8_t* pTextEnd, const char8_t** ppNewText);
+	// EASTDC_API const char*  GetTextLine(const char* pText, const char* pTextEnd, const char** ppNewText);
 	{
-		const char8_t* p1 = "";
-		const char8_t* p2 = "\n";
-		const char8_t* p3 = "\r\n";
-		const char8_t* p4 = "\r\n\n";
-		const char8_t* p5 = "\n\r\r";
-		const char8_t* p6 = "aaa\nbbb\rccc\r\nddd";
-		const char8_t* p7 = "aaa\nddd\n";
-		const char8_t* p8 = "aaa\nddd\r\n";
-
-		const char8_t* pLine;
-		const char8_t* pLineEnd;
-		const char8_t* pLineNext;
+		const char* p1 = "";
+		const char* p2 = "\n";
+		const char* p3 = "\r\n";
+		const char* p4 = "\r\n\n";
+		const char* p5 = "\n\r\r";
+		const char* p6 = "aaa\nbbb\rccc\r\nddd";
+		const char* p7 = "aaa\nddd\n";
+		const char* p8 = "aaa\nddd\r\n";
+
+		const char* pLine;
+		const char* pLineEnd;
+		const char* pLineNext;
 
 		pLine = p1;
 		pLineEnd = GetTextLine(pLine, p1 + Strlen(p1), &pLineNext);
@@ -810,7 +816,7 @@ int TestTextUtil()
 
 
 
-	// EASTDC_API bool SplitTokenDelimited(const char8_t*  pSource, size_t nSourceLength, char8_t  cDelimiter, char8_t*  pToken, size_t nTokenLength, const char8_t**  ppNewSource = NULL);
+	// EASTDC_API bool SplitTokenDelimited(const char*  pSource, size_t nSourceLength, char  cDelimiter, char*  pToken, size_t nTokenLength, const char**  ppNewSource = NULL);
 	{
 		// To do
 	}
@@ -1109,7 +1115,7 @@ int TestTextUtil()
 	}
 
 
-	// EASTDC_API bool SplitTokenSeparated(const char8_t*  pSource, size_t nSourceLength, char8_t  cDelimiter, char8_t*  pToken, size_t nTokenLength, const char8_t**  ppNewSource = NULL);
+	// EASTDC_API bool SplitTokenSeparated(const char*  pSource, size_t nSourceLength, char  cDelimiter, char*  pToken, size_t nTokenLength, const char**  ppNewSource = NULL);
 	{
 		// To do
 	}

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно