NeoMutt
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
hdrline.h File Reference

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

#include <stdio.h>
#include "format_flags.h"
+ Include dependency graph for hdrline.h:
+ This graph shows which files directly or indirectly include this file:

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 $flag_chars config variable. 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 $crypt_chars config variable. More...
 
enum  ToChars {
  FLAG_CHAR_TO_NOT_IN_THE_LIST , FLAG_CHAR_TO_UNIQUE , FLAG_CHAR_TO_TO , FLAG_CHAR_TO_CC ,
  FLAG_CHAR_TO_ORIGINATOR , FLAG_CHAR_TO_SUBSCRIBED_LIST , FLAG_CHAR_TO_REPLY_TO
}
 Index into the $to_chars config variable. More...
 

Functions

void mutt_make_string (char *buf, size_t buflen, int cols, const char *s, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
 Create formatted strings using mailbox expandos.
 

Detailed Description

String processing routines to generate the mail index.

Authors
  • Richard Russon
  • Pietro Cerutti

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.h.

Enumeration Type Documentation

◆ FlagChars

enum FlagChars

Index into the $flag_chars config variable.

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 36 of file hdrline.h.

37{
49};
@ FLAG_CHAR_OLD
Character denoting an email that has been read.
Definition: hdrline.h:43
@ FLAG_CHAR_REPLIED
Character denoting an email that has been replied to.
Definition: hdrline.h:42
@ FLAG_CHAR_OLD_THREAD
Character denoting a thread of emails that has been read.
Definition: hdrline.h:45
@ FLAG_CHAR_ZEMPTY
Character denoting a read email, $index_format Z expando.
Definition: hdrline.h:48
@ FLAG_CHAR_TAGGED
Character denoting a tagged email.
Definition: hdrline.h:38
@ FLAG_CHAR_NEW
Character denoting an unread email.
Definition: hdrline.h:44
@ FLAG_CHAR_DELETED
Character denoting a deleted email.
Definition: hdrline.h:40
@ FLAG_CHAR_NEW_THREAD
Character denoting a thread containing at least one new email.
Definition: hdrline.h:46
@ FLAG_CHAR_DELETED_ATTACH
Character denoting a deleted attachment.
Definition: hdrline.h:41
@ FLAG_CHAR_SEMPTY
Character denoting a read email, $index_format S expando.
Definition: hdrline.h:47
@ FLAG_CHAR_IMPORTANT
Character denoting a important (flagged) email.
Definition: hdrline.h:39

◆ CryptChars

enum CryptChars

Index into the $crypt_chars config variable.

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 54 of file hdrline.h.

55{
61};
@ FLAG_CHAR_CRYPT_CONTAINS_KEY
Character denoting a message contains a PGP key.
Definition: hdrline.h:59
@ FLAG_CHAR_CRYPT_SIGNED
Character denoting a message is signed.
Definition: hdrline.h:58
@ FLAG_CHAR_CRYPT_NO_CRYPTO
Character denoting a message has no cryptography information.
Definition: hdrline.h:60
@ FLAG_CHAR_CRYPT_GOOD_SIGN
Character denoting a message signed with a verified key.
Definition: hdrline.h:56
@ FLAG_CHAR_CRYPT_ENCRYPTED
Character denoting a message is PGP-encrypted.
Definition: hdrline.h:57

◆ ToChars

enum ToChars

Index into the $to_chars config variable.

Enumerator
FLAG_CHAR_TO_NOT_IN_THE_LIST 

Character denoting that the user is not in list.

FLAG_CHAR_TO_UNIQUE 

Character denoting that the user is unique recipient.

FLAG_CHAR_TO_TO 

Character denoting that the user is in the TO list.

FLAG_CHAR_TO_CC 

Character denoting that the user is in the CC list.

FLAG_CHAR_TO_ORIGINATOR 

Character denoting that the user is originator.

FLAG_CHAR_TO_SUBSCRIBED_LIST 

Character denoting that the message is sent to a subscribed mailing list.

FLAG_CHAR_TO_REPLY_TO 

Character denoting that the user is in the Reply-To list.

Definition at line 66 of file hdrline.h.

67{
75};
@ FLAG_CHAR_TO_ORIGINATOR
Character denoting that the user is originator.
Definition: hdrline.h:72
@ FLAG_CHAR_TO_UNIQUE
Character denoting that the user is unique recipient.
Definition: hdrline.h:69
@ FLAG_CHAR_TO_NOT_IN_THE_LIST
Character denoting that the user is not in list.
Definition: hdrline.h:68
@ FLAG_CHAR_TO_TO
Character denoting that the user is in the TO list.
Definition: hdrline.h:70
@ FLAG_CHAR_TO_CC
Character denoting that the user is in the CC list.
Definition: hdrline.h:71
@ FLAG_CHAR_TO_REPLY_TO
Character denoting that the user is in the Reply-To list.
Definition: hdrline.h:74
@ FLAG_CHAR_TO_SUBSCRIBED_LIST
Character denoting that the message is sent to a subscribed mailing list.
Definition: hdrline.h:73

Function Documentation

◆ mutt_make_string()

void mutt_make_string ( char *  buf,
size_t  buflen,
int  cols,
const char *  s,
struct Mailbox m,
int  inpgr,
struct Email e,
MuttFormatFlags  flags,
const char *  progress 
)

Create formatted strings using mailbox expandos.

Parameters
bufBuffer for the result
buflenBuffer length
colsNumber of screen columns (OPTIONAL)
sprintf-line format string
mMailbox
inpgrMessage shown in the pager
eEmail
flagsFlags, see MuttFormatFlags
progressPager progress string
See also
index_format_str()

Definition at line 1426 of file hdrline.c.

1429{
1430 struct HdrFormatInfo hfi = { 0 };
1431
1432 hfi.email = e;
1433 hfi.mailbox = m;
1434 hfi.msg_in_pager = inpgr;
1435 hfi.pager_progress = progress;
1436
1437 mutt_expando_format(buf, buflen, 0, cols, s, index_format_str, (intptr_t) &hfi, flags);
1438}
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t callback, intptr_t data, MuttFormatFlags flags)
Expand expandos (x) in a string -.
Definition: muttlib.c:745
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, intptr_t data, MuttFormatFlags flags)
Format a string for the index list - Implements format_t -.
Definition: hdrline.c:393
Data passed to index_format_str()
Definition: hdrline.c:66
struct Email * email
Current Email.
Definition: hdrline.c:69
int msg_in_pager
Index of Email displayed in the Pager.
Definition: hdrline.c:68
struct Mailbox * mailbox
Current Mailbox.
Definition: hdrline.c:67
const char * pager_progress
String representing Pager position through Email.
Definition: hdrline.c:70
+ Here is the call graph for this function:
+ Here is the caller graph for this function: