NeoMutt  2018-07-16 +1360-3df4a2
Teaching an old dog new tricks
DOXYGEN
hdrline.c File Reference

String processing routines to generate the mail index. More...

#include "config.h"
#include <locale.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "mutt/mutt.h"
#include "config/lib.h"
#include "email/lib.h"
#include "mutt.h"
#include "hdrline.h"
#include "alias.h"
#include "context.h"
#include "curs_lib.h"
#include "format_flags.h"
#include "globals.h"
#include "mailbox.h"
#include "mutt_curses.h"
#include "mutt_menu.h"
#include "mutt_parse.h"
#include "mutt_thread.h"
#include "mutt_window.h"
#include "muttlib.h"
#include "ncrypt/ncrypt.h"
#include "sort.h"
+ Include dependency graph for hdrline.c:

Go to the source code of this file.

Enumerations

enum  FlagChars {
  FLAG_CHAR_TAGGED, FLAG_CHAR_IMPORTANT, FLAG_CHAR_DELETED, FLAG_CHAR_DELETED_ATTACH,
  FLAG_CHAR_REPLIED, FLAG_CHAR_OLD, FLAG_CHAR_NEW, FLAG_CHAR_OLD_THREAD,
  FLAG_CHAR_NEW_THREAD, FLAG_CHAR_SEMPTY, FLAG_CHAR_ZEMPTY
}
 Index into the C_FlagChars variable ($flag_chars) More...
 
enum  CryptChars {
  FLAG_CHAR_CRYPT_GOOD_SIGN, FLAG_CHAR_CRYPT_ENCRYPTED, FLAG_CHAR_CRYPT_SIGNED, FLAG_CHAR_CRYPT_CONTAINS_KEY,
  FLAG_CHAR_CRYPT_NO_CRYPTO
}
 Index into the C_CryptChars variable ($crypt_chars) More...
 
enum  FieldType {
  DISP_TO, DISP_CC, DISP_BCC, DISP_FROM,
  DISP_PLAIN, DISP_MAX
}
 Header types. More...
 

Functions

bool mutt_is_mail_list (struct Address *addr)
 Is this the email address of a mailing list? More...
 
bool mutt_is_subscribed_list (struct Address *addr)
 Is this the email address of a user-subscribed mailing list? More...
 
static bool check_for_mailing_list (struct Address *addr, const char *pfx, char *buf, int buflen)
 Search list of addresses for a mailing list. More...
 
static bool check_for_mailing_list_addr (struct Address *addr, char *buf, int buflen)
 Check an address list for a mailing list. More...
 
static bool first_mailing_list (char *buf, size_t buflen, struct Address *a)
 Get the first mailing list in the list of addresses. More...
 
static size_t add_index_color (char *buf, size_t buflen, MuttFormatFlags flags, char color)
 Insert a color marker into a string. More...
 
static const char * get_nth_wchar (struct MbTable *table, int index)
 Extract one char from a multi-byte table. More...
 
static const char * make_from_prefix (enum FieldType disp)
 Create a prefix for an author field. More...
 
static void make_from (struct Envelope *env, char *buf, size_t buflen, bool do_lists, MuttFormatFlags flags)
 Generate a From: field (with optional prefix) More...
 
static void make_from_addr (struct Envelope *hdr, char *buf, size_t buflen, bool do_lists)
 Create a 'from' address for a reply email. More...
 
static bool user_in_addr (struct Address *a)
 Do any of the addresses refer to the user? More...
 
static int user_is_recipient (struct Email *e)
 Is the user a recipient of the message. More...
 
static char * apply_subject_mods (struct Envelope *env)
 Apply regex modifications to the subject. More...
 
static bool thread_is_new (struct Context *ctx, struct Email *e)
 Does the email thread contain any new emails? More...
 
static bool thread_is_old (struct Context *ctx, struct Email *e)
 Does the email thread contain any unread emails? More...
 
static const char * index_format_str (char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, unsigned long data, MuttFormatFlags flags)
 Format a string for the index list - Implements format_t. More...
 
void mutt_make_string_flags (char *buf, size_t buflen, const char *s, struct Context *ctx, struct Mailbox *m, struct Email *e, MuttFormatFlags flags)
 Create formatted strings using mailbox expandos. More...
 
void mutt_make_string_info (char *buf, size_t buflen, int cols, const char *s, struct HdrFormatInfo *hfi, MuttFormatFlags flags)
 Create pager status bar string. More...
 

Variables

struct MbTableC_CryptChars
 Config: User-configurable crypto flags: signed, encrypted etc. More...
 
struct MbTableC_FlagChars
 Config: User-configurable index flags: tagged, new, etc. More...
 
struct MbTableC_FromChars
 Config: User-configurable index flags: to address, cc address, etc. More...
 
struct MbTableC_ToChars
 Config: Indicator characters for the 'To' field in the index. More...
 

Detailed Description

String processing routines to generate the mail index.

Authors
  • Michael R. Elkins
  • Richard Russon
  • Ian Zimmerman

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file hdrline.c.

Enumeration Type Documentation

enum FlagChars

Index into the C_FlagChars variable ($flag_chars)

Enumerator
FLAG_CHAR_TAGGED 

Character denoting a tagged email.

FLAG_CHAR_IMPORTANT 

Character denoting a important (flagged) email.

FLAG_CHAR_DELETED 

Character denoting a deleted email.

FLAG_CHAR_DELETED_ATTACH 

Character denoting a deleted attachment.

FLAG_CHAR_REPLIED 

Character denoting an email that has been replied to.

FLAG_CHAR_OLD 

Character denoting an email that has been read.

FLAG_CHAR_NEW 

Character denoting an unread email.

FLAG_CHAR_OLD_THREAD 

Character denoting a thread of emails that has been read.

FLAG_CHAR_NEW_THREAD 

Character denoting a thread containing at least one new email.

FLAG_CHAR_SEMPTY 

Character denoting a read email, $index_format S expando.

FLAG_CHAR_ZEMPTY 

Character denoting a read email, $index_format Z expando.

Definition at line 67 of file hdrline.c.

68 {
80 };
Character denoting a tagged email.
Definition: hdrline.c:69
Character denoting a important (flagged) email.
Definition: hdrline.c:70
Character denoting a thread containing at least one new email.
Definition: hdrline.c:77
Character denoting a read email, $index_format S expando.
Definition: hdrline.c:78
Character denoting a deleted attachment.
Definition: hdrline.c:72
Character denoting an email that has been read.
Definition: hdrline.c:74
Character denoting a thread of emails that has been read.
Definition: hdrline.c:76
Character denoting an email that has been replied to.
Definition: hdrline.c:73
Character denoting a read email, $index_format Z expando.
Definition: hdrline.c:79
Character denoting a deleted email.
Definition: hdrline.c:71
Character denoting an unread email.
Definition: hdrline.c:75
enum CryptChars

Index into the C_CryptChars variable ($crypt_chars)

Enumerator
FLAG_CHAR_CRYPT_GOOD_SIGN 

Character denoting a message signed with a verified key.

FLAG_CHAR_CRYPT_ENCRYPTED 

Character denoting a message is PGP-encrypted.

FLAG_CHAR_CRYPT_SIGNED 

Character denoting a message is signed.

FLAG_CHAR_CRYPT_CONTAINS_KEY 

Character denoting a message contains a PGP key.

FLAG_CHAR_CRYPT_NO_CRYPTO 

Character denoting a message has no cryptography information.

Definition at line 85 of file hdrline.c.

86 {
92 };
Character denoting a message contains a PGP key.
Definition: hdrline.c:90
Character denoting a message signed with a verified key.
Definition: hdrline.c:87
Character denoting a message is PGP-encrypted.
Definition: hdrline.c:88
Character denoting a message has no cryptography information.
Definition: hdrline.c:91
Character denoting a message is signed.
Definition: hdrline.c:89
enum FieldType

Header types.

Strings for printing headers

Enumerator
DISP_TO 

To: string.

DISP_CC 

Cc: string.

DISP_BCC 

Bcc: string.

DISP_FROM 

From: string.

DISP_PLAIN 

Empty string.

DISP_MAX 

Definition at line 232 of file hdrline.c.

233 {
234  DISP_TO,
235  DISP_CC,
236  DISP_BCC,
237  DISP_FROM,
238  DISP_PLAIN,
239  DISP_MAX,
240 };
Bcc: string.
Definition: hdrline.c:236
Cc: string.
Definition: hdrline.c:235
Empty string.
Definition: hdrline.c:238
From: string.
Definition: hdrline.c:237
To: string.
Definition: hdrline.c:234

Function Documentation

bool mutt_is_mail_list ( struct Address addr)

Is this the email address of a mailing list?

Parameters
addrAddress to test
Return values
trueIf it's a mailing list

Definition at line 99 of file hdrline.c.

100 {
101  if (!mutt_regexlist_match(&UnMailLists, addr->mailbox))
102  return mutt_regexlist_match(&MailLists, addr->mailbox);
103  return false;
104 }
char * mailbox
mailbox and host address
Definition: address.h:35
bool mutt_regexlist_match(struct RegexList *rl, const char *str)
Does a string match any Regex in the list?
Definition: regex.c:188

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool mutt_is_subscribed_list ( struct Address addr)

Is this the email address of a user-subscribed mailing list?

Parameters
addrAddress to test
Return values
trueIf it's a subscribed mailing list

Definition at line 111 of file hdrline.c.

112 {
113  if (!mutt_regexlist_match(&UnMailLists, addr->mailbox) &&
114  !mutt_regexlist_match(&UnSubscribedLists, addr->mailbox))
115  {
116  return mutt_regexlist_match(&SubscribedLists, addr->mailbox);
117  }
118  return false;
119 }
char * mailbox
mailbox and host address
Definition: address.h:35
bool mutt_regexlist_match(struct RegexList *rl, const char *str)
Does a string match any Regex in the list?
Definition: regex.c:188

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool check_for_mailing_list ( struct Address addr,
const char *  pfx,
char *  buf,
int  buflen 
)
static

Search list of addresses for a mailing list.

Parameters
addrList of addresses to search
pfxPrefix string
bufBuffer to store results
buflenBuffer length
Return values
1Mailing list found
0No list found

Search for a mailing list in the list of addresses pointed to by addr. If one is found, print pfx and the name of the list into buf.

Definition at line 133 of file hdrline.c.

134 {
135  for (; addr; addr = addr->next)
136  {
137  if (mutt_is_subscribed_list(addr))
138  {
139  if (pfx && buf && buflen)
140  snprintf(buf, buflen, "%s%s", pfx, mutt_get_name(addr));
141  return true;
142  }
143  }
144  return false;
145 }
bool mutt_is_subscribed_list(struct Address *addr)
Is this the email address of a user-subscribed mailing list?
Definition: hdrline.c:111
const char * mutt_get_name(struct Address *a)
Pick the best name to display from an address.
Definition: sort.c:153
struct Address * next
Definition: address.h:39

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool check_for_mailing_list_addr ( struct Address addr,
char *  buf,
int  buflen 
)
static

Check an address list for a mailing list.

Parameters
addrAddress list
bufBuffer for the result
buflenLength of buffer
Return values
trueMailing list found

If one is found, print the address of the list into buf.

Definition at line 156 of file hdrline.c.

157 {
158  for (; addr; addr = addr->next)
159  {
160  if (mutt_is_subscribed_list(addr))
161  {
162  if (buf && buflen)
163  snprintf(buf, buflen, "%s", addr->mailbox);
164  return true;
165  }
166  }
167  return false;
168 }
char * mailbox
mailbox and host address
Definition: address.h:35
bool mutt_is_subscribed_list(struct Address *addr)
Is this the email address of a user-subscribed mailing list?
Definition: hdrline.c:111
struct Address * next
Definition: address.h:39

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool first_mailing_list ( char *  buf,
size_t  buflen,
struct Address a 
)
static

Get the first mailing list in the list of addresses.

Parameters
bufBuffer for the result
buflenLength of buffer
aAddress list
Return values
trueIf a mailing list was found

Definition at line 177 of file hdrline.c.

178 {
179  for (; a; a = a->next)
180  {
182  {
183  mutt_save_path(buf, buflen, a);
184  return true;
185  }
186  }
187  return false;
188 }
bool mutt_is_subscribed_list(struct Address *addr)
Is this the email address of a user-subscribed mailing list?
Definition: hdrline.c:111
void mutt_save_path(char *buf, size_t buflen, struct Address *addr)
Turn an email address into a filename (for saving)
Definition: muttlib.c:767
struct Address * next
Definition: address.h:39

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static size_t add_index_color ( char *  buf,
size_t  buflen,
MuttFormatFlags  flags,
char  color 
)
static

Insert a color marker into a string.

Parameters
bufBuffer to store marker
buflenBuffer length
flagsFlags, see MuttFormatFlags
colorColor, e.g. MT_COLOR_MESSAGE
Return values
numCharacters written

The colors are stored as "magic" strings embedded in the text.

Definition at line 200 of file hdrline.c.

201 {
202  /* only add color markers if we are operating on main index entries. */
203  if (!(flags & MUTT_FORMAT_INDEX))
204  return 0;
205 
206  /* this item is going to be passed to an external filter */
207  if (flags & MUTT_FORMAT_NOFILTER)
208  return 0;
209 
210  if (color == MT_COLOR_INDEX)
211  { /* buf might be uninitialized other cases */
212  const size_t len = mutt_str_strlen(buf);
213  buf += len;
214  buflen -= len;
215  }
216 
217  if (buflen <= 2)
218  return 0;
219 
220  buf[0] = MUTT_SPECIAL_INDEX;
221  buf[1] = color;
222  buf[2] = '\0';
223 
224  return 2;
225 }
size_t mutt_str_strlen(const char *a)
Calculate the length of a string, safely.
Definition: string.c:662
Index: default colour (takes a pattern)
Definition: mutt_curses.h:155
#define MUTT_FORMAT_INDEX
This is a main index entry.
Definition: format_flags.h:36
Colour indicator.
Definition: mutt_menu.h:76
#define MUTT_FORMAT_NOFILTER
Do not allow filtering on this pass.
Definition: format_flags.h:37

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static const char* get_nth_wchar ( struct MbTable table,
int  index 
)
static

Extract one char from a multi-byte table.

Parameters
tableMulti-byte table
indexSelect this character
Return values
ptrString pointer to the character

Extract one multi-byte character from a string table. If the index is invalid, then a space character will be returned. If the character selected is '
' (Ctrl-M), then "" will be returned.

Definition at line 252 of file hdrline.c.

253 {
254  if (!table || !table->chars || (index < 0) || (index >= table->len))
255  return " ";
256 
257  if (table->chars[index][0] == '\r')
258  return "";
259 
260  return table->chars[index];
261 }
char ** chars
The array of multibyte character strings.
Definition: mbtable.h:39
int index
the absolute (unsorted) message number
Definition: email.h:88
int len
Number of characters.
Definition: mbtable.h:38

+ Here is the caller graph for this function:

static const char* make_from_prefix ( enum FieldType  disp)
static

Create a prefix for an author field.

Parameters
dispType of field
Return values
ptrPrefix string (do not free it)

If $from_chars is set, pick an appropriate character from it. If not, use the default prefix: "To", "Cc", etc

Definition at line 271 of file hdrline.c.

272 {
273  /* need 2 bytes at the end, one for the space, another for NUL */
274  static char padded[8];
275  static const char *long_prefixes[DISP_MAX] = {
276  [DISP_TO] = "To ", [DISP_CC] = "Cc ", [DISP_BCC] = "Bcc ",
277  [DISP_FROM] = "", [DISP_PLAIN] = "",
278  };
279 
280  if (!C_FromChars || !C_FromChars->chars || (C_FromChars->len == 0))
281  return long_prefixes[disp];
282 
283  const char *pchar = get_nth_wchar(C_FromChars, disp);
284  if (mutt_str_strlen(pchar) == 0)
285  return "";
286 
287  snprintf(padded, sizeof(padded), "%s ", pchar);
288  return padded;
289 }
Bcc: string.
Definition: hdrline.c:236
char ** chars
The array of multibyte character strings.
Definition: mbtable.h:39
Cc: string.
Definition: hdrline.c:235
size_t mutt_str_strlen(const char *a)
Calculate the length of a string, safely.
Definition: string.c:662
struct MbTable * C_FromChars
Config: User-configurable index flags: to address, cc address, etc.
Definition: hdrline.c:61
Empty string.
Definition: hdrline.c:238
From: string.
Definition: hdrline.c:237
static const char * get_nth_wchar(struct MbTable *table, int index)
Extract one char from a multi-byte table.
Definition: hdrline.c:252
To: string.
Definition: hdrline.c:234
int len
Number of characters.
Definition: mbtable.h:38

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void make_from ( struct Envelope env,
char *  buf,
size_t  buflen,
bool  do_lists,
MuttFormatFlags  flags 
)
static

Generate a From: field (with optional prefix)

Parameters
envEnvelope of the email
bufBuffer to store the result
buflenSize of the buffer
do_listsShould we check for mailing lists?
flagsFormat flags, see MuttFormatFlags

Generate the F or L field in $index_format. This is the author, or recipient of the email.

The field can optionally be prefixed by a character from $from_chars. If $from_chars is not set, the prefix will be, "To", "Cc", etc

Definition at line 305 of file hdrline.c.

307 {
308  if (!env || !buf)
309  return;
310 
311  bool me;
312  enum FieldType disp;
313  struct Address *name = NULL;
314 
315  me = mutt_addr_is_user(env->from);
316 
317  if (do_lists || me)
318  {
319  if (check_for_mailing_list(env->to, make_from_prefix(DISP_TO), buf, buflen))
320  return;
321  if (check_for_mailing_list(env->cc, make_from_prefix(DISP_CC), buf, buflen))
322  return;
323  }
324 
325  if (me && env->to)
326  {
327  disp = (flags & MUTT_FORMAT_PLAIN) ? DISP_PLAIN : DISP_TO;
328  name = env->to;
329  }
330  else if (me && env->cc)
331  {
332  disp = DISP_CC;
333  name = env->cc;
334  }
335  else if (me && env->bcc)
336  {
337  disp = DISP_BCC;
338  name = env->bcc;
339  }
340  else if (env->from)
341  {
342  disp = DISP_FROM;
343  name = env->from;
344  }
345  else
346  {
347  *buf = '\0';
348  return;
349  }
350 
351  snprintf(buf, buflen, "%s%s", make_from_prefix(disp), mutt_get_name(name));
352 }
Bcc: string.
Definition: hdrline.c:236
struct Address * to
Definition: envelope.h:42
Cc: string.
Definition: hdrline.c:235
An email address.
Definition: address.h:32
static bool check_for_mailing_list(struct Address *addr, const char *pfx, char *buf, int buflen)
Search list of addresses for a mailing list.
Definition: hdrline.c:133
const char * name
Definition: pgpmicalg.c:45
Empty string.
Definition: hdrline.c:238
struct Address * from
Definition: envelope.h:41
From: string.
Definition: hdrline.c:237
struct Address * bcc
Definition: envelope.h:44
static const char * make_from_prefix(enum FieldType disp)
Create a prefix for an author field.
Definition: hdrline.c:271
const char * mutt_get_name(struct Address *a)
Pick the best name to display from an address.
Definition: sort.c:153
#define MUTT_FORMAT_PLAIN
Do not prepend DISP_TO, DISP_CC ...
Definition: format_flags.h:38
To: string.
Definition: hdrline.c:234
FieldType
Header types.
Definition: hdrline.c:232
struct Address * cc
Definition: envelope.h:43
bool mutt_addr_is_user(struct Address *addr)
Does the address belong to the user.
Definition: alias.c:678

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void make_from_addr ( struct Envelope hdr,
char *  buf,
size_t  buflen,
bool  do_lists 
)
static

Create a 'from' address for a reply email.

Parameters
hdrEnvelope of current email
bufBuffer for the result
buflenLength of buffer
do_listsIf true, check for mailing lists

Definition at line 361 of file hdrline.c.

362 {
363  if (!hdr || !buf)
364  return;
365 
366  bool me = mutt_addr_is_user(hdr->from);
367 
368  if (do_lists || me)
369  {
370  if (check_for_mailing_list_addr(hdr->to, buf, buflen))
371  return;
372  if (check_for_mailing_list_addr(hdr->cc, buf, buflen))
373  return;
374  }
375 
376  if (me && hdr->to)
377  snprintf(buf, buflen, "%s", hdr->to->mailbox);
378  else if (me && hdr->cc)
379  snprintf(buf, buflen, "%s", hdr->cc->mailbox);
380  else if (hdr->from)
381  mutt_str_strfcpy(buf, hdr->from->mailbox, buflen);
382  else
383  *buf = '\0';
384 }
struct Address * to
Definition: envelope.h:42
char * mailbox
mailbox and host address
Definition: address.h:35
struct Address * from
Definition: envelope.h:41
size_t mutt_str_strfcpy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:741
static bool check_for_mailing_list_addr(struct Address *addr, char *buf, int buflen)
Check an address list for a mailing list.
Definition: hdrline.c:156
struct Address * cc
Definition: envelope.h:43
bool mutt_addr_is_user(struct Address *addr)
Does the address belong to the user.
Definition: alias.c:678

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool user_in_addr ( struct Address a)
static

Do any of the addresses refer to the user?

Parameters
aAddress list
Return values
trueIf any of the addresses match one of the user's addresses

Definition at line 391 of file hdrline.c.

392 {
393  for (; a; a = a->next)
394  if (mutt_addr_is_user(a))
395  return true;
396  return false;
397 }
bool mutt_addr_is_user(struct Address *addr)
Does the address belong to the user.
Definition: alias.c:678
struct Address * next
Definition: address.h:39

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int user_is_recipient ( struct Email e)
static

Is the user a recipient of the message.

Parameters
eEmail to test
Return values
0User is not in list
1User is unique recipient
2User is in the TO list
3User is in the CC list
4User is originator
5Sent to a subscribed mailinglist
6User is in the Reply-To list

Definition at line 410 of file hdrline.c.

411 {
412  if (!e || !e->env)
413  return 0;
414 
415  struct Envelope *env = e->env;
416 
417  if (!e->recip_valid)
418  {
419  e->recip_valid = true;
420 
421  if (mutt_addr_is_user(env->from))
422  e->recipient = 4;
423  else if (user_in_addr(env->to))
424  {
425  if (env->to->next || env->cc)
426  e->recipient = 2; /* non-unique recipient */
427  else
428  e->recipient = 1; /* unique recipient */
429  }
430  else if (user_in_addr(env->cc))
431  e->recipient = 3;
432  else if (check_for_mailing_list(env->to, NULL, NULL, 0))
433  e->recipient = 5;
434  else if (check_for_mailing_list(env->cc, NULL, NULL, 0))
435  e->recipient = 5;
436  else if (user_in_addr(env->reply_to))
437  e->recipient = 6;
438  else
439  e->recipient = 0;
440  }
441 
442  return e->recipient;
443 }
struct Address * to
Definition: envelope.h:42
short recipient
user_is_recipient()&#39;s return value, cached
Definition: email.h:80
static bool check_for_mailing_list(struct Address *addr, const char *pfx, char *buf, int buflen)
Search list of addresses for a mailing list.
Definition: hdrline.c:133
struct Address * reply_to
Definition: envelope.h:46
struct Envelope * env
envelope information
Definition: email.h:92
struct Address * from
Definition: envelope.h:41
bool recip_valid
is_recipient is valid
Definition: email.h:58
struct Address * cc
Definition: envelope.h:43
The header of an email.
Definition: envelope.h:38
bool mutt_addr_is_user(struct Address *addr)
Does the address belong to the user.
Definition: alias.c:678
static bool user_in_addr(struct Address *a)
Do any of the addresses refer to the user?
Definition: hdrline.c:391
struct Address * next
Definition: address.h:39

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static char* apply_subject_mods ( struct Envelope env)
static

Apply regex modifications to the subject.

Parameters
envEnvelope of email
Return values
ptrModified subject
NULLNo modification made

Definition at line 451 of file hdrline.c.

452 {
453  if (!env)
454  return NULL;
455 
456  if (STAILQ_EMPTY(&SubjectRegexList))
457  return env->subject;
458 
459  if (!env->subject || (*env->subject == '\0'))
460  {
461  env->disp_subj = NULL;
462  return NULL;
463  }
464 
465  env->disp_subj = mutt_replacelist_apply(&SubjectRegexList, NULL, 0, env->subject);
466  return env->disp_subj;
467 }
char * disp_subj
display subject (modified copy of subject)
Definition: envelope.h:52
char * mutt_replacelist_apply(struct ReplaceList *rl, char *buf, size_t buflen, const char *str)
Apply replacements to a buffer.
Definition: regex.c:347
char * subject
Definition: envelope.h:50
#define STAILQ_EMPTY(head)
Definition: queue.h:346

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool thread_is_new ( struct Context ctx,
struct Email e 
)
static

Does the email thread contain any new emails?

Parameters
ctxMailbox
eEmail
Return values
trueIf thread contains new mail

Definition at line 475 of file hdrline.c.

476 {
477  return e->collapsed && (e->num_hidden > 1) &&
478  (mutt_thread_contains_unread(ctx, e) == 1);
479 }
#define mutt_thread_contains_unread(ctx, cur)
Definition: mutt_thread.h:59
size_t num_hidden
number of hidden messages in this view
Definition: email.h:78
bool collapsed
is this message part of a collapsed thread?
Definition: email.h:76

+ Here is the caller graph for this function:

static bool thread_is_old ( struct Context ctx,
struct Email e 
)
static

Does the email thread contain any unread emails?

Parameters
ctxMailbox
eEmail
Return values
trueIf thread contains unread mail

Definition at line 487 of file hdrline.c.

488 {
489  return e->collapsed && (e->num_hidden > 1) &&
490  (mutt_thread_contains_unread(ctx, e) == 2);
491 }
#define mutt_thread_contains_unread(ctx, cur)
Definition: mutt_thread.h:59
size_t num_hidden
number of hidden messages in this view
Definition: email.h:78
bool collapsed
is this message part of a collapsed thread?
Definition: email.h:76

+ Here is the caller graph for this function:

static const char* index_format_str ( char *  buf,
size_t  buflen,
size_t  col,
int  cols,
char  op,
const char *  src,
const char *  prec,
const char *  if_str,
const char *  else_str,
unsigned long  data,
MuttFormatFlags  flags 
)
static

Format a string for the index list - Implements format_t.

Expando Description
%a Address of the author
%A Reply-to address (if present; otherwise: address of author)
%b Filename of the original message folder (think mailbox)
%B The list to which the letter was sent, or else the folder name (b).
%C Current message number
%c Number of characters (bytes) in the message
%D Date and time of message using $date_format and local timezone
%d Date and time of message using $date_format and sender's timezone
%e Current message number in thread
%E Number of messages in current thread
%F Author name, or recipient name if the message is from you
%Fp Like F, but plain. No contextual formatting is applied to recipient name
%f Sender (address + real name), either From: or Return-Path:
%g Message tags (e.g. notmuch tags/imap flags)
%Gx Individual message tag (e.g. notmuch tags/imap flags)
%H Spam attribute(s) of this message
%I Initials of author
%i Message-id of the current message
%J Message tags (if present, tree unfolded, and != parent's tags)
%K The list to which the letter was sent (if any; otherwise: empty)
%L Like F, except 'lists' are displayed first
%l Number of lines in the message
%M Number of hidden messages if the thread is collapsed
%m Total number of message in the mailbox
%N Message score
%n Author's real name (or address if missing)
%O Like L, except using address instead of name
%P Progress indicator for the built-in pager (how much of the file has been displayed)
%q Newsgroup name (if compiled with NNTP support)
%R Comma separated list of Cc: recipients
%r Comma separated list of To: recipients
%S Single character status of the message (N/O/D/d/!/r/-)
%s Subject of the message
%T The appropriate character from the $$to_chars string
%t 'To:' field (recipients)
%u User (login) name of the author
%v First name of the author, or the recipient if the message is from you
%W Name of organization of author ('Organization:' field)
%x 'X-Comment-To:' field (if present and compiled with NNTP support)
%X Number of MIME attachments
%Y 'X-Label:' field (if present, tree unfolded, and != parent's x-label)
%y 'X-Label:' field (if present)
%Z Combined message flags
%zc Message crypto flags
%zs Message status flags
%zt Message tag flags
%(fmt) Date/time when the message was received
%[fmt] Message date/time converted to the local time zone
%{fmt} Message date/time converted to sender's time zone

Definition at line 548 of file hdrline.c.

552 {
553  struct HdrFormatInfo *hfi = (struct HdrFormatInfo *) data;
554  char fmt[128], tmp[1024], *p = NULL, *tags = NULL;
555  int optional = (flags & MUTT_FORMAT_OPTIONAL);
556  int threads = ((C_Sort & SORT_MASK) == SORT_THREADS);
557  int is_index = (flags & MUTT_FORMAT_INDEX);
558  size_t colorlen;
559 
560  struct Email *e = hfi->email;
561  struct Context *ctx = hfi->ctx;
562  struct Mailbox *m = hfi->mailbox;
563 
564  if (!e || !e->env)
565  return src;
566  buf[0] = '\0';
567  switch (op)
568  {
569  case 'A':
570  case 'I':
571  if (op == 'A')
572  {
573  if (e->env->reply_to && e->env->reply_to->mailbox)
574  {
575  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_AUTHOR);
576  mutt_format_s(buf + colorlen, buflen - colorlen, prec,
578  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
579  break;
580  }
581  }
582  else
583  {
584  if (mutt_mb_get_initials(mutt_get_name(e->env->from), tmp, sizeof(tmp)))
585  {
586  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_AUTHOR);
587  mutt_format_s(buf + colorlen, buflen - colorlen, prec, tmp);
588  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
589  break;
590  }
591  }
592  /* fallthrough */
593 
594  case 'a':
595  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_AUTHOR);
596  if (e->env->from && e->env->from->mailbox)
597  {
598  mutt_format_s(buf + colorlen, buflen - colorlen, prec,
600  }
601  else
602  mutt_format_s(buf + colorlen, buflen - colorlen, prec, "");
603  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
604  break;
605 
606  case 'B':
607  case 'K':
608  if (!first_mailing_list(buf, buflen, e->env->to) &&
609  !first_mailing_list(buf, buflen, e->env->cc))
610  {
611  buf[0] = '\0';
612  }
613  if (buf[0])
614  {
615  mutt_str_strfcpy(tmp, buf, sizeof(tmp));
616  mutt_format_s(buf, buflen, prec, tmp);
617  break;
618  }
619  if (op == 'K')
620  {
621  if (optional)
622  optional = 0;
623  /* break if 'K' returns nothing */
624  break;
625  }
626  /* if 'B' returns nothing */
627  /* fallthrough */
628 
629  case 'b':
630  if (m)
631  {
632  p = strrchr(m->path, '/');
633  if (p)
634  mutt_str_strfcpy(buf, p + 1, buflen);
635  else
636  mutt_str_strfcpy(buf, m->path, buflen);
637  }
638  else
639  mutt_str_strfcpy(buf, "(null)", buflen);
640  mutt_str_strfcpy(tmp, buf, sizeof(tmp));
641  mutt_format_s(buf, buflen, prec, tmp);
642  break;
643 
644  case 'c':
645  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_SIZE);
646  mutt_str_pretty_size(tmp, sizeof(tmp), (long) e->content->length);
647  mutt_format_s(buf + colorlen, buflen - colorlen, prec, tmp);
648  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
649  break;
650 
651  case 'C':
652  colorlen = add_index_color(fmt, sizeof(fmt), flags, MT_COLOR_INDEX_NUMBER);
653  snprintf(fmt + colorlen, sizeof(fmt) - colorlen, "%%%sd", prec);
654  add_index_color(fmt + colorlen, sizeof(fmt) - colorlen, flags, MT_COLOR_INDEX);
655  snprintf(buf, buflen, fmt, e->msgno + 1);
656  break;
657 
658  case 'd':
659  case 'D':
660  case '{':
661  case '[':
662  case '(':
663  case '<':
664  /* preprocess $date_format to handle %Z */
665  {
666  const char *cp = NULL;
667  struct tm *tm = NULL;
668  time_t now;
669  int j = 0;
670 
671  if (optional && ((op == '[') || (op == '(')))
672  {
673  char *is = NULL;
674  now = time(NULL);
675  tm = localtime(&now);
676  now -= (op == '(') ? e->received : e->date_sent;
677 
678  is = (char *) prec;
679  bool invert = false;
680  if (*is == '>')
681  {
682  invert = true;
683  is++;
684  }
685 
686  while (*is && (*is != '?'))
687  {
688  int t = strtol(is, &is, 10);
689  /* semi-broken (assuming 30 days in all months) */
690  switch (*(is++))
691  {
692  case 'y':
693  if (t > 1)
694  {
695  t--;
696  t *= (60 * 60 * 24 * 365);
697  }
698  t += ((tm->tm_mon * 60 * 60 * 24 * 30) + (tm->tm_mday * 60 * 60 * 24) +
699  (tm->tm_hour * 60 * 60) + (tm->tm_min * 60) + tm->tm_sec);
700  break;
701 
702  case 'm':
703  if (t > 1)
704  {
705  t--;
706  t *= (60 * 60 * 24 * 30);
707  }
708  t += ((tm->tm_mday * 60 * 60 * 24) + (tm->tm_hour * 60 * 60) +
709  (tm->tm_min * 60) + tm->tm_sec);
710  break;
711 
712  case 'w':
713  if (t > 1)
714  {
715  t--;
716  t *= (60 * 60 * 24 * 7);
717  }
718  t += ((tm->tm_wday * 60 * 60 * 24) + (tm->tm_hour * 60 * 60) +
719  (tm->tm_min * 60) + tm->tm_sec);
720  break;
721 
722  case 'd':
723  if (t > 1)
724  {
725  t--;
726  t *= (60 * 60 * 24);
727  }
728  t += ((tm->tm_hour * 60 * 60) + (tm->tm_min * 60) + tm->tm_sec);
729  break;
730 
731  case 'H':
732  if (t > 1)
733  {
734  t--;
735  t *= (60 * 60);
736  }
737  t += ((tm->tm_min * 60) + tm->tm_sec);
738  break;
739 
740  case 'M':
741  if (t > 1)
742  {
743  t--;
744  t *= (60);
745  }
746  t += (tm->tm_sec);
747  break;
748 
749  default:
750  break;
751  }
752  j += t;
753  }
754 
755  if (j < 0)
756  j *= -1;
757 
758  if (((now > j) || (now < (-1 * j))) ^ invert)
759  optional = 0;
760  break;
761  }
762 
763  p = buf;
764 
765  cp = (op == 'd' || op == 'D') ? (NONULL(C_DateFormat)) : src;
766  bool do_locales;
767  if (*cp == '!')
768  {
769  do_locales = false;
770  cp++;
771  }
772  else
773  do_locales = true;
774 
775  size_t len = buflen - 1;
776  while (len > 0 && (((op == 'd' || op == 'D') && *cp) ||
777  (op == '{' && *cp != '}') || (op == '[' && *cp != ']') ||
778  (op == '(' && *cp != ')') || (op == '<' && *cp != '>')))
779  {
780  if (*cp == '%')
781  {
782  cp++;
783  if (((*cp == 'Z') || (*cp == 'z')) && ((op == 'd') || (op == '{')))
784  {
785  if (len >= 5)
786  {
787  sprintf(p, "%c%02u%02u", e->zoccident ? '-' : '+', e->zhours, e->zminutes);
788  p += 5;
789  len -= 5;
790  }
791  else
792  break; /* not enough space left */
793  }
794  else
795  {
796  if (len >= 2)
797  {
798  *p++ = '%';
799  *p++ = *cp;
800  len -= 2;
801  }
802  else
803  break; /* not enough space */
804  }
805  cp++;
806  }
807  else
808  {
809  *p++ = *cp++;
810  len--;
811  }
812  }
813  *p = '\0';
814 
815  if ((op == '[') || (op == 'D'))
816  tm = localtime(&e->date_sent);
817  else if (op == '(')
818  tm = localtime(&e->received);
819  else if (op == '<')
820  {
821  now = time(NULL);
822  tm = localtime(&now);
823  }
824  else
825  {
826  /* restore sender's time zone */
827  now = e->date_sent;
828  if (e->zoccident)
829  now -= (e->zhours * 3600 + e->zminutes * 60);
830  else
831  now += (e->zhours * 3600 + e->zminutes * 60);
832  tm = gmtime(&now);
833  }
834 
835  if (!do_locales)
836  setlocale(LC_TIME, "C");
837  strftime(tmp, sizeof(tmp), buf, tm);
838  if (!do_locales)
839  setlocale(LC_TIME, "");
840 
841  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_DATE);
842  mutt_format_s(buf + colorlen, buflen - colorlen, prec, tmp);
843  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
844 
845  if ((len > 0) && (op != 'd') && (op != 'D')) /* Skip ending op */
846  src = cp + 1;
847  break;
848  }
849 
850  case 'e':
851  snprintf(fmt, sizeof(fmt), "%%%sd", prec);
852  snprintf(buf, buflen, fmt, mutt_messages_in_thread(m, e, 1));
853  break;
854 
855  case 'E':
856  if (!optional)
857  {
858  snprintf(fmt, sizeof(fmt), "%%%sd", prec);
859  snprintf(buf, buflen, fmt, mutt_messages_in_thread(m, e, 0));
860  }
861  else if (mutt_messages_in_thread(m, e, 0) <= 1)
862  optional = 0;
863  break;
864 
865  case 'f':
866  tmp[0] = '\0';
867  mutt_addr_write(tmp, sizeof(tmp), e->env->from, true);
868  mutt_format_s(buf, buflen, prec, tmp);
869  break;
870 
871  case 'F':
872  if (!optional)
873  {
874  const bool is_plain = (src[0] == 'p');
875  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_AUTHOR);
876  make_from(e->env, tmp, sizeof(tmp), false,
877  (is_plain ? MUTT_FORMAT_PLAIN : MUTT_FORMAT_NO_FLAGS));
878  mutt_format_s(buf + colorlen, buflen - colorlen, prec, tmp);
879  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
880 
881  if (is_plain)
882  src++;
883  }
884  else if (mutt_addr_is_user(e->env->from))
885  {
886  optional = 0;
887  }
888  break;
889 
890  case 'g':
891  tags = driver_tags_get_transformed(&e->tags);
892  if (!optional)
893  {
894  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_TAGS);
895  mutt_format_s(buf + colorlen, buflen - colorlen, prec, NONULL(tags));
896  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
897  }
898  else if (!tags)
899  optional = 0;
900  FREE(&tags);
901  break;
902 
903  case 'G':
904  {
905  char format[3];
906  char *tag = NULL;
907 
908  if (!optional)
909  {
910  format[0] = op;
911  format[1] = *src;
912  format[2] = '\0';
913 
914  tag = mutt_hash_find(TagFormats, format);
915  if (tag)
916  {
917  tags = driver_tags_get_transformed_for(tag, &e->tags);
918  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_TAG);
919  mutt_format_s(buf + colorlen, buflen - colorlen, prec, NONULL(tags));
920  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
921  FREE(&tags);
922  }
923  src++;
924  }
925  else
926  {
927  format[0] = op;
928  format[1] = *prec;
929  format[2] = '\0';
930 
931  tag = mutt_hash_find(TagFormats, format);
932  if (tag)
933  {
934  tags = driver_tags_get_transformed_for(tag, &e->tags);
935  if (!tags)
936  optional = 0;
937  FREE(&tags);
938  }
939  }
940  break;
941  }
942 
943  case 'H':
944  /* (Hormel) spam score */
945  if (optional)
946  optional = e->env->spam ? 1 : 0;
947 
948  if (e->env->spam)
949  mutt_format_s(buf, buflen, prec, NONULL(e->env->spam->data));
950  else
951  mutt_format_s(buf, buflen, prec, "");
952  break;
953 
954  case 'i':
955  mutt_format_s(buf, buflen, prec, e->env->message_id ? e->env->message_id : "<no.id>");
956  break;
957 
958  case 'J':
959  {
960  bool have_tags = true;
961  tags = driver_tags_get_transformed(&e->tags);
962  if (tags)
963  {
964  if (flags & MUTT_FORMAT_TREE)
965  {
966  char *parent_tags = NULL;
967  if (e->thread->prev && e->thread->prev->message)
968  {
969  parent_tags = driver_tags_get_transformed(&e->thread->prev->message->tags);
970  }
971  if (!parent_tags && e->thread->parent && e->thread->parent->message)
972  {
973  parent_tags =
975  }
976  if (parent_tags && (mutt_str_strcasecmp(tags, parent_tags) == 0))
977  have_tags = false;
978  FREE(&parent_tags);
979  }
980  }
981  else
982  have_tags = false;
983 
984  if (optional)
985  optional = have_tags;
986 
987  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_TAGS);
988  if (have_tags)
989  mutt_format_s(buf + colorlen, buflen - colorlen, prec, tags);
990  else
991  mutt_format_s(buf + colorlen, buflen - colorlen, prec, "");
992  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
993  FREE(&tags);
994  break;
995  }
996 
997  case 'l':
998  if (!optional)
999  {
1000  snprintf(fmt, sizeof(fmt), "%%%sd", prec);
1001  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_SIZE);
1002  snprintf(buf + colorlen, buflen - colorlen, fmt, (int) e->lines);
1003  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
1004  }
1005  else if (e->lines <= 0)
1006  optional = 0;
1007  break;
1008 
1009  case 'L':
1010  if (!optional)
1011  {
1012  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_AUTHOR);
1013  make_from(e->env, tmp, sizeof(tmp), true, flags);
1014  mutt_format_s(buf + colorlen, buflen - colorlen, prec, tmp);
1015  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
1016  }
1017  else if (!check_for_mailing_list(e->env->to, NULL, NULL, 0) &&
1018  !check_for_mailing_list(e->env->cc, NULL, NULL, 0))
1019  {
1020  optional = 0;
1021  }
1022  break;
1023 
1024  case 'm':
1025  if (m)
1026  {
1027  snprintf(fmt, sizeof(fmt), "%%%sd", prec);
1028  snprintf(buf, buflen, fmt, m->msg_count);
1029  }
1030  else
1031  mutt_str_strfcpy(buf, "(null)", buflen);
1032  break;
1033 
1034  case 'n':
1035  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_AUTHOR);
1036  mutt_format_s(buf + colorlen, buflen - colorlen, prec,
1037  mutt_get_name(e->env->from));
1038  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
1039  break;
1040 
1041  case 'M':
1042  snprintf(fmt, sizeof(fmt), "%%%sd", prec);
1043  if (!optional)
1044  {
1045  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_COLLAPSED);
1046  if (threads && is_index && e->collapsed && (e->num_hidden > 1))
1047  {
1048  snprintf(buf + colorlen, buflen - colorlen, fmt, e->num_hidden);
1049  add_index_color(buf, buflen - colorlen, flags, MT_COLOR_INDEX);
1050  }
1051  else if (is_index && threads)
1052  {
1053  mutt_format_s(buf + colorlen, buflen - colorlen, prec, " ");
1054  add_index_color(buf, buflen - colorlen, flags, MT_COLOR_INDEX);
1055  }
1056  else
1057  *buf = '\0';
1058  }
1059  else
1060  {
1061  if (!(threads && is_index && e->collapsed && (e->num_hidden > 1)))
1062  optional = 0;
1063  }
1064  break;
1065 
1066  case 'N':
1067  if (!optional)
1068  {
1069  snprintf(fmt, sizeof(fmt), "%%%sd", prec);
1070  snprintf(buf, buflen, fmt, e->score);
1071  }
1072  else
1073  {
1074  if (e->score == 0)
1075  optional = 0;
1076  }
1077  break;
1078 
1079  case 'O':
1080  if (!optional)
1081  {
1082  make_from_addr(e->env, tmp, sizeof(tmp), true);
1083  if (!C_SaveAddress && (p = strpbrk(tmp, "%@")))
1084  *p = '\0';
1085  mutt_format_s(buf, buflen, prec, tmp);
1086  }
1087  else if (!check_for_mailing_list_addr(e->env->to, NULL, 0) &&
1088  !check_for_mailing_list_addr(e->env->cc, NULL, 0))
1089  {
1090  optional = 0;
1091  }
1092  break;
1093 
1094  case 'P':
1095  mutt_str_strfcpy(buf, hfi->pager_progress, buflen);
1096  break;
1097 
1098 #ifdef USE_NNTP
1099  case 'q':
1100  mutt_format_s(buf, buflen, prec, e->env->newsgroups ? e->env->newsgroups : "");
1101  break;
1102 #endif
1103 
1104  case 'r':
1105  tmp[0] = '\0';
1106  mutt_addr_write(tmp, sizeof(tmp), e->env->to, true);
1107  if (optional && (tmp[0] == '\0'))
1108  optional = 0;
1109  mutt_format_s(buf, buflen, prec, tmp);
1110  break;
1111 
1112  case 'R':
1113  tmp[0] = '\0';
1114  mutt_addr_write(tmp, sizeof(tmp), e->env->cc, true);
1115  if (optional && (tmp[0] == '\0'))
1116  optional = 0;
1117  mutt_format_s(buf, buflen, prec, tmp);
1118  break;
1119 
1120  case 's':
1121  {
1122  char *subj = NULL;
1123  if (e->env->disp_subj)
1124  subj = e->env->disp_subj;
1125  else if (!STAILQ_EMPTY(&SubjectRegexList))
1126  subj = apply_subject_mods(e->env);
1127  else
1128  subj = e->env->subject;
1129  if (flags & MUTT_FORMAT_TREE && !e->collapsed)
1130  {
1131  if (flags & MUTT_FORMAT_FORCESUBJ)
1132  {
1133  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_SUBJECT);
1134  mutt_format_s(buf + colorlen, buflen - colorlen, "", NONULL(subj));
1135  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
1136  snprintf(tmp, sizeof(tmp), "%s%s", e->tree, buf);
1137  mutt_format_s_tree(buf, buflen, prec, tmp);
1138  }
1139  else
1140  mutt_format_s_tree(buf, buflen, prec, e->tree);
1141  }
1142  else
1143  {
1144  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_SUBJECT);
1145  mutt_format_s(buf + colorlen, buflen - colorlen, prec, NONULL(subj));
1146  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
1147  }
1148  break;
1149  }
1150 
1151  case 'S':
1152  {
1153  const char *wch = NULL;
1154  if (e->deleted)
1156  else if (e->attach_del)
1158  else if (e->tagged)
1160  else if (e->flagged)
1162  else if (e->replied)
1164  else if (e->read && (ctx && (ctx->msgnotreadyet != e->msgno)))
1166  else if (e->old)
1168  else
1170 
1171  snprintf(tmp, sizeof(tmp), "%s", wch);
1172  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_FLAGS);
1173  mutt_format_s(buf + colorlen, buflen - colorlen, prec, tmp);
1174  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
1175  break;
1176  }
1177 
1178  case 't':
1179  tmp[0] = '\0';
1180  if (!check_for_mailing_list(e->env->to, "To ", tmp, sizeof(tmp)) &&
1181  !check_for_mailing_list(e->env->cc, "Cc ", tmp, sizeof(tmp)))
1182  {
1183  if (e->env->to)
1184  snprintf(tmp, sizeof(tmp), "To %s", mutt_get_name(e->env->to));
1185  else if (e->env->cc)
1186  snprintf(tmp, sizeof(tmp), "Cc %s", mutt_get_name(e->env->cc));
1187  }
1188  mutt_format_s(buf, buflen, prec, tmp);
1189  break;
1190 
1191  case 'T':
1192  {
1193  int i;
1194  snprintf(fmt, sizeof(fmt), "%%%ss", prec);
1195  snprintf(buf, buflen, fmt,
1196  (C_ToChars && ((i = user_is_recipient(e))) < C_ToChars->len) ?
1197  C_ToChars->chars[i] :
1198  " ");
1199  break;
1200  }
1201 
1202  case 'u':
1203  if (e->env->from && e->env->from->mailbox)
1204  {
1205  mutt_str_strfcpy(tmp, mutt_addr_for_display(e->env->from), sizeof(tmp));
1206  p = strpbrk(tmp, "%@");
1207  if (p)
1208  *p = '\0';
1209  }
1210  else
1211  tmp[0] = '\0';
1212  mutt_format_s(buf, buflen, prec, tmp);
1213  break;
1214 
1215  case 'v':
1216  if (mutt_addr_is_user(e->env->from))
1217  {
1218  if (e->env->to)
1219  mutt_format_s(tmp, sizeof(tmp), prec, mutt_get_name(e->env->to));
1220  else if (e->env->cc)
1221  mutt_format_s(tmp, sizeof(tmp), prec, mutt_get_name(e->env->cc));
1222  else
1223  *tmp = '\0';
1224  }
1225  else
1226  mutt_format_s(tmp, sizeof(tmp), prec, mutt_get_name(e->env->from));
1227  p = strpbrk(tmp, " %@");
1228  if (p)
1229  *p = '\0';
1230  mutt_format_s(buf, buflen, prec, tmp);
1231  break;
1232 
1233  case 'W':
1234  if (!optional)
1235  {
1236  mutt_format_s(buf, buflen, prec, e->env->organization ? e->env->organization : "");
1237  }
1238  else if (!e->env->organization)
1239  optional = 0;
1240  break;
1241 
1242 #ifdef USE_NNTP
1243  case 'x':
1244  if (!optional)
1245  {
1246  mutt_format_s(buf, buflen, prec, e->env->x_comment_to ? e->env->x_comment_to : "");
1247  }
1248  else if (!e->env->x_comment_to)
1249  optional = 0;
1250  break;
1251 #endif
1252 
1253  case 'X':
1254  {
1255  int count = mutt_count_body_parts(m, e);
1256 
1257  /* The recursion allows messages without depth to return 0. */
1258  if (optional)
1259  optional = count != 0;
1260 
1261  snprintf(fmt, sizeof(fmt), "%%%sd", prec);
1262  snprintf(buf, buflen, fmt, count);
1263  break;
1264  }
1265 
1266  case 'y':
1267  if (optional)
1268  optional = e->env->x_label ? 1 : 0;
1269 
1270  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_LABEL);
1271  mutt_format_s(buf + colorlen, buflen - colorlen, prec, NONULL(e->env->x_label));
1272  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
1273  break;
1274 
1275  case 'Y':
1276  {
1277  bool label = true;
1278  if (e->env->x_label)
1279  {
1280  struct Email *etmp = NULL;
1281  if (flags & MUTT_FORMAT_TREE && (e->thread->prev && e->thread->prev->message &&
1282  e->thread->prev->message->env->x_label))
1283  {
1284  etmp = e->thread->prev->message;
1285  }
1286  else if (flags & MUTT_FORMAT_TREE &&
1287  (e->thread->parent && e->thread->parent->message &&
1288  e->thread->parent->message->env->x_label))
1289  {
1290  etmp = e->thread->parent->message;
1291  }
1292  if (etmp && (mutt_str_strcasecmp(e->env->x_label, etmp->env->x_label) == 0))
1293  label = false;
1294  }
1295  else
1296  label = false;
1297 
1298  if (optional)
1299  optional = label;
1300 
1301  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_LABEL);
1302  if (label)
1303  mutt_format_s(buf + colorlen, buflen - colorlen, prec, NONULL(e->env->x_label));
1304  else
1305  mutt_format_s(buf + colorlen, buflen - colorlen, prec, "");
1306  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
1307  break;
1308  }
1309 
1310  case 'z':
1311  if (src[0] == 's') /* status: deleted/new/old/replied */
1312  {
1313  const char *ch = NULL;
1314  if (e->deleted)
1316  else if (e->attach_del)
1318  else if (threads && thread_is_new(ctx, e))
1320  else if (threads && thread_is_old(ctx, e))
1322  else if (e->read && (ctx && (ctx->msgnotreadyet != e->msgno)))
1323  {
1324  if (e->replied)
1326  else
1328  }
1329  else
1330  {
1331  if (e->old)
1333  else
1335  }
1336 
1337  snprintf(tmp, sizeof(tmp), "%s", ch);
1338  src++;
1339  }
1340  else if (src[0] == 'c') /* crypto */
1341  {
1342  const char *ch = NULL;
1343  if ((WithCrypto != 0) && (e->security & SEC_GOODSIGN))
1345  else if ((WithCrypto != 0) && (e->security & SEC_ENCRYPT))
1347  else if ((WithCrypto != 0) && (e->security & SEC_SIGN))
1349  else if (((WithCrypto & APPLICATION_PGP) != 0) && ((e->security & PGP_KEY) == PGP_KEY))
1350  {
1352  }
1353  else
1355 
1356  snprintf(tmp, sizeof(tmp), "%s", ch);
1357  src++;
1358  }
1359  else if (src[0] == 't') /* tagged, flagged, recipient */
1360  {
1361  const char *ch = NULL;
1362  if (e->tagged)
1364  else if (e->flagged)
1366  else
1368 
1369  snprintf(tmp, sizeof(tmp), "%s", ch);
1370  src++;
1371  }
1372  else /* fallthrough */
1373  break;
1374 
1375  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_FLAGS);
1376  mutt_format_s(buf + colorlen, buflen - colorlen, prec, tmp);
1377  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
1378  break;
1379 
1380  case 'Z':
1381  {
1382  /* New/Old for threads; replied; New/Old for messages */
1383  const char *first = NULL;
1384  if (threads && thread_is_new(ctx, e))
1386  else if (threads && thread_is_old(ctx, e))
1388  else if (e->read && (ctx && (ctx->msgnotreadyet != e->msgno)))
1389  {
1390  if (e->replied)
1392  else
1394  }
1395  else
1396  {
1397  if (e->old)
1399  else
1401  }
1402 
1403  /* Marked for deletion; deleted attachments; crypto */
1404  const char *second = NULL;
1405  if (e->deleted)
1407  else if (e->attach_del)
1409  else if ((WithCrypto != 0) && (e->security & SEC_GOODSIGN))
1411  else if ((WithCrypto != 0) && (e->security & SEC_ENCRYPT))
1413  else if ((WithCrypto != 0) && (e->security & SEC_SIGN))
1415  else if (((WithCrypto & APPLICATION_PGP) != 0) && (e->security & PGP_KEY))
1417  else
1419 
1420  /* Tagged, flagged and recipient flag */
1421  const char *third = NULL;
1422  if (e->tagged)
1424  else if (e->flagged)
1426  else
1428 
1429  snprintf(tmp, sizeof(tmp), "%s%s%s", first, second, third);
1430  }
1431 
1432  colorlen = add_index_color(buf, buflen, flags, MT_COLOR_INDEX_FLAGS);
1433  mutt_format_s(buf + colorlen, buflen - colorlen, prec, tmp);
1434  add_index_color(buf + colorlen, buflen - colorlen, flags, MT_COLOR_INDEX);
1435  break;
1436 
1437  default:
1438  snprintf(buf, buflen, "%%%s%c", prec, op);
1439  break;
1440  }
1441 
1442  if (optional)
1443  {
1444  mutt_expando_format(buf, buflen, col, cols, if_str, index_format_str,
1445  (unsigned long) hfi, flags);
1446  }
1447  else if (flags & MUTT_FORMAT_OPTIONAL)
1448  {
1449  mutt_expando_format(buf, buflen, col, cols, else_str, index_format_str,
1450  (unsigned long) hfi, flags);
1451  }
1452 
1453  return src;
1454 }
Index: subject field (takes a pattern)
Definition: mutt_curses.h:159
struct Context * ctx
Definition: hdrline.h:45
The "current" mailbox.
Definition: context.h:37
Character denoting a tagged email.
Definition: hdrline.c:69
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t *callback, unsigned long data, MuttFormatFlags flags)
Expand expandos (x) in a string.
Definition: muttlib.c:811
Character denoting a important (flagged) email.
Definition: hdrline.c:70
int lines
how many lines in the body of this message?
Definition: email.h:87
#define NONULL(x)
Definition: string2.h:36
int msg_count
total number of messages
Definition: mailbox.h:93
The envelope/body of an email.
Definition: email.h:37
char ** chars
The array of multibyte character strings.
Definition: mbtable.h:39
Index: tags field (g, J)
Definition: mutt_curses.h:166
#define MUTT_FORMAT_FORCESUBJ
Print the subject even if unchanged.
Definition: format_flags.h:31
struct Address * to
Definition: envelope.h:42
struct MuttThread * thread
Definition: email.h:97
static bool thread_is_new(struct Context *ctx, struct Email *e)
Does the email thread contain any new emails?
Definition: hdrline.c:475
char * disp_subj
display subject (modified copy of subject)
Definition: envelope.h:52
Character denoting a thread containing at least one new email.
Definition: hdrline.c:77
bool attach_del
has an attachment marked for deletion
Definition: email.h:49
struct Body * content
list of MIME parts
Definition: email.h:93
int msgnotreadyet
which msg "new" in pager, -1 if none
Definition: context.h:45
void * mutt_hash_find(const struct Hash *table, const char *strkey)
Find the HashElem data in a Hash table element using a key.
Definition: hash.c:373
WHERE struct Hash * TagFormats
Hash table of tag-formats (tag -> format string)
Definition: globals.h:59
Character denoting a message contains a PGP key.
Definition: hdrline.c:90
struct MuttThread * parent
Definition: thread.h:44
char * mailbox
mailbox and host address
Definition: address.h:35
Character denoting a read email, $index_format S expando.
Definition: hdrline.c:78
struct TagHead tags
for drivers that support server tagging
Definition: email.h:110
char * driver_tags_get_transformed(struct TagHead *head)
Get transformed tags.
Definition: tags.c:138
#define SEC_ENCRYPT
Email is encrypted.
Definition: ncrypt.h:120
bool zoccident
Definition: email.h:66
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
Definition: format_flags.h:30
struct MbTable * C_ToChars
Config: Indicator characters for the &#39;To&#39; field in the index.
Definition: hdrline.c:62
static char * apply_subject_mods(struct Envelope *env)
Apply regex modifications to the subject.
Definition: hdrline.c:451
static bool check_for_mailing_list(struct Address *addr, const char *pfx, char *buf, int buflen)
Search list of addresses for a mailing list.
Definition: hdrline.c:133
struct Address * reply_to
Definition: envelope.h:46
static void make_from(struct Envelope *env, char *buf, size_t buflen, bool do_lists, MuttFormatFlags flags)
Generate a From: field (with optional prefix)
Definition: hdrline.c:305
size_t mutt_addr_write(char *buf, size_t buflen, struct Address *addr, bool display)
Write an Address to a buffer.
Definition: address.c:1146
bool tagged
Definition: email.h:44
bool read
Definition: email.h:51
char * message_id
Definition: envelope.h:53
struct MuttThread * prev
Definition: thread.h:47
#define MUTT_FORMAT_TREE
Draw the thread tree.
Definition: format_flags.h:32
bool old
Definition: email.h:50
Data passed to index_format_str()
Definition: hdrline.h:43
#define SEC_GOODSIGN
Email has a valid signature.
Definition: ncrypt.h:122
Index: default colour (takes a pattern)
Definition: mutt_curses.h:155
struct Envelope * env
envelope information
Definition: email.h:92
Character denoting a deleted attachment.
Definition: hdrline.c:72
struct Mailbox * mailbox
Definition: hdrline.h:46
Index: index number.
Definition: mutt_curses.h:164
Character denoting an email that has been read.
Definition: hdrline.c:74
static int user_is_recipient(struct Email *e)
Is the user a recipient of the message.
Definition: hdrline.c:410
Character denoting a thread of emails that has been read.
Definition: hdrline.c:76
static bool first_mailing_list(char *buf, size_t buflen, struct Address *a)
Get the first mailing list in the list of addresses.
Definition: hdrline.c:177
WHERE short C_Sort
Config: Sort method for the index.
Definition: sort.h:58
struct Address * from
Definition: envelope.h:41
int flags
e.g.
Definition: mailbox.h:135
int score
Definition: email.h:91
time_t date_sent
time when the message was sent (UTC)
Definition: email.h:84
static void make_from_addr(struct Envelope *hdr, char *buf, size_t buflen, bool do_lists)
Create a &#39;from&#39; address for a reply email.
Definition: hdrline.c:361
char * x_comment_to
Definition: envelope.h:62
Index: tag field (g, takes a pattern)
Definition: mutt_curses.h:158
#define SEC_SIGN
Email is signed.
Definition: ncrypt.h:121
Index: flags field (takes a pattern)
Definition: mutt_curses.h:157
Character denoting an email that has been replied to.
Definition: hdrline.c:73
Index: date field.
Definition: mutt_curses.h:162
LOFF_T length
length (in bytes) of attachment
Definition: body.h:47
A mailbox.
Definition: mailbox.h:83
size_t num_hidden
number of hidden messages in this view
Definition: email.h:78
#define PGP_KEY
Definition: ncrypt.h:138
static bool thread_is_old(struct Context *ctx, struct Email *e)
Does the email thread contain any unread emails?
Definition: hdrline.c:487
Index: author field (takes a pattern)
Definition: mutt_curses.h:156
Character denoting a message signed with a verified key.
Definition: hdrline.c:87
char * data
pointer to data
Definition: buffer.h:35
bool mutt_mb_get_initials(const char *name, char *buf, size_t buflen)
Turn a name into initials.
Definition: mbyte.c:84
size_t mutt_str_strfcpy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:741
static size_t add_index_color(char *buf, size_t buflen, MuttFormatFlags flags, char color)
Insert a color marker into a string.
Definition: hdrline.c:200
bool collapsed
is this message part of a collapsed thread?
Definition: email.h:76
char * driver_tags_get_transformed_for(const char *name, struct TagHead *head)
Get transformed tag for a tag name from a header.
Definition: tags.c:177
Character denoting a message is PGP-encrypted.
Definition: hdrline.c:88
int mutt_messages_in_thread(struct Mailbox *m, struct Email *e, int flag)
Count the messages in a thread.
Definition: mutt_thread.c:1392
unsigned int zhours
Definition: email.h:64
char * tree
character string to print thread tree
Definition: email.h:96
SecurityFlags security
bit 0-8: flags, bit 9,10: application.
Definition: email.h:39
struct Email * message
Definition: thread.h:48
static const char * get_nth_wchar(struct MbTable *table, int index)
Extract one char from a multi-byte table.
Definition: hdrline.c:252
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: ncrypt.h:129
char path[PATH_MAX]
Definition: mailbox.h:85
Character denoting a read email, $index_format Z expando.
Definition: hdrline.c:79
#define MUTT_FORMAT_INDEX
This is a main index entry.
Definition: format_flags.h:36
const char * mutt_get_name(struct Address *a)
Pick the best name to display from an address.
Definition: sort.c:153
struct Buffer * spam
Definition: envelope.h:64
char * subject
Definition: envelope.h:50
void mutt_format_s(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string.
Definition: curs_lib.c:1061
#define MUTT_FORMAT_PLAIN
Do not prepend DISP_TO, DISP_CC ...
Definition: format_flags.h:38
bool flagged
marked important?
Definition: email.h:43
char * newsgroups
Definition: envelope.h:59
Character denoting a deleted email.
Definition: hdrline.c:71
struct MbTable * C_FlagChars
Config: User-configurable index flags: tagged, new, etc.
Definition: hdrline.c:60
bool deleted
Definition: email.h:45
Index: size field.
Definition: mutt_curses.h:165
bool replied
Definition: email.h:54
int mutt_str_strcasecmp(const char *a, const char *b)
Compare two strings ignoring case, safely.
Definition: string.c:624
WHERE char * C_DateFormat
Config: strftime format string for the d expando.
Definition: globals.h:109
const char * mutt_addr_for_display(struct Address *a)
Convert an Address for display purposes.
Definition: address.c:986
Character denoting an unread email.
Definition: hdrline.c:75
Character denoting a message has no cryptography information.
Definition: hdrline.c:91
#define FREE(x)
Definition: memory.h:40
const char * pager_progress
Definition: hdrline.h:48
char * organization
Definition: envelope.h:57
Character denoting a message is signed.
Definition: hdrline.c:89
#define STAILQ_EMPTY(head)
Definition: queue.h:346
#define MUTT_FORMAT_OPTIONAL
Allow optional field processing.
Definition: format_flags.h:33
Index: number of messages in collapsed thread.
Definition: mutt_curses.h:161
Index: label field.
Definition: mutt_curses.h:163
int mutt_count_body_parts(struct Mailbox *m, struct Email *e)
Count the MIME Body parts.
Definition: mutt_parse.c:216
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
Definition: string.c:1014
static bool check_for_mailing_list_addr(struct Address *addr, char *buf, int buflen)
Check an address list for a mailing list.
Definition: hdrline.c:156
struct MbTable * C_CryptChars
Config: User-configurable crypto flags: signed, encrypted etc.
Definition: hdrline.c:59
struct Email * email
Definition: hdrline.h:47
Sort by email threads.
Definition: sort.h:56
char * x_label
Definition: envelope.h:56
#define WithCrypto
Definition: ncrypt.h:155
#define SORT_MASK
Mask for the sort id.
Definition: sort.h:85
unsigned int zminutes
Definition: email.h:65
time_t received
time when the message was placed in the mailbox
Definition: email.h:85
struct Address * cc
Definition: envelope.h:43
WHERE bool C_SaveAddress
Config: Use sender&#39;s full address as a default save folder.
Definition: globals.h:254
bool mutt_addr_is_user(struct Address *addr)
Does the address belong to the user.
Definition: alias.c:678
int len
Number of characters.
Definition: mbtable.h:38
void mutt_format_s_tree(char *buf, size_t buflen, const char *prec, const char *s)
Format a simple string with tree characters.
Definition: curs_lib.c:1073
int msgno
number displayed to the user
Definition: email.h:89
static const char * index_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, unsigned long data, MuttFormatFlags flags)
Format a string for the index list - Implements format_t.
Definition: hdrline.c:548

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mutt_make_string_flags ( char *  buf,
size_t  buflen,
const char *  s,
struct Context ctx,
struct Mailbox m,
struct Email e,
MuttFormatFlags  flags 
)

Create formatted strings using mailbox expandos.

Parameters
bufBuffer for the result
buflenBuffer length
sprintf-line format string
ctxMailbox Context
mMailbox
eEmail
flagsFlags, see MuttFormatFlags

Definition at line 1466 of file hdrline.c.

1468 {
1469  struct HdrFormatInfo hfi;
1470 
1471  hfi.email = e;
1472  hfi.ctx = ctx;
1473  hfi.mailbox = m;
1474  hfi.pager_progress = 0;
1475 
1476  mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, s,
1477  index_format_str, (unsigned long) &hfi, flags);
1478 }
struct Context * ctx
Definition: hdrline.h:45
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t *callback, unsigned long data, MuttFormatFlags flags)
Expand expandos (x) in a string.
Definition: muttlib.c:811
struct Mailbox * mailbox
Definition: context.h:51
Data passed to index_format_str()
Definition: hdrline.h:43
struct MuttWindow * MuttIndexWindow
Index Window.
Definition: mutt_window.c:39
struct Email * email
Definition: hdrline.h:47
static const char * index_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, unsigned long data, MuttFormatFlags flags)
Format a string for the index list - Implements format_t.
Definition: hdrline.c:548

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mutt_make_string_info ( char *  buf,
size_t  buflen,
int  cols,
const char *  s,
struct HdrFormatInfo hfi,
MuttFormatFlags  flags 
)

Create pager status bar string.

Parameters
bufBuffer for the result
buflenBuffer length
colsNumber of screen columns
sprintf-line format string
hfiMailbox data to pass to the formatter
flagsFlags, see MuttFormatFlags

Definition at line 1489 of file hdrline.c.

1491 {
1492  mutt_expando_format(buf, buflen, 0, cols, s, index_format_str, (unsigned long) hfi, flags);
1493 }
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t *callback, unsigned long data, MuttFormatFlags flags)
Expand expandos (x) in a string.
Definition: muttlib.c:811
static const char * index_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, unsigned long data, MuttFormatFlags flags)
Format a string for the index list - Implements format_t.
Definition: hdrline.c:548

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct MbTable* C_CryptChars

Config: User-configurable crypto flags: signed, encrypted etc.

Definition at line 59 of file hdrline.c.

struct MbTable* C_FlagChars

Config: User-configurable index flags: tagged, new, etc.

Definition at line 60 of file hdrline.c.

struct MbTable* C_FromChars

Config: User-configurable index flags: to address, cc address, etc.

Definition at line 61 of file hdrline.c.

struct MbTable* C_ToChars

Config: Indicator characters for the 'To' field in the index.

Definition at line 62 of file hdrline.c.