From 18af050c0507105544f5a83cd529a8b7a4264bdd Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 26 Apr 2001 18:21:32 +0000 Subject: Remove UNICODE_CFLAGS (and some other stuff that's redundant with * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other stuff that's redundant with EXTRA_GNOME_CFLAGS) (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS. * camel-search-private.c: * camel-pgp-context.c: * camel-mime-utils.c: Use gunicode interfaces rather than libunicode. * camel-charset-map.c: Use gunicode rather than libunicode. (The charmap-regen code still depends on libunicode though.) * camel-mime-filter-charset.h: * tests/message/test2.c (convert): Use iconv rather than unicode_iconv. * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD): * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD): * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove UNICODE_LIBS. * camel.c (camel_init): Remove call to unicode_init. * camel-mime-parser.c: Remove unused unicode.h include. svn path=/trunk/; revision=9585 --- camel/tests/message/test2.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'camel/tests') diff --git a/camel/tests/message/test2.c b/camel/tests/message/test2.c index abeafa9524..95b0e324aa 100644 --- a/camel/tests/message/test2.c +++ b/camel/tests/message/test2.c @@ -7,8 +7,7 @@ #include #include #include - -#include +#include #include #include @@ -17,12 +16,12 @@ static char *convert(const char *in, const char *from, const char *to) { - unicode_iconv_t ic = unicode_iconv_open(to, from); + iconv_t ic = iconv_open(to, from); char *out, *outp; const char *inp; int inlen, outlen; - if (ic == (unicode_iconv_t)-1) + if (ic == (iconv_t)-1) return g_strdup(in); inlen = strlen(in); @@ -31,19 +30,19 @@ static char *convert(const char *in, const char *from, const char *to) outp = out = g_malloc(outlen); inp = in; - if (unicode_iconv(ic, &inp, &inlen, &outp, &outlen) == -1) { + if (iconv(ic, &inp, &inlen, &outp, &outlen) == -1) { test_free(out); - unicode_iconv_close(ic); + iconv_close(ic); return g_strdup(in); } - if (unicode_iconv(ic, NULL, 0, &outp, &outlen) == -1) { + if (iconv(ic, NULL, 0, &outp, &outlen) == -1) { test_free(out); - unicode_iconv_close(ic); + iconv_close(ic); return g_strdup(in); } - unicode_iconv_close(ic); + iconv_close(ic); *outp = 0; @@ -51,17 +50,17 @@ static char *convert(const char *in, const char *from, const char *to) /* lets see if we can convert back again? */ { char *nout, *noutp; - unicode_iconv_t ic = unicode_iconv_open(from, to); + iconv_t ic = iconv_open(from, to); inp = out; inlen = strlen(out); outlen = inlen*5 + 16; noutp = nout = g_malloc(outlen); - if (unicode_iconv(ic, &inp, &inlen, &noutp, &outlen) == -1 - || unicode_iconv(ic, NULL, 0, &noutp, &outlen) == -1) { + if (iconv(ic, &inp, &inlen, &noutp, &outlen) == -1 + || iconv(ic, NULL, 0, &noutp, &outlen) == -1) { g_warning("Cannot convert '%s' \n from %s to %s: %s\n", in, to, from, strerror(errno)); } - unicode_iconv_close(ic); + iconv_close(ic); } /* and lets see what camel thinks out optimal charset is */ -- cgit v1.2.3