/* This software is licensed by the MIT License, see LICENSE file */ /* Copyright © 2022 Gregory Lirent */ #include #include "include.h" #ifdef RARE_CASE_SWITCHING_DISABLE #define GREEK_EXTENDED_DISABLE // [ 0x1f00-0x1fff ] #define CHEROKEE_DISABLE // [ 0x13a0-0x13ff ], [ 0xab70-0xabbf ] #define CYRILLIC_SUPLEMENT_DISABLE // [ 0x0500-0x052f ] #define CYRILLIC_EXTENDED_C_DISABLE // [ 0x1c80-0x1c8f ] #define CYRILLIC_EXTENDED_B_DISABLE // [ 0xa640-0xa69f ] #define LATIN_EXTENDED_B_DISABLE // [ 0x0180-0x024f ] #define LATIN_EXTENDED_C_DISABLE // [ 0x2c60-0x2c7f ] #define LATIN_EXTENDED_D_DISABLE // [ 0xa720-0xa7ff ] #define LATIN_EXTENDED_E_DISABLE // [ 0xab30-0xab6f ] #define LATIN_EXTENDED_ADDITIONAL_DISABLE // [ 0x1e00-0x1eff ] #define IPA_EXTENSIONS_DISABLE // [ 0x0250-0x02af ] #define OLD_AND_RELIGION_SPECIFIC_CASE_SWITCHING_DISABLE #define SYNTHETIC_CASE_SWITCHING_DISABLE #endif #ifdef SYNTHETIC_CASE_SWITCHING_DISABLE #define PHONETIC_EXTENSIONS_DISABLE // [ 0x1d00-0x1d7f ] #define DESERET_DISABLE // [ 0x010400-0x01044f ] #define WARANG_CITI_DISABLE // [ 0x0118a0-0x0118ff ] #endif #ifdef OLD_AND_RELIGION_SPECIFIC_CASE_SWITCHING_DISABLE #define GLAGOLITIC_DISABLE // [ 0x2c00-0x2c5f ] #define COPTIC_DISABLE // [ 0x2c80-0x2cff ] #define GEORGIAN_SUPPLEMENT_DISABLE // [ 0x2d00-0x2d2f ] #define OSAGE_DISABLE // [ 0x0104b0-0x0104ff ] #define OLD_HUNGARIAN_DISABLE // [ 0x010c80-0x010cff ] #endif #ifdef SYNTHETIC_CASE_SWITCHING_ENABLE #define PHONETIC_EXTENSIONS_ENABLE #define DESERET_ENABLE #define WARANG_CITI_ENABLE #endif #ifdef OLD_AND_RELIGION_SPECIFIC_CASE_SWITCHING_ENABLE #define GLAGOLITIC_ENABLE #define COPTIC_ENABLE #define GEORGIAN_SUPPLEMENT_ENABLE #define OLD_HUNGARIAN_DISABLE #endif #if defined(GREEK_EXTENDED_ENABLE) && defined(GREEK_EXTENDED_DISABLE) #undef GREEK_EXTENDED_DISABLE #endif #if defined(CHEROKEE_ENABLE) && defined(CHEROKEE_DISABLE) #undef CHEROKEE_DISABLE #endif #if defined(CYRILLIC_SUPLEMENT_ENABLE) && defined(CYRILLIC_SUPLEMENT_DISABLE) #undef CYRILLIC_SUPLEMENT_DISABLE #endif #if defined(CYRILLIC_EXTENDED_C_ENABLE) && defined(CYRILLIC_EXTENDED_C_DISABLE) #undef CYRILLIC_EXTENDED_C_DISABLE #endif #if defined(CYRILLIC_EXTENDED_B_ENABLE) && defined(CYRILLIC_EXTENDED_B_DISABLE) #undef CYRILLIC_EXTENDED_B_DISABLE #endif #if defined(LATIN_EXTENDED_B_ENABLE) && defined(LATIN_EXTENDED_B_DISABLE) #undef LATIN_EXTENDED_B_DISABLE #endif #if defined(LATIN_EXTENDED_C_ENABLE) && defined(LATIN_EXTENDED_C_DISABLE) #undef LATIN_EXTENDED_C_DISABLE #endif #if defined(LATIN_EXTENDED_D_ENABLE) && defined(LATIN_EXTENDED_D_DISABLE) #undef LATIN_EXTENDED_D_DISABLE #endif #if defined(LATIN_EXTENDED_E_ENABLE) && defined(LATIN_EXTENDED_E_DISABLE) #undef LATIN_EXTENDED_E_DISABLE #endif #if defined(LATIN_EXTENDED_ADDITIONAL_ENABLE) && defined(LATIN_EXTENDED_ADDITIONAL_DISABLE) #undef LATIN_EXTENDED_ADDITIONAL_DISABLE #endif #if defined(IPA_EXTENSIONS_ENABLE) && defined(IPA_EXTENSIONS_DISABLE) #undef IPA_EXTENSIONS_DISABLE #endif #if defined(PHONETIC_EXTENSIONS_ENABLE) && defined(PHONETIC_EXTENSIONS_DISABLE) #undef PHONETIC_EXTENSIONS_DISABLE #endif #if defined(DESERET_ENABLE) && defined(DESERET_DISABLE) #undef DESERET_DISABLE #endif #if defined(WARANG_CITI_ENABLE) && defined(WARANG_CITI_DISABLE) #undef WARANG_CITI_DISABLE #endif #if defined(GLAGOLITIC_ENABLE) && defined(GLAGOLITIC_DISABLE) #undef GLAGOLITIC_DISABLE #endif #if defined(COPTIC_ENABLE) && defined(COPTIC_DISABLE) #undef COPTIC_DISABLE #endif #if defined(GEORGIAN_SUPPLEMENT_ENABLE) && defined(GEORGIAN_SUPPLEMENT_DISABLE) #undef GEORGIAN_SUPPLEMENT_DISABLE #endif #if defined(OLD_HUNGARIAN_ENABLE) && defined(OLD_HUNGARIAN_DISABLE) #undef OLD_HUNGARIAN_DISABLE #endif #define IS_LITTLE_ENDIAN (*((unsigned int*)"\0\0\0\1") > (unsigned int)0xffff)