Home | History | Annotate | Download | only in mail

Lines Matching defs:MP

139 sfmtfield(const char **fmtbeg, const char *fmtch, struct message *mp)
151 if (mp == NULL) {
156 depth = mp->m_depth;
178 p = hfield(p, mp);
198 get_and_or_flags(struct message *mp, struct flags_s *flags)
200 for (/*EMPTY*/; mp; mp = mp->m_flink) {
201 flags->f_and &= mp->m_flag;
202 flags->f_or |= mp->m_flag;
203 flags->f_new |= (mp->m_flag & (MREAD|MNEW)) == MNEW;
204 flags->f_unread |= (mp->m_flag & (MREAD|MNEW)) == 0;
205 get_and_or_flags(mp->m_clink, flags);
210 sfmtflag(const char **fmtbeg, const char *fmtch, struct message *mp)
216 if (mp == NULL)
219 is_thread = mp->m_clink != NULL;
223 flags.f_and = mp->m_flag;
224 flags.f_or = mp->m_flag;
229 get_and_or_flags(mp->m_clink, &flags);
287 subformat(const char **src, struct message *mp, const char *addr,
290 #define MP(a) mp ? a : (*src = (p + 1), NULL)
306 return sfmtfield(src, p, mp);
308 return MP(sfmtint(src, p, (int)(mp->m_lines - mp->m_blines)));
310 return MP(sfmtint(src, p, (int)mp->m_blines));
312 return MP(sfmtint(src, p, (int)mp->m_lines));
316 return MP(sfmtoff(src, p, mp->m_size));
318 return MP(sfmtstr(src, p, mp == dot ? ">" : " "));
320 return MP(sfmtflag(src, p, mp));
324 return sfmtint(src, p, get_msgnum(mp)); /* '0' if mp == NULL */
357 #undef MP
697 dateof(struct tm *tm, struct message *mp, int use_hl_date)
710 if (mp == NULL) { /* use local time */
732 (date = hfield("date", mp)) != NULL &&
792 (void)readline(setinput(mp), headline, (int)sizeof(headline), 0);
807 addrof(struct message *mp)
809 if (mp == NULL)
812 return nameof(mp, 0);
921 userof(struct message *mp)
926 if (mp == NULL)
929 if ((sender = hfield("from", mp)) != NULL ||
930 (sender = hfield("sender", mp)) != NULL)
946 subjof(struct message *mp)
950 if (mp == NULL)
953 if ((subj = hfield("subject", mp)) == NULL)
954 subj = hfield("subj", mp);
981 preformat(struct tm *tm, const char *oldfmt, struct message *mp, int use_hl_date)
991 if (mp != NULL && (mp->m_flag & MDELETED) != 0)
992 mp = NULL; /* deleted mail shouldn't show up! */
994 subj = protect(subjof(mp));
995 addr = protect(addrof(mp));
996 user = protect(userof(mp));
997 dateof(tm, mp, use_hl_date);
1005 fp = subformat(&p, mp, addr, user, subj, tm->tm_isdst);
1034 smsgprintf(const char *fmtstr, struct message *mp)
1050 newfmt = preformat(&tm, fmtstr, mp, use_hl_date);
1058 fmsgprintf(FILE *fo, const char *fmtstr, struct message *mp)
1062 buf = smsgprintf(fmtstr, mp);