aboutsummaryrefslogtreecommitdiffstats
path: root/camel/tests/message/test2.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-04-27 02:21:32 +0800
committerDan Winship <danw@src.gnome.org>2001-04-27 02:21:32 +0800
commit18af050c0507105544f5a83cd529a8b7a4264bdd (patch)
tree8a6dfbc597e0a30cd7659b2012d07208a1f360bc /camel/tests/message/test2.c
parent678e848710c297d8219a878970aa5471e5b3ec7d (diff)
downloadgsoc2013-evolution-18af050c0507105544f5a83cd529a8b7a4264bdd.tar
gsoc2013-evolution-18af050c0507105544f5a83cd529a8b7a4264bdd.tar.gz
gsoc2013-evolution-18af050c0507105544f5a83cd529a8b7a4264bdd.tar.bz2
gsoc2013-evolution-18af050c0507105544f5a83cd529a8b7a4264bdd.tar.lz
gsoc2013-evolution-18af050c0507105544f5a83cd529a8b7a4264bdd.tar.xz
gsoc2013-evolution-18af050c0507105544f5a83cd529a8b7a4264bdd.tar.zst
gsoc2013-evolution-18af050c0507105544f5a83cd529a8b7a4264bdd.zip
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
Diffstat (limited to 'camel/tests/message/test2.c')
-rw-r--r--camel/tests/message/test2.c25
1 files changed, 12 insertions, 13 deletions
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 <unistd.h>
#include <string.h>
#include <stdio.h>
-
-#include <unicode.h>
+#include <iconv.h>
#include <camel/camel-internet-address.h>
#include <camel/camel-address.h>
@@ -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 */