From 551901216ecf731bf44ded1cc2c61b60d3ef708f Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 14 Dec 2001 20:06:51 +0000 Subject: Connect to the destroy signal on the popup dialog. 2001-12-12 Jeffrey Stedfast * mail-config.c (mail_config_check_service): Connect to the destroy signal on the popup dialog. 2001-12-12 Jeffrey Stedfast * mail-format.c (handle_text_plain): Make sure i != num_specials after we check for any special text markers. Fixes bug #12265. svn path=/trunk/; revision=15085 --- mail/mail-format.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mail/mail-format.c') diff --git a/mail/mail-format.c b/mail/mail-format.c index 68b51e8265..74ffc99a22 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -1146,7 +1146,8 @@ struct { { "begin ", try_uudecoding }, { "(This file must be converted with BinHex 4.0)\n", try_inline_binhex } }; -#define NSPECIALS (sizeof (text_specials) / sizeof (*text_specials)) + +static int num_specials = (sizeof (text_specials) / sizeof (text_specials[0])); static void write_one_text_plain_chunk (const char *text, int len, GtkHTML *html, GtkHTMLStream *stream, gboolean printing) @@ -1200,12 +1201,12 @@ handle_text_plain (CamelMimePart *part, const char *mime_type, p = text; while (p && check_specials) { /* Look for special cases. */ - for (i = 0; i < NSPECIALS; i++) { + for (i = 0; i < num_specials; i++) { start = strstr (p, text_specials[i].start); if (start && (start == p || start[-1] == '\n')) break; } - if (!start) + if (i == num_specials) break; /* Deal with special case */ -- cgit v1.2.3