From 7d5f055547e70fa93ee9ac944e62f8d657b9dc55 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 19 Oct 2018 08:36:44 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Common/Array.hpp | 83 --------------------- src/libjin/Common/Exception.cpp | 0 src/libjin/Common/Exception.h | 0 src/libjin/Common/Object.cpp | 32 --------- src/libjin/Common/Object.h | 49 ------------- src/libjin/Common/Singleton.hpp | 37 ---------- src/libjin/Common/StringMap.hpp | 143 ------------------------------------- src/libjin/Common/Subsystem.hpp | 43 ----------- src/libjin/Common/common.h | 6 -- src/libjin/Common/je_array.hpp | 86 ++++++++++++++++++++++ src/libjin/Common/je_common.h | 6 ++ src/libjin/Common/je_exception.cpp | 0 src/libjin/Common/je_exception.h | 0 src/libjin/Common/je_object.cpp | 32 +++++++++ src/libjin/Common/je_object.h | 49 +++++++++++++ src/libjin/Common/je_singleton.hpp | 37 ++++++++++ src/libjin/Common/je_stringmap.hpp | 143 +++++++++++++++++++++++++++++++++++++ src/libjin/Common/je_subsystem.hpp | 44 ++++++++++++ src/libjin/Common/je_types.h | 23 ++++++ src/libjin/Common/je_utf8.cpp | 42 +++++++++++ src/libjin/Common/je_utf8.h | 31 ++++++++ src/libjin/Common/types.h | 23 ------ src/libjin/Common/utf8.cpp | 42 ----------- src/libjin/Common/utf8.h | 31 -------- 24 files changed, 493 insertions(+), 489 deletions(-) delete mode 100644 src/libjin/Common/Array.hpp delete mode 100644 src/libjin/Common/Exception.cpp delete mode 100644 src/libjin/Common/Exception.h delete mode 100644 src/libjin/Common/Object.cpp delete mode 100644 src/libjin/Common/Object.h delete mode 100644 src/libjin/Common/Singleton.hpp delete mode 100644 src/libjin/Common/StringMap.hpp delete mode 100644 src/libjin/Common/Subsystem.hpp delete mode 100644 src/libjin/Common/common.h create mode 100644 src/libjin/Common/je_array.hpp create mode 100644 src/libjin/Common/je_common.h create mode 100644 src/libjin/Common/je_exception.cpp create mode 100644 src/libjin/Common/je_exception.h create mode 100644 src/libjin/Common/je_object.cpp create mode 100644 src/libjin/Common/je_object.h create mode 100644 src/libjin/Common/je_singleton.hpp create mode 100644 src/libjin/Common/je_stringmap.hpp create mode 100644 src/libjin/Common/je_subsystem.hpp create mode 100644 src/libjin/Common/je_types.h create mode 100644 src/libjin/Common/je_utf8.cpp create mode 100644 src/libjin/Common/je_utf8.h delete mode 100644 src/libjin/Common/types.h delete mode 100644 src/libjin/Common/utf8.cpp delete mode 100644 src/libjin/Common/utf8.h (limited to 'src/libjin/Common') diff --git a/src/libjin/Common/Array.hpp b/src/libjin/Common/Array.hpp deleted file mode 100644 index 45082db..0000000 --- a/src/libjin/Common/Array.hpp +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef __LIBJIN_COMMON_ARRAY_H -#define __LIBJIN_COMMON_ARRAY_H - -namespace jin -{ - - /* 自动释放堆内存的在栈上创建的动态数组 */ - template - class Array - { - public: - Array() : length(0), data(nullptr) {} - - Array(int l) - { - length = l; - data = new T[l]; - } - - ~Array() - { - delete[] data; - length = 0; - } - - T* operator &() - { - return data; - } - - T& operator[](int index) - { - return data[index]; - } - - /* 绑定内存 */ - void bind(T* d, int len) - { - if (data != nullptr) - delete data; - data = d; - length = len; - } - - void add(T v) - { - int len = length + 1; - T* d = new T[len]; - memcpy(d, data, size()); - d[length] = v; - bind(d, len); - } - - int size() - { - return sizeof(T) * length; - } - - int count() - { - return length; - } - - private: - /** - * http://blog.jobbole.com/106923/ - * new 堆内存创建对象过程 - * 1. 调用 new 分配内存 - * 2. 调用构造函数 - * - * new, delete方法用于分配和释放内存,不负责构造和析构 - */ - void* operator new(size_t t); - void operator delete(void* ptr); - - T * data; - unsigned int length; - - }; - -} - -#endif \ No newline at end of file diff --git a/src/libjin/Common/Exception.cpp b/src/libjin/Common/Exception.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/src/libjin/Common/Exception.h b/src/libjin/Common/Exception.h deleted file mode 100644 index e69de29..0000000 diff --git a/src/libjin/Common/Object.cpp b/src/libjin/Common/Object.cpp deleted file mode 100644 index 6c3b667..0000000 --- a/src/libjin/Common/Object.cpp +++ /dev/null @@ -1,32 +0,0 @@ -// LOVE -#include "Object.h" - -namespace jin -{ - - Object::Object() - : count(1) - { - } - - Object::~Object() - { - } - - int Object::getReferenceCount() const - { - return count; - } - - void Object::retain() - { - ++count; - } - - void Object::release() - { - if (--count <= 0) - delete this; - } - -} // love diff --git a/src/libjin/Common/Object.h b/src/libjin/Common/Object.h deleted file mode 100644 index c4bf225..0000000 --- a/src/libjin/Common/Object.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __LIBJIN_COMMON_OBJECT_H -#define __LIBJIN_COMMON_OBJECT_H - -namespace jin -{ - - class Object - { - private: - - // The reference count. - int count; - - public: - - /** - * Constructor. Sets reference count to one. - **/ - Object(); - - /** - * Destructor. - **/ - virtual ~Object() = 0; - - /** - * Gets the reference count of this Object. - * @returns The reference count. - **/ - int getReferenceCount() const; - - /** - * Retains the Object, i.e. increases the - * reference count by one. - **/ - void retain(); - - /** - * Releases one reference to the Object, i.e. decrements the - * reference count by one, and potentially deletes the Object - * if there are no more references. - **/ - void release(); - - }; // Object - -} // namespace jin - -#endif \ No newline at end of file diff --git a/src/libjin/Common/Singleton.hpp b/src/libjin/Common/Singleton.hpp deleted file mode 100644 index 12b1450..0000000 --- a/src/libjin/Common/Singleton.hpp +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef __LIBJIN_SINGLETON_H -#define __LIBJIN_SINGLETON_H - -namespace jin -{ - - template - class Singleton - { - public: - static T* get() - { - if (_instance == nullptr) - _instance = new T; - return _instance; - } - static void destroy() - { - delete _instance; - _instance = nullptr; - } - protected: - Singleton() {}; - virtual ~Singleton() {}; - static T* _instance; - private: - Singleton(const Singleton&); - Singleton& operator = (const Singleton&); - }; - - template T* Singleton::_instance = nullptr; - -#define singleton(T) friend Singleton - -} // namespace jin - -#endif // __LIBJIN_SINGLETON_H \ No newline at end of file diff --git a/src/libjin/Common/StringMap.hpp b/src/libjin/Common/StringMap.hpp deleted file mode 100644 index 641e32d..0000000 --- a/src/libjin/Common/StringMap.hpp +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef __LIBJIN_COMMON_SREINGMAP_H -#define __LIBJIN_COMMON_SREINGMAP_H - -namespace jin -{ - - template - class StringMap - { - private: - - struct Record - { - const char * key; - T value; - bool set; - Record() : set(false) {} - }; - - const static unsigned MAX = SIZE * 2; - - Record records[MAX]; - const char * reverse[SIZE]; - - public: - - struct Entry - { - const char * key; - T value; - }; - - StringMap(Entry * entries, unsigned num) - { - - for (unsigned i = 0; i < SIZE; ++i) - reverse[i] = 0; - - unsigned n = num / sizeof(Entry); - - for (unsigned i = 0; i < n; ++i) - { - add(entries[i].key, entries[i].value); - } - } - - bool streq(const char * a, const char * b) - { - while (*a != 0 && *b != 0) - { - if (*a != *b) - return false; - ++a; - ++b; - } - - return (*a == 0 && *b == 0); - } - - bool find(const char * key, T & t) - { - //unsigned str_hash = djb2(key); - - for (unsigned i = 0; i < MAX; ++i) - { - //unsigned str_i = (str_hash + i) % MAX; //this isn't used, is this intentional? - - if (records[i].set && streq(records[i].key, key)) - { - t = records[i].value; - return true; - } - } - - return false; - } - - bool find(T key, const char *& str) - { - unsigned index = (unsigned)key; - - if (index >= SIZE) - return false; - - if (reverse[index] != 0) - { - str = reverse[index]; - return true; - } - else - { - return false; - } - } - - bool add(const char * key, T value) - { - unsigned str_hash = djb2(key); - bool inserted = false; - - for (unsigned i = 0; i < MAX; ++i) - { - unsigned str_i = (str_hash + i) % MAX; - - if (!records[str_i].set) - { - inserted = true; - records[str_i].set = true; - records[str_i].key = key; - records[str_i].value = value; - break; - } - } - - unsigned index = (unsigned)value; - - if (index >= SIZE) - { - printf("\nConstant %s out of bounds with %i!\n", key, index); - return false; - } - - reverse[index] = key; - - return inserted; - } - - unsigned djb2(const char * key) - { - unsigned hash = 5381; - int c; - - while ((c = *key++)) - hash = ((hash << 5) + hash) + c; - - return hash; - } - - }; // StringMap - -} // namespace jin - -#endif \ No newline at end of file diff --git a/src/libjin/Common/Subsystem.hpp b/src/libjin/Common/Subsystem.hpp deleted file mode 100644 index 293b88d..0000000 --- a/src/libjin/Common/Subsystem.hpp +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __LIBJIN_COMMON_SUBSYSTEM_H -#define __LIBJIN_COMMON_SUBSYSTEM_H - -#include "singleton.hpp" -#include "../utils/macros.h" - -namespace jin -{ - - template - class Subsystem : public Singleton - { - public: - struct Setting {}; - typedef Setting SettingBase; - - bool init(const SettingBase* setting = nullptr) - { - static bool success = initSystem(setting); - return success; - } - - void quit() - { - /*call only once*/ - static char __dummy__ = (quitSystem(), 1); - Singleton::destroy(); - } - - protected: - singleton(System); - - Subsystem() {}; - virtual ~Subsystem() {}; - - /*onlyonce*/ virtual bool initSystem(const Setting* setting) = 0; - /*onlyonce*/ virtual void quitSystem() = 0; - - }; - -} // namespace jin - -#endif \ No newline at end of file diff --git a/src/libjin/Common/common.h b/src/libjin/Common/common.h deleted file mode 100644 index 9586c82..0000000 --- a/src/libjin/Common/common.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __LIBJIN_COMMON_H -#define __LIBJIN_COMMON_H - -#include "Array.hpp" - -#endif \ No newline at end of file diff --git a/src/libjin/Common/je_array.hpp b/src/libjin/Common/je_array.hpp new file mode 100644 index 0000000..eadd36f --- /dev/null +++ b/src/libjin/Common/je_array.hpp @@ -0,0 +1,86 @@ +#ifndef __LIBJIN_COMMON_ARRAY_H +#define __LIBJIN_COMMON_ARRAY_H + +namespace jin +{ + /* 自动释放堆内存的在栈上创建的动态数组 */ + template + class Array + { + public: + Array() : length(0), data(nullptr) {} + + Array(int l) + { + length = l; + data = new T[l]; + } + + ~Array() + { + delete[] data; + length = 0; + } + + T* operator &() + { + return data; + } + + T& operator[](int index) + { + return data[index]; + } + + /* 绑定内存 */ + void bind(T* d, int len) + { + if (data != nullptr) + delete data; + data = d; + length = len; + } + + void add(T v) + { + int len = length + 1; + T* d = new T[len]; + memcpy(d, data, size()); + d[length] = v; + bind(d, len); + } + + int size() + { + return sizeof(T) * length; + } + + int count() + { + return length; + } + + private: + /// + /// http://blog.jobbole.com/106923/ + /// new 堆内存创建对象过程 + /// 1. 调用 new 分配内存 + /// 2. 调用构造函数 + /// + /// new, delete方法用于分配和释放内存,不负责构造和析构 + /// + void* operator new(size_t t); + + /// + /// Disable delete. + /// + void operator delete(void* ptr); + + T * data; + unsigned int length; + + }; + +} // namespace jin + +#endif \ No newline at end of file diff --git a/src/libjin/Common/je_common.h b/src/libjin/Common/je_common.h new file mode 100644 index 0000000..63528b0 --- /dev/null +++ b/src/libjin/Common/je_common.h @@ -0,0 +1,6 @@ +#ifndef __LIBJIN_COMMON_H +#define __LIBJIN_COMMON_H + +#include "je_array.hpp" + +#endif \ No newline at end of file diff --git a/src/libjin/Common/je_exception.cpp b/src/libjin/Common/je_exception.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/libjin/Common/je_exception.h b/src/libjin/Common/je_exception.h new file mode 100644 index 0000000..e69de29 diff --git a/src/libjin/Common/je_object.cpp b/src/libjin/Common/je_object.cpp new file mode 100644 index 0000000..e3b4ca5 --- /dev/null +++ b/src/libjin/Common/je_object.cpp @@ -0,0 +1,32 @@ +// LOVE +#include "je_object.h" + +namespace jin +{ + + Object::Object() + : count(1) + { + } + + Object::~Object() + { + } + + int Object::getReferenceCount() const + { + return count; + } + + void Object::retain() + { + ++count; + } + + void Object::release() + { + if (--count <= 0) + delete this; + } + +} // love diff --git a/src/libjin/Common/je_object.h b/src/libjin/Common/je_object.h new file mode 100644 index 0000000..c4bf225 --- /dev/null +++ b/src/libjin/Common/je_object.h @@ -0,0 +1,49 @@ +#ifndef __LIBJIN_COMMON_OBJECT_H +#define __LIBJIN_COMMON_OBJECT_H + +namespace jin +{ + + class Object + { + private: + + // The reference count. + int count; + + public: + + /** + * Constructor. Sets reference count to one. + **/ + Object(); + + /** + * Destructor. + **/ + virtual ~Object() = 0; + + /** + * Gets the reference count of this Object. + * @returns The reference count. + **/ + int getReferenceCount() const; + + /** + * Retains the Object, i.e. increases the + * reference count by one. + **/ + void retain(); + + /** + * Releases one reference to the Object, i.e. decrements the + * reference count by one, and potentially deletes the Object + * if there are no more references. + **/ + void release(); + + }; // Object + +} // namespace jin + +#endif \ No newline at end of file diff --git a/src/libjin/Common/je_singleton.hpp b/src/libjin/Common/je_singleton.hpp new file mode 100644 index 0000000..12b1450 --- /dev/null +++ b/src/libjin/Common/je_singleton.hpp @@ -0,0 +1,37 @@ +#ifndef __LIBJIN_SINGLETON_H +#define __LIBJIN_SINGLETON_H + +namespace jin +{ + + template + class Singleton + { + public: + static T* get() + { + if (_instance == nullptr) + _instance = new T; + return _instance; + } + static void destroy() + { + delete _instance; + _instance = nullptr; + } + protected: + Singleton() {}; + virtual ~Singleton() {}; + static T* _instance; + private: + Singleton(const Singleton&); + Singleton& operator = (const Singleton&); + }; + + template T* Singleton::_instance = nullptr; + +#define singleton(T) friend Singleton + +} // namespace jin + +#endif // __LIBJIN_SINGLETON_H \ No newline at end of file diff --git a/src/libjin/Common/je_stringmap.hpp b/src/libjin/Common/je_stringmap.hpp new file mode 100644 index 0000000..641e32d --- /dev/null +++ b/src/libjin/Common/je_stringmap.hpp @@ -0,0 +1,143 @@ +#ifndef __LIBJIN_COMMON_SREINGMAP_H +#define __LIBJIN_COMMON_SREINGMAP_H + +namespace jin +{ + + template + class StringMap + { + private: + + struct Record + { + const char * key; + T value; + bool set; + Record() : set(false) {} + }; + + const static unsigned MAX = SIZE * 2; + + Record records[MAX]; + const char * reverse[SIZE]; + + public: + + struct Entry + { + const char * key; + T value; + }; + + StringMap(Entry * entries, unsigned num) + { + + for (unsigned i = 0; i < SIZE; ++i) + reverse[i] = 0; + + unsigned n = num / sizeof(Entry); + + for (unsigned i = 0; i < n; ++i) + { + add(entries[i].key, entries[i].value); + } + } + + bool streq(const char * a, const char * b) + { + while (*a != 0 && *b != 0) + { + if (*a != *b) + return false; + ++a; + ++b; + } + + return (*a == 0 && *b == 0); + } + + bool find(const char * key, T & t) + { + //unsigned str_hash = djb2(key); + + for (unsigned i = 0; i < MAX; ++i) + { + //unsigned str_i = (str_hash + i) % MAX; //this isn't used, is this intentional? + + if (records[i].set && streq(records[i].key, key)) + { + t = records[i].value; + return true; + } + } + + return false; + } + + bool find(T key, const char *& str) + { + unsigned index = (unsigned)key; + + if (index >= SIZE) + return false; + + if (reverse[index] != 0) + { + str = reverse[index]; + return true; + } + else + { + return false; + } + } + + bool add(const char * key, T value) + { + unsigned str_hash = djb2(key); + bool inserted = false; + + for (unsigned i = 0; i < MAX; ++i) + { + unsigned str_i = (str_hash + i) % MAX; + + if (!records[str_i].set) + { + inserted = true; + records[str_i].set = true; + records[str_i].key = key; + records[str_i].value = value; + break; + } + } + + unsigned index = (unsigned)value; + + if (index >= SIZE) + { + printf("\nConstant %s out of bounds with %i!\n", key, index); + return false; + } + + reverse[index] = key; + + return inserted; + } + + unsigned djb2(const char * key) + { + unsigned hash = 5381; + int c; + + while ((c = *key++)) + hash = ((hash << 5) + hash) + c; + + return hash; + } + + }; // StringMap + +} // namespace jin + +#endif \ No newline at end of file diff --git a/src/libjin/Common/je_subsystem.hpp b/src/libjin/Common/je_subsystem.hpp new file mode 100644 index 0000000..2875058 --- /dev/null +++ b/src/libjin/Common/je_subsystem.hpp @@ -0,0 +1,44 @@ +#ifndef __LIBJIN_COMMON_SUBSYSTEM_H +#define __LIBJIN_COMMON_SUBSYSTEM_H + +#include "../utils/je_macros.h" + +#include "je_singleton.hpp" + +namespace jin +{ + + template + class Subsystem : public Singleton + { + public: + struct Setting {}; + typedef Setting SettingBase; + + bool init(const SettingBase* setting = nullptr) + { + static bool success = initSystem(setting); + return success; + } + + void quit() + { + /*call only once*/ + static char __dummy__ = (quitSystem(), 1); + Singleton::destroy(); + } + + protected: + singleton(System); + + Subsystem() {}; + virtual ~Subsystem() {}; + + /*onlyonce*/ virtual bool initSystem(const Setting* setting) = 0; + /*onlyonce*/ virtual void quitSystem() = 0; + + }; + +} // namespace jin + +#endif \ No newline at end of file diff --git a/src/libjin/Common/je_types.h b/src/libjin/Common/je_types.h new file mode 100644 index 0000000..2d257c3 --- /dev/null +++ b/src/libjin/Common/je_types.h @@ -0,0 +1,23 @@ +#ifndef __LIBJIN_TYPES_H +#define __LIBJIN_TYPES_H +#include + +namespace jin +{ + namespace common + { + + typedef int8_t int8; + typedef uint8_t uint8; + typedef uint8 byte; + typedef int16_t int16; + typedef uint16_t uint16; + typedef int32_t int32; + typedef uint32_t uint32; + typedef int64_t int64; + typedef uint64_t uint64; + + } +} + +#endif \ No newline at end of file diff --git a/src/libjin/Common/je_utf8.cpp b/src/libjin/Common/je_utf8.cpp new file mode 100644 index 0000000..de539c7 --- /dev/null +++ b/src/libjin/Common/je_utf8.cpp @@ -0,0 +1,42 @@ +#include "../core/je_configuration.h" +#if LIBJIN_OS == LIBJIN_WINDOWS + +#include "je_utf8.h" + +namespace jin +{ + + std::string to_utf8(LPCWSTR wstr) + { + size_t wide_len = wcslen(wstr) + 1; + + // Get size in UTF-8. + int utf8_size = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, 0, 0, 0, 0); + + char * utf8_str = new char[utf8_size]; + + // Convert to UTF-8. + int ok = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, utf8_str, utf8_size, 0, 0); + + if (!ok) + { + delete[] utf8_str; + } + + return ok ? std::string(utf8_str) : std::string(); + } + + void replace_char(std::string & str, char find, char replace) + { + int length = str.length(); + + for (int i = 0; i +#include + +namespace jin +{ + + /** + * Convert the wide string to a UTF-8 encoded string. + * @param wstr The wide-char string. + * @return A UTF-8 string. + **/ + std::string to_utf8(LPCWSTR wstr); + + /** + * Replace all occurences of 'find' with 'replace' in a string. + * @param str The string to modify. + * @param find The character to match. + * @param replace The character to replace matches. + **/ + void replace_char(std::string & str, char find, char replace); + +} // namespace jin + +#endif // LIBJIN_OS == LIBJIN_WINDOWS +#endif // __LIBJIN_COMMON_UTF8_H diff --git a/src/libjin/Common/types.h b/src/libjin/Common/types.h deleted file mode 100644 index 2d257c3..0000000 --- a/src/libjin/Common/types.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __LIBJIN_TYPES_H -#define __LIBJIN_TYPES_H -#include - -namespace jin -{ - namespace common - { - - typedef int8_t int8; - typedef uint8_t uint8; - typedef uint8 byte; - typedef int16_t int16; - typedef uint16_t uint16; - typedef int32_t int32; - typedef uint32_t uint32; - typedef int64_t int64; - typedef uint64_t uint64; - - } -} - -#endif \ No newline at end of file diff --git a/src/libjin/Common/utf8.cpp b/src/libjin/Common/utf8.cpp deleted file mode 100644 index b912a51..0000000 --- a/src/libjin/Common/utf8.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "../configuration.h" -#if LIBJIN_OS == LIBJIN_WINDOWS - -#include "utf8.h" - -namespace jin -{ - - std::string to_utf8(LPCWSTR wstr) - { - size_t wide_len = wcslen(wstr) + 1; - - // Get size in UTF-8. - int utf8_size = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, 0, 0, 0, 0); - - char * utf8_str = new char[utf8_size]; - - // Convert to UTF-8. - int ok = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, utf8_str, utf8_size, 0, 0); - - if (!ok) - { - delete[] utf8_str; - } - - return ok ? std::string(utf8_str) : std::string(); - } - - void replace_char(std::string & str, char find, char replace) - { - int length = str.length(); - - for (int i = 0; i -#include - -namespace jin -{ - - /** - * Convert the wide string to a UTF-8 encoded string. - * @param wstr The wide-char string. - * @return A UTF-8 string. - **/ - std::string to_utf8(LPCWSTR wstr); - - /** - * Replace all occurences of 'find' with 'replace' in a string. - * @param str The string to modify. - * @param find The character to match. - * @param replace The character to replace matches. - **/ - void replace_char(std::string & str, char find, char replace); - -} // namespace jin - -#endif // LIBJIN_OS == LIBJIN_WINDOWS -#endif // __LIBJIN_COMMON_UTF8_H -- cgit v1.1-26-g67d0