Rocco Rutte:
authorpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Mon, 29 Aug 2005 05:35:45 +0000 (05:35 +0000)
committerpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Mon, 29 Aug 2005 05:35:45 +0000 (05:35 +0000)
- in addition to now having 'A'/' ' for multipart msgs in $index_format, add ~M pattern for these (maybe counters still to add, i.e. to match msgs with e.g. 3-5 parts?)

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@467 e385b8ad-14ed-0310-8656-cc95a2468c6d

VERSION.svn
doc/manual.sgml.head
doc/manual.txt
mutt.h
pattern.c

index f27d46f..5873851 100644 (file)
@@ -1 +1 @@
-466
+467
index cbc9700..1173666 100644 (file)
@@ -4756,6 +4756,7 @@ of the file ``&tilde;/run2.dat''.
 ~L EXPR         message is either originated or received by EXPR
 ~l              message is addressed to a known mailing list
 ~m [MIN]-[MAX]  message in the range MIN to MAX *)
 ~L EXPR         message is either originated or received by EXPR
 ~l              message is addressed to a known mailing list
 ~m [MIN]-[MAX]  message in the range MIN to MAX *)
+~M              multipart messages
 ~n [MIN]-[MAX]  messages with a score in the range MIN to MAX *)
 ~N              new messages
 ~O              old messages
 ~n [MIN]-[MAX]  messages with a score in the range MIN to MAX *)
 ~N              new messages
 ~O              old messages
index ec54e0b..07c1a46 100644 (file)
@@ -4,7 +4,7 @@
                       by Andreas Krennmair <ak@synflood.at> and others
                 originally based on _\bm_\bu_\bt_\bt by Michael Elkins <me@cs.hmc.edu> and others
 
                       by Andreas Krennmair <ak@synflood.at> and others
                 originally based on _\bm_\bu_\bt_\bt by Michael Elkins <me@cs.hmc.edu> and others
 
-                                     version devel-r462
+                                     version devel-r465
 
                                           A\bAb\bbs\bst\btr\bra\bac\bct\bt
 
 
                                           A\bAb\bbs\bst\btr\bra\bac\bct\bt
 
             ~L EXPR         message is either originated or received by EXPR
             ~l              message is addressed to a known mailing list
             ~m [MIN]-[MAX]  message in the range MIN to MAX *)
             ~L EXPR         message is either originated or received by EXPR
             ~l              message is addressed to a known mailing list
             ~m [MIN]-[MAX]  message in the range MIN to MAX *)
+            ~M              multipart messages
             ~n [MIN]-[MAX]  messages with a score in the range MIN to MAX *)
             ~N              new messages
             ~O              old messages
             ~n [MIN]-[MAX]  messages with a score in the range MIN to MAX *)
             ~N              new messages
             ~O              old messages
 
        Type: system property
 
 
        Type: system property
 
-       Value: 462
+       Value: 465
 
        _\bT_\bh_\bi_\bs _\bi_\bs _\ba _\br_\be_\ba_\bd_\b-_\bo_\bn_\bl_\by _\bs_\by_\bs_\bt_\be_\bm _\bp_\br_\bo_\bp_\be_\br_\bt_\by _\ba_\bn_\bd _\bs_\bp_\be_\bc_\bi_\bf_\bi_\be_\bs _\bm_\bu_\bt_\bt_\bn_\bg_\b'_\bs _\bs_\bu_\bb_\bv_\be_\br_\bs_\bi_\bo_\bn _\br_\be_\bv_\bi_\bs_\bi_\bo_\bn
        _\bs_\bt_\br_\bi_\bn_\bg_\b.
 
        _\bT_\bh_\bi_\bs _\bi_\bs _\ba _\br_\be_\ba_\bd_\b-_\bo_\bn_\bl_\by _\bs_\by_\bs_\bt_\be_\bm _\bp_\br_\bo_\bp_\be_\br_\bt_\by _\ba_\bn_\bd _\bs_\bp_\be_\bc_\bi_\bf_\bi_\be_\bs _\bm_\bu_\bt_\bt_\bn_\bg_\b'_\bs _\bs_\bu_\bb_\bv_\be_\br_\bs_\bi_\bo_\bn _\br_\be_\bv_\bi_\bs_\bi_\bo_\bn
        _\bs_\bt_\br_\bi_\bn_\bg_\b.
diff --git a/mutt.h b/mutt.h
index 3af6c90..8394be2 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -167,7 +167,6 @@ enum {
   M_LIMIT,
   M_EXPIRED,
   M_SUPERSEDED,
   M_LIMIT,
   M_EXPIRED,
   M_SUPERSEDED,
-  M_REALNAME,
 
   /* actions for mutt_pattern_comp/mutt_pattern_exec */
   M_AND,
 
   /* actions for mutt_pattern_comp/mutt_pattern_exec */
   M_AND,
@@ -204,6 +203,8 @@ enum {
 #ifdef USE_NNTP
   M_NEWSGROUPS,
 #endif
 #ifdef USE_NNTP
   M_NEWSGROUPS,
 #endif
+  M_REALNAME,
+  M_MULTIPART,
 
   /* Options for Mailcap lookup */
   M_EDIT,
 
   /* Options for Mailcap lookup */
   M_EDIT,
index ec46dca..84e2cea 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -20,6 +20,7 @@
 #include "mapping.h"
 #include "keymap.h"
 #include "copy.h"
 #include "mapping.h"
 #include "keymap.h"
 #include "copy.h"
+#include "mime.h"
 
 #include "lib/mem.h"
 #include "lib/intl.h"
 
 #include "lib/mem.h"
 #include "lib/intl.h"
@@ -65,6 +66,7 @@ struct pattern_flags {
   'L', M_ADDRESS, 0, eat_regexp}, {
   'l', M_LIST, 0, NULL}, {
   'm', M_MESSAGE, 0, eat_range}, {
   'L', M_ADDRESS, 0, eat_regexp}, {
   'l', M_LIST, 0, NULL}, {
   'm', M_MESSAGE, 0, eat_range}, {
+  'M', M_MULTIPART, 0, NULL}, {
   'n', M_SCORE, 0, eat_range}, {
   'N', M_NEW, 0, NULL}, {
   'O', M_OLD, 0, NULL}, {
   'n', M_SCORE, 0, eat_range}, {
   'N', M_NEW, 0, NULL}, {
   'O', M_OLD, 0, NULL}, {
@@ -1047,6 +1049,8 @@ mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags,
     return (pat->not ^ (h->thread && h->thread->duplicate_thread));
   case M_UNREFERENCED:
     return (pat->not ^ (h->thread && !h->thread->child));
     return (pat->not ^ (h->thread && h->thread->duplicate_thread));
   case M_UNREFERENCED:
     return (pat->not ^ (h->thread && !h->thread->child));
+  case M_MULTIPART:
+    return (pat->not ^ (h->content && h->content->type == TYPEMULTIPART));
   case M_REALNAME:
     /* realname filter:
      * we have a match if
   case M_REALNAME:
     /* realname filter:
      * we have a match if