From 1779bc381707699d1ef5842708ee71fd24e867d8 Mon Sep 17 00:00:00 2001 From: Matthew Loper Date: Mon, 7 Feb 2000 22:42:41 +0000 Subject: + * 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 + '>', etc. svn path=/trunk/; revision=1687 --- tests/test-formatter.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') 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; -- cgit v1.2.3