aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-filter-tohtml.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-12-17 03:36:35 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-12-17 03:36:35 +0800
commit9d70bad4944b3f00c7b6e0a214e8c5ed9566e8ac (patch)
tree003b299901d5c449ef95ad8384415597b111cbf6 /camel/camel-mime-filter-tohtml.c
parentaed127b4f487bc6026b1c89eeb7034973511ba6b (diff)
downloadgsoc2013-evolution-9d70bad4944b3f00c7b6e0a214e8c5ed9566e8ac.tar
gsoc2013-evolution-9d70bad4944b3f00c7b6e0a214e8c5ed9566e8ac.tar.gz
gsoc2013-evolution-9d70bad4944b3f00c7b6e0a214e8c5ed9566e8ac.tar.bz2
gsoc2013-evolution-9d70bad4944b3f00c7b6e0a214e8c5ed9566e8ac.tar.lz
gsoc2013-evolution-9d70bad4944b3f00c7b6e0a214e8c5ed9566e8ac.tar.xz
gsoc2013-evolution-9d70bad4944b3f00c7b6e0a214e8c5ed9566e8ac.tar.zst
gsoc2013-evolution-9d70bad4944b3f00c7b6e0a214e8c5ed9566e8ac.zip
New convenience function to replace calls to e_text_to_html() in the
2002-12-16 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-filter-tohtml.c (camel_text_to_html): New convenience function to replace calls to e_text_to_html() in the mailer/composer etc. svn path=/trunk/; revision=19128
Diffstat (limited to 'camel/camel-mime-filter-tohtml.c')
-rw-r--r--camel/camel-mime-filter-tohtml.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/camel/camel-mime-filter-tohtml.c b/camel/camel-mime-filter-tohtml.c
index a3494ba72f..4f9d972625 100644
--- a/camel/camel-mime-filter-tohtml.c
+++ b/camel/camel-mime-filter-tohtml.c
@@ -404,3 +404,25 @@ camel_mime_filter_tohtml_new (guint32 flags, guint32 colour)
return CAMEL_MIME_FILTER (new);
}
+
+
+char *
+camel_text_to_html (const char *in, guint32 flags, guint32 colour)
+{
+ CamelMimeFilter *filter;
+ size_t outlen, outpre;
+ char *outbuf;
+
+ g_return_val_if_fail (in != NULL, NULL);
+
+ filter = camel_mime_filter_tohtml_new (flags, colour);
+
+ camel_mime_filter_complete (filter, (char *) in, strlen (in), 0,
+ &outbuf, &outlen, &outpre);
+
+ outbuf = g_strndup (outbuf, outlen);
+
+ camel_object_unref (filter);
+
+ return outbuf;
+}