diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2010-01-08 09:17:57 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2010-01-08 09:17:57 +0800 |
commit | c3ceab0a38283f77f75f0e7ebda80fc097282858 (patch) | |
tree | 3f7c41823bdeb6c1f78346ac9392a360f49ff91d | |
parent | 38073de086b87c0589728b66cd12d2184c98a2e4 (diff) |
uniconv: change argments of uniconv_open to match iconv_open
-rw-r--r-- | uconv.c | 2 | ||||
-rw-r--r-- | uniconv.c | 4 | ||||
-rw-r--r-- | uniconv.h | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -20,7 +20,7 @@ int main(int argc, char **argv) from = argv[1]; to = argv[2]; - conv = uniconv_open(from, to); + conv = uniconv_open(to, from); if (!conv) { fprintf (stderr, "Converting from %s to %s is unsupported.\n", @@ -42,7 +42,7 @@ uniconv_canonical_charset(const char *charset, } uniconv_t* -uniconv_open(const char *from, const char *to) +uniconv_open(const char *to, const char *from) { char frombuf[64]; char tobuf[64]; @@ -112,7 +112,7 @@ uniconv_conv(uniconv_t *uc, /* converting/pushing input data */ if (inbuf) { - if (inleft < UNICONV_MAX_LOCAL) + if (*inleft < UNICONV_MAX_LOCAL) ucs4 = local_ucs4; else ucs4 = malloc(sizeof(uc_char_t) * (*inleft)); @@ -28,7 +28,7 @@ extern "C" { * @return a conversion descriptor, %NULL in case of error. */ uniconv_t* - uniconv_open(const char *from, const char *to); + uniconv_open(const char *to, const char *from); /** * peform charset converting |