summaryrefslogtreecommitdiffstats
path: root/hdrline.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-10-21 22:46:13 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-10-21 22:46:13 +0000
commit81817e80725b2aec981e96f6026732dbea9748e5 (patch)
treec52eb9e23038a2f66a86dc27986dd0e69caccba6 /hdrline.c
parenta44de424b8540d14391bf387945f465877dd92b8 (diff)
Fix match-all for the ~p, ~P modifiers.
Diffstat (limited to 'hdrline.c')
-rw-r--r--hdrline.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/hdrline.c b/hdrline.c
index ed577baa..88b27e52 100644
--- a/hdrline.c
+++ b/hdrline.c
@@ -161,24 +161,24 @@ static int user_in_addr (ADDRESS *a)
* 3: user is in the CC list
* 4: user is originator
*/
-static int user_is_recipient (HEADER *h)
+int mutt_user_is_recipient (HEADER *h)
{
- ENVELOPE *hdr = h->env;
+ ENVELOPE *env = h->env;
if(!h->recip_valid)
{
h->recip_valid = 1;
- if (mutt_addr_is_user (hdr->from))
+ if (mutt_addr_is_user (env->from))
h->recipient = 4;
- else if (user_in_addr (hdr->to))
+ else if (user_in_addr (env->to))
{
- if (hdr->to->next || hdr->cc)
+ if (env->to->next || env->cc)
h->recipient = 2; /* non-unique recipient */
else
h->recipient = 1; /* unique recipient */
}
- else if (user_in_addr (hdr->cc))
+ else if (user_in_addr (env->cc))
h->recipient = 3;
else
h->recipient = 0;
@@ -545,7 +545,7 @@ hdr_format_str (char *dest,
case 'T':
snprintf (fmt, sizeof (fmt), "%%%sc", prefix);
snprintf (dest, destlen, fmt,
- (Tochars && ((i = user_is_recipient (hdr))) < strlen (Tochars)) ? Tochars[i] : ' ');
+ (Tochars && ((i = mutt_user_is_recipient (hdr))) < strlen (Tochars)) ? Tochars[i] : ' ');
break;
case 'u':
@@ -606,7 +606,7 @@ hdr_format_str (char *dest,
hdr->deleted ? 'D' : (hdr->attach_del ? 'd' : ch),
hdr->tagged ? '*' :
(hdr->flagged ? '!' :
- (Tochars && ((i = user_is_recipient (hdr)) < strlen (Tochars)) ? Tochars[i] : ' ')));
+ (Tochars && ((i = mutt_user_is_recipient (hdr)) < strlen (Tochars)) ? Tochars[i] : ' ')));
snprintf (dest, destlen, fmt, buf2);
break;