X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=charset%2Fmp-charconv.h;h=5401d4f308955cd8326f057184e4a9571f910b71;hb=6912c77a66798de162fe31f79581cd7b5c97f12c;hp=f3d7bd232016375eaf93c1059fde0a4a1b788e26;hpb=32ffcf1473c7bbba040a4f067e272fd9e5e85274;p=libucw.git diff --git a/charset/mp-charconv.h b/charset/mp-charconv.h index f3d7bd23..5401d4f3 100644 --- a/charset/mp-charconv.h +++ b/charset/mp-charconv.h @@ -1,23 +1,28 @@ /* - * Sherlock Library -- Character Conversion with Allocation on a Memory Pool + * Sherlock Library -- Character Conversion with Allocation on a Memory Pool * * (c) 2006 Pavel Charvat + * + * This software may be freely distributed and used according to the terms + * of the GNU Lesser General Public License. */ #ifndef _CHARSET_MP_CHARCONV_H #define _CHARSET_MP_CHARCONV_H -#include "lib/mempool.h" -#include "charset/charconv.h" +#include +#include + +#ifdef CONFIG_UCW_CLEAN_ABI +#define mp_strconv ucw_mp_strconv +#endif -byte *mp_conv(struct mempool *mp, byte *s, uns cs_in, uns cs_out); +byte *mp_strconv(struct mempool *mp, const byte *s, uint cs_in, uint cs_out); -static inline byte * -mp_conv_to_utf8(struct mempool *mp, byte *s, uns cs_in) -{ return mp_conv(mp, s, cs_in, CONV_CHARSET_UTF8); } +static inline byte *mp_strconv_to_utf8(struct mempool *mp, const byte *s, uint cs_in) +{ return mp_strconv(mp, s, cs_in, CONV_CHARSET_UTF8); } -static inline byte * -mp_conv_from_utf8(struct mempool *mp, byte *s, uns cs_out) -{ return mp_conv(mp, s, CONV_CHARSET_UTF8, cs_out); } +static inline byte *mp_strconv_from_utf8(struct mempool *mp, const byte *s, uint cs_out) +{ return mp_strconv(mp, s, CONV_CHARSET_UTF8, cs_out); } #endif