X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=charset%2Fmp-charconv.c;h=607e91ab17f1968df6997e41a9aa2a6b499b334b;hb=94e34eacc4086c13f68580e153d727739c17cf9c;hp=6976212be5928bad1f48a5a4209df6f9aafd0f48;hpb=ee58c363f2df512f649ac2837ee06c3cdbc75a03;p=libucw.git diff --git a/charset/mp-charconv.c b/charset/mp-charconv.c index 6976212b..607e91ab 100644 --- a/charset/mp-charconv.c +++ b/charset/mp-charconv.c @@ -1,5 +1,5 @@ /* - * Sherlock Library -- Character Conversion with Allocation on a Memory Pool + * Sherlock Library -- Character Conversion with Allocation on a Memory Pool * * (c) 2006 Pavel Charvat * @@ -7,23 +7,22 @@ * of the GNU Lesser General Public License. */ -#include "lib/lib.h" -#include "lib/mempool.h" -#include "charset/mp-charconv.h" +#include +#include #include #include byte * -mp_conv(struct mempool *mp, byte *s, uns in_cs, uns out_cs) +mp_strconv(struct mempool *mp, const byte *s, uns in_cs, uns out_cs) { if (in_cs == out_cs) return mp_strdup(mp, s); - + struct conv_context c; char *b[32]; uns bs[32], n = 0, sum = 0; uns l = strlen(s) + 1; - + conv_init(&c); conv_set_charset(&c, in_cs, out_cs); c.source = s;