diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-08-16 23:25:56 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-09-14 20:09:00 +0800 |
commit | 777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1 (patch) | |
tree | dfab9ca8f30c7b1539f86dfe19b8bf761d6a899c /mail/mail-autofilter.c | |
parent | 83675abbc2b3a3bc6421094a56651d021fc0cdcd (diff) | |
download | gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.gz gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.bz2 gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.lz gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.xz gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.tar.zst gsoc2013-evolution-777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'mail/mail-autofilter.c')
-rw-r--r-- | mail/mail-autofilter.c | 42 |
1 files changed, 16 insertions, 26 deletions
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index 45b074d6cf..3fc90d5f94 100644 --- a/mail/mail-autofilter.c +++ b/mail/mail-autofilter.c @@ -90,7 +90,7 @@ strip_re (const gchar *subject) break; if ((s[0] == 'r' || s[0] == 'R') && (s[1] == 'e' || s[1] == 'E')) { - p = s+2; + p = s + 2; while (isdigit (*p) || (ispunct (*p) && (*p != ':'))) p++; if (*p == ':') { @@ -104,26 +104,10 @@ strip_re (const gchar *subject) return (gchar *) s; } -#if 0 -gint -reg_match (gchar *str, gchar *regstr) -{ - regex_t reg; - gint error; - gint ret; - - error = regcomp (®, regstr, REG_EXTENDED|REG_ICASE|REG_NOSUB); - if (error != 0) { - return 0; - } - error = regexec (®, str, 0, NULL, 0); - regfree (®); - return (error == 0); -} -#endif - static void -rule_add_subject (ERuleContext *context, EFilterRule *rule, const gchar *text) +rule_add_subject (ERuleContext *context, + EFilterRule *rule, + const gchar *text) { EFilterPart *part; EFilterElement *element; @@ -140,7 +124,9 @@ rule_add_subject (ERuleContext *context, EFilterRule *rule, const gchar *text) } static void -rule_add_sender (ERuleContext *context, EFilterRule *rule, const gchar *text) +rule_add_sender (ERuleContext *context, + EFilterRule *rule, + const gchar *text) { EFilterPart *part; EFilterElement *element; @@ -157,9 +143,11 @@ rule_add_sender (ERuleContext *context, EFilterRule *rule, const gchar *text) } /* do a bunch of things on the subject to try and detect mailing lists, remove - unneeded stuff, etc */ + * unneeded stuff, etc */ static void -rule_match_subject (ERuleContext *context, EFilterRule *rule, const gchar *subject) +rule_match_subject (ERuleContext *context, + EFilterRule *rule, + const gchar *subject) { const gchar *s; const gchar *s1, *s2; @@ -186,11 +174,11 @@ rule_match_subject (ERuleContext *context, EFilterRule *rule, const gchar *subje s1 = strchr (s, ':'); if (s1) { tmp = g_alloca (s1 - s + 1); - memcpy (tmp, s, s1-s); + memcpy (tmp, s, s1 - s); tmp[s1 - s] = 0; g_strstrip (tmp); rule_add_subject (context, rule, tmp); - s = s1+1; + s = s1 + 1; } /* just lump the rest together */ @@ -201,7 +189,9 @@ rule_match_subject (ERuleContext *context, EFilterRule *rule, const gchar *subje } static void -rule_match_mlist (ERuleContext *context, EFilterRule *rule, const gchar *mlist) +rule_match_mlist (ERuleContext *context, + EFilterRule *rule, + const gchar *mlist) { EFilterPart *part; EFilterElement *element; |