aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-formatter.c
diff options
context:
space:
mode:
authorMatthew Loper <mloper@src.gnome.org>2000-02-08 06:42:41 +0800
committerMatthew Loper <mloper@src.gnome.org>2000-02-08 06:42:41 +0800
commit1779bc381707699d1ef5842708ee71fd24e867d8 (patch)
treece33df7b937b0c37a11e90985c38219da7654843 /tests/test-formatter.c
parent831bc265cc6903991facbb910a205fd6e3c96c69 (diff)
downloadgsoc2013-evolution-1779bc381707699d1ef5842708ee71fd24e867d8.tar.gz
gsoc2013-evolution-1779bc381707699d1ef5842708ee71fd24e867d8.tar.zst
gsoc2013-evolution-1779bc381707699d1ef5842708ee71fd24e867d8.zip
+ * tests/test-formatter.c (print_usage_and_quit): New function,
+ which gives usage information. + + * camel/camel-formatter.c: made the 'stream' a member of the + CamelFormatter class, so that streams don't have to be explicitly + sent as a param where a CamelFormatter is also sent.. + (handle_text_plain): Use 'encode_entities' to change '<' to + '&gt;', etc. svn path=/trunk/; revision=1687
Diffstat (limited to 'tests/test-formatter.c')
-rw-r--r--tests/test-formatter.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test-formatter.c b/tests/test-formatter.c
index 9c9c6eed7b..32148be11b 100644
--- a/tests/test-formatter.c
+++ b/tests/test-formatter.c
@@ -21,6 +21,17 @@ convert_to_html_and_print (CamelMimeMessage *msg)
(CAMEL_STREAM_MEM(stream))->buffer->data);
}
+static void
+print_usage_and_quit()
+{
+ g_print ("\nUsage: test-formatter [MIME-MESSAGE-FILE]\n\n");
+ g_print ("Where MIME-MESSAGE-FILE is in the \"message/rfc822\"\n");
+ g_print ("mime format.\n\n");
+
+ exit(0);
+}
+
+
int
main (int argc, char**argv)
{
@@ -28,8 +39,12 @@ main (int argc, char**argv)
CamelMimeMessage *message;
CamelStream *input_stream;
+// CamelStream *foo = CAMEL_STREAM(NULL);
gtk_init (&argc, &argv);
+ if (argc == 1 || argc > 2)
+ print_usage_and_quit();
+
camel_init ();
camel_debug_level = CAMEL_LOG_LEVEL_FULL_DEBUG;