]> mj.ucw.cz Git - libucw.git/blob - charset/mp-charconv.h
Fix: .h indentation and ifdef names; some comments; stk-conv enlarges
[libucw.git] / charset / mp-charconv.h
1 /*
2  *      Sherlock Library -- Character Conversion with Allocation on a Memory Pool 
3  *
4  *      (c) 2006 Pavel Charvat <pchar@ucw.cz>
5  */
6
7 #ifndef _CHARSET_MP_CHARCONV_H
8 #define _CHARSET_MP_CHARCONV_H
9
10 #include "lib/mempool.h"
11 #include "charset/charconv.h"
12
13 byte *mp_conv(struct mempool *mp, byte *s, uns cs_in, uns cs_out);
14
15 static inline byte *
16 mp_conv_to_utf8(struct mempool *mp, byte *s, uns cs_in) 
17 { return mp_conv(mp, s, cs_in, CONV_CHARSET_UTF8); }
18
19 static inline byte *
20 mp_conv_from_utf8(struct mempool *mp, byte *s, uns cs_out)
21 { return mp_conv(mp, s, CONV_CHARSET_UTF8, cs_out); }
22
23 #endif