X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=charset%2Funicat.h;h=78f99eb4bf9c6238e02e0a5e5f62bde1f87ad589;hb=a6368763d08042207963c941b1c52b5fafcb0cb3;hp=1ddfb8e62fd818e3be642f948bfa24f6f133fa61;hpb=0c4c92ea6a27b21551bd17a2a84a30e568cda660;p=libucw.git diff --git a/charset/unicat.h b/charset/unicat.h index 1ddfb8e6..78f99eb4 100644 --- a/charset/unicat.h +++ b/charset/unicat.h @@ -7,13 +7,21 @@ * of the GNU Lesser General Public License. */ -#ifndef _UNICAT_H -#define _UNICAT_H +#ifndef _CHARSET_UNICAT_H +#define _CHARSET_UNICAT_H + +#ifdef CONFIG_UCW_CLEAN_ABI +#define Uexpand_lig ucw_Uexpand_lig +#define _U_cat ucw__U_cat +#define _U_lower ucw__U_lower +#define _U_unaccent ucw__U_unaccent +#define _U_upper ucw__U_upper +#endif extern const byte *_U_cat[]; -extern const word *_U_upper[], *_U_lower[], *_U_unaccent[]; +extern const u16 *_U_upper[], *_U_lower[], *_U_unaccent[]; -static inline uns Ucategory(uns x) +static inline uint Ucategory(uint x) { if (_U_cat[x >> 8U]) return _U_cat[x >> 8U][x & 0xff]; @@ -21,25 +29,25 @@ static inline uns Ucategory(uns x) return 0; } -static inline uns Utoupper(uns x) +static inline uint Utoupper(uint x) { - word w = (_U_upper[x >> 8U]) ? _U_upper[x >> 8U][x & 0xff] : 0; + uint w = (_U_upper[x >> 8U]) ? _U_upper[x >> 8U][x & 0xff] : 0; return w ? w : x; } -static inline uns Utolower(uns x) +static inline uint Utolower(uint x) { - word w = (_U_lower[x >> 8U]) ? _U_lower[x >> 8U][x & 0xff] : 0; + uint w = (_U_lower[x >> 8U]) ? _U_lower[x >> 8U][x & 0xff] : 0; return w ? w : x; } -static inline uns Uunaccent(uns x) +static inline uint Uunaccent(uint x) { - word w = (_U_unaccent[x >> 8U]) ? _U_unaccent[x >> 8U][x & 0xff] : 0; + uint w = (_U_unaccent[x >> 8U]) ? _U_unaccent[x >> 8U][x & 0xff] : 0; return w ? w : x; } -extern const word *Uexpand_lig(uns x); +extern const u16 *Uexpand_lig(uint x); enum unicode_char_type { _U_LETTER = 1, /* Letters */