NeoMutt  2024-10-02-37-gfa9146
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 <stddef.h>
#include "expando/lib.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

int mutt_make_string (struct Buffer *buf, size_t max_cols, const struct Expando *exp, 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
  • Tóth János

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

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

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

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

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

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

Function Documentation

◆ mutt_make_string()

int mutt_make_string ( struct Buffer buf,
size_t  max_cols,
const struct Expando exp,
struct Mailbox m,
int  inpgr,
struct Email e,
MuttFormatFlags  flags,
const char *  progress 
)

Create formatted strings using mailbox expandos.

Parameters
bufBuffer for the result
max_colsNumber of screen columns (-1 means unlimited)
expExpando containing expando tree
mMailbox
inpgrMessage shown in the pager
eEmail
flagsFlags, see MuttFormatFlags
progressPager progress string
Return values
numNumber of screen columns used

Definition at line 1719 of file hdrline.c.

1722{
1723 if (!exp)
1724 return 0;
1725
1726 struct HdrFormatInfo hfi = { 0 };
1727
1728 hfi.email = e;
1729 hfi.mailbox = m;
1730 hfi.msg_in_pager = inpgr;
1731 hfi.pager_progress = progress;
1732
1733 return expando_filter(exp, IndexRenderData, &hfi, flags, max_cols, buf);
1734}
int expando_filter(const struct Expando *exp, const struct ExpandoRenderData *rdata, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Render an Expando and run the result through a filter.
Definition: filter.c:138
const struct ExpandoRenderData IndexRenderData[]
Callbacks for Index Expandos.
Definition: hdrline.c:65
Data passed to index_format_str()
Definition: hdrline.c:71
struct Email * email
Current Email.
Definition: hdrline.c:74
int msg_in_pager
Index of Email displayed in the Pager.
Definition: hdrline.c:73
struct Mailbox * mailbox
Current Mailbox.
Definition: hdrline.c:72
const char * pager_progress
String representing Pager position through Email.
Definition: hdrline.c:75
+ Here is the call graph for this function:
+ Here is the caller graph for this function: