NeoMutt  2024-11-14-138-ge5ca67
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
Expando Get Number API

Get some numeric data. More...

+ Collaboration diagram for Expando Get Number API:

Functions

static long alias_view_flags_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 AliasView: Flags - Implements get_number_t -.
 
static long alias_view_index_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 AliasView: Index number - Implements get_number_t -.
 
static long alias_view_tagged_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 AliasView: Tagged char - Implements get_number_t -.
 
static long attach_number_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Attachment: Index number - Implements get_number_t -.
 
static long body_attach_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Body: Number of MIME parts - Implements get_number_t -.
 
static long body_attach_qualifies_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Body: Attachment counting - Implements get_number_t -.
 
static long body_deleted_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Body: Deleted - Implements get_number_t -.
 
static long body_file_size_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Body: Size - Implements get_number_t -.
 
static long body_tagged_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Body: Is Tagged - Implements get_number_t -.
 
static long body_unlink_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Body: Unlink flag - Implements get_number_t -.
 
static long autocrypt_number_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Autocrypt: Index number - Implements get_number_t -.
 
static long folder_date_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: Last modified - Implements get_number_t -.
 
static long folder_date_format_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: Last modified ($date_format) - Implements get_number_t -.
 
static long folder_date_strf_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: Last modified (strftime) - Implements get_number_t -.
 
static long folder_file_size_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: Size in bytes - Implements get_number_t -.
 
static long folder_hard_links_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: Hard links - Implements get_number_t -.
 
static long folder_message_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: Number of messages - Implements get_number_t -.
 
static long folder_new_mail_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: New mail flag - Implements get_number_t -.
 
static long folder_notify_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: Alert for new mail - Implements get_number_t -.
 
static long folder_number_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: Index number - Implements get_number_t -.
 
static long folder_poll_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: Poll for new mail - Implements get_number_t -.
 
static long folder_tagged_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: Is Tagged - Implements get_number_t -.
 
static long folder_unread_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Browser: Number of unread messages - Implements get_number_t -.
 
static long compose_attach_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Compose: Number of attachments - Implements get_number_t -.
 
static long compose_attach_size_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Compose: Size in bytes - Implements get_number_t -.
 
static long history_number (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 History: Index number - Implements get_number_t -.
 
static long email_attachment_count (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Number of MIME attachments - Implements get_number_t -.
 
static long email_date_format_local_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Local Date and time - Implements get_number_t -.
 
static long email_date_format_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Senders Date and time - Implements get_number_t -.
 
static long email_date_strf_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Sender's date and time - Implements get_number_t -.
 
static long email_date_strf_local_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Local date and time - Implements get_number_t -.
 
static long email_lines (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Number of lines - Implements get_number_t -.
 
static long email_number (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Index number - Implements get_number_t -.
 
static long email_score (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Message score - Implements get_number_t -.
 
static long email_size_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Number of bytes - Implements get_number_t -.
 
static long email_strf_recv_local_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Local received date and time - Implements get_number_t -.
 
static long email_thread_count (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Number of messages thread - Implements get_number_t -.
 
static long email_thread_hidden_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Number of hidden messages - Implements get_number_t -.
 
static long email_thread_number (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Thread index number - Implements get_number_t -.
 
static long mailbox_message_count (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Index: Total number of message - Implements get_number_t -.
 
static long index_deleted_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Number of deleted messages - Implements get_number_t -.
 
static long index_flagged_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Number of flagged messages - Implements get_number_t -.
 
static long index_limit_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Number of messages - Implements get_number_t -.
 
static long index_limit_size_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Size of the messages - Implements get_number_t -.
 
static long index_mailbox_size_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Size of the current mailbox - Implements get_number_t -.
 
static long index_message_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Number of messages in the mailbox - Implements get_number_t -.
 
static long index_new_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Number of new messages - Implements get_number_t -.
 
static long index_old_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Number of old messages - Implements get_number_t -.
 
static long index_postponed_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Number of postponed messages - Implements get_number_t -.
 
static long index_read_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Number of read messages - Implements get_number_t -.
 
static long index_tagged_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Number of tagged messages - Implements get_number_t -.
 
static long index_unread_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Number of unread messages - Implements get_number_t -.
 
static long index_unread_mailboxes_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Number of mailboxes with new mail - Implements get_number_t -.
 
static long menu_percentage_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Status: Percentage through index - Implements get_number_t -.
 
static long gpgme_entry_number_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 GPGME: Index number - Implements get_number_t -.
 
static long gpgme_key_date_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 GPGME: Date of the key - Implements get_number_t -.
 
static long gpgme_key_length_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 GPGME: Key length - Implements get_number_t -.
 
static long pgp_entry_number_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 PGP: Index number - Implements get_number_t -.
 
static long pgp_key_date_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 PGP: Date of the key - Implements get_number_t -.
 
static long pgp_key_length_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 PGP: Key length - Implements get_number_t -.
 
static long pgp_pkey_length_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 PGP: Principal Key length - Implements get_number_t -.
 
static long group_index_notify_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 NNTP: Alert for new mail - Implements get_number_t -.
 
static long group_index_new_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 NNTP: Number of new articles - Implements get_number_t -.
 
static long group_index_number_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 NNTP: Index number - Implements get_number_t -.
 
static long group_index_poll_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 NNTP: Poll for new mail - Implements get_number_t -.
 
static long group_index_unread_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 NNTP: Number of unread articles - Implements get_number_t -.
 
static long nntp_port (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Newsrc: Port - Implements get_number_t -.
 
static long nntp_port_if_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Newsrc: Port if specified - Implements get_number_t -.
 
static long pattern_number_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Pattern: Index number - Implements get_number_t -.
 
static long sidebar_deleted_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: Number of deleted messages - Implements get_number_t -.
 
static long sidebar_flagged_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: Number of flagged messages - Implements get_number_t -.
 
static long sidebar_limited_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: Number of limited messages - Implements get_number_t -.
 
static long sidebar_message_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: number of messages - Implements get_number_t -.
 
static long sidebar_new_mail_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: New mail flag - Implements get_number_t -.
 
static long sidebar_notify_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: Alert for new mail - Implements get_number_t -.
 
static long sidebar_old_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: Number of old messages - Implements get_number_t -.
 
static long sidebar_poll_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: Poll for new mail - Implements get_number_t -.
 
static long sidebar_read_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: Number of read messages - Implements get_number_t -.
 
static long sidebar_tagged_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: Number of tagged messages - Implements get_number_t -.
 
static long sidebar_unread_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: Number of unread messages - Implements get_number_t -.
 
static long sidebar_unseen_count_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: Number of new messages - Implements get_number_t -.
 

Detailed Description

Get some numeric data.

Parameters
[in]nodeExpandoNode containing the callback
[in]dataPrivate data
[in]flagsFlags, see MuttFormatFlags
Return values
numData as a number

Get some numeric data to be formatted.

Function Documentation

◆ alias_view_flags_num()

static long alias_view_flags_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

AliasView: Flags - Implements get_number_t -.

Definition at line 144 of file expando.c.

145{
146 const struct AliasView *av = data;
147 return av->is_deleted;
148}
GUI data wrapping an Alias.
Definition: gui.h:38
bool is_deleted
Is it deleted?
Definition: gui.h:44

◆ alias_view_index_num()

static long alias_view_index_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

AliasView: Index number - Implements get_number_t -.

Definition at line 153 of file expando.c.

154{
155 const struct AliasView *av = data;
156
157 return av->num + 1;
158}
int num
Index number in list.
Definition: gui.h:39

◆ alias_view_tagged_num()

static long alias_view_tagged_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

AliasView: Tagged char - Implements get_number_t -.

Definition at line 176 of file expando.c.

177{
178 const struct AliasView *av = data;
179 return av->is_tagged;
180}
bool is_tagged
Is it tagged?
Definition: gui.h:43

◆ attach_number_num()

static long attach_number_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Attachment: Index number - Implements get_number_t -.

Definition at line 64 of file expando.c.

65{
66 const struct AttachPtr *aptr = data;
67
68 return aptr->num + 1;
69}
An email to which things will be attached.
Definition: attach.h:35
int num
Attachment index number.
Definition: attach.h:41

◆ body_attach_count_num()

static long body_attach_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Body: Number of MIME parts - Implements get_number_t -.

Definition at line 88 of file expando.c.

89{
90 const struct AttachPtr *aptr = data;
91 const struct Body *body = aptr->body;
92
93 return body->attach_count + body->attach_qualifies;
94}
struct Body * body
Attachment.
Definition: attach.h:36
The body of an email.
Definition: body.h:36
signed short attach_count
Number of attachments.
Definition: body.h:91
struct AttachPtr * aptr
Menu information, used in recvattach.c.
Definition: body.h:75
bool attach_qualifies
This attachment should be counted.
Definition: body.h:87

◆ body_attach_qualifies_num()

static long body_attach_qualifies_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Body: Attachment counting - Implements get_number_t -.

Definition at line 112 of file expando.c.

114{
115 const struct AttachPtr *aptr = data;
116 return aptr->body->attach_qualifies;
117}

◆ body_deleted_num()

static long body_deleted_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Body: Deleted - Implements get_number_t -.

Definition at line 148 of file expando.c.

149{
150 const struct AttachPtr *aptr = data;
151 return aptr->body->deleted;
152}
bool deleted
Attachment marked for deletion.
Definition: body.h:88

◆ body_file_size_num()

static long body_file_size_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Body: Size - Implements get_number_t -.

Definition at line 283 of file expando.c.

284{
285 const struct AttachPtr *aptr = data;
286
287 if (aptr->body->filename && (flags & MUTT_FORMAT_STAT_FILE))
288 return mutt_file_get_size(aptr->body->filename);
289
290 return aptr->body->length;
291}
long mutt_file_get_size(const char *path)
Get the size of a file.
Definition: file.c:1519
#define MUTT_FORMAT_STAT_FILE
Used by attach_format_str.
Definition: render.h:36
LOFF_T length
length (in bytes) of attachment
Definition: body.h:53
char * filename
When sending a message, this is the file to which this structure refers.
Definition: body.h:59
+ Here is the call graph for this function:

◆ body_tagged_num()

static long body_tagged_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Body: Is Tagged - Implements get_number_t -.

Definition at line 345 of file expando.c.

346{
347 const struct AttachPtr *aptr = data;
348 return aptr->body->tagged;
349}
bool tagged
This attachment is tagged.
Definition: body.h:90

◆ body_unlink_num()

static long body_unlink_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Body: Unlink flag - Implements get_number_t -.

Definition at line 367 of file expando.c.

368{
369 const struct AttachPtr *aptr = data;
370 return aptr->body->unlink;
371}
bool unlink
If true, filename should be unlink()ed before free()ing this structure.
Definition: body.h:68

◆ autocrypt_number_num()

static long autocrypt_number_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Autocrypt: Index number - Implements get_number_t -.

Definition at line 86 of file expando.c.

87{
88 const struct AccountEntry *entry = data;
89
90 return entry->num;
91}
An entry in the Autocrypt account Menu.
Definition: private.h:46
int num
Number in the index.
Definition: private.h:47

◆ folder_date_num()

static long folder_date_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: Last modified - Implements get_number_t -.

Definition at line 69 of file expando.c.

70{
71 const struct Folder *folder = data;
72 if (!folder->ff->local)
73 return 0;
74
75 return folder->ff->mtime;
76}
time_t mtime
Modification time.
Definition: lib.h:81
A folder/dir in the browser.
Definition: lib.h:69
struct FolderFile * ff
File / Dir / Mailbox.
Definition: lib.h:70

◆ folder_date_format_num()

static long folder_date_format_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: Last modified ($date_format) - Implements get_number_t -.

Definition at line 114 of file expando.c.

115{
116 const struct Folder *folder = data;
117 if (!folder->ff->local)
118 return 0;
119
120 return folder->ff->mtime;
121}

◆ folder_date_strf_num()

static long folder_date_strf_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: Last modified (strftime) - Implements get_number_t -.

Definition at line 160 of file expando.c.

161{
162 const struct Folder *folder = data;
163
164 if (!folder->ff->local)
165 return 0;
166
167 return folder->ff->mtime;
168}

◆ folder_file_size_num()

static long folder_file_size_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: Size in bytes - Implements get_number_t -.

Definition at line 308 of file expando.c.

309{
310 const struct Folder *folder = data;
311 return folder->ff->size;
312}
off_t size
File size.
Definition: lib.h:80

◆ folder_hard_links_num()

static long folder_hard_links_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: Hard links - Implements get_number_t -.

Definition at line 330 of file expando.c.

331{
332 const struct Folder *folder = data;
333
334 if (folder->ff->local)
335 return folder->ff->nlink;
336
337 return 0;
338}
nlink_t nlink
Number of hard links.
Definition: lib.h:84

◆ folder_message_count_num()

static long folder_message_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: Number of messages - Implements get_number_t -.

Definition at line 356 of file expando.c.

358{
359 const struct Folder *folder = data;
360
361 if (folder->ff->has_mailbox)
362 return folder->ff->msg_count;
363
364 return 0;
365}
bool has_mailbox
This is a mailbox.
Definition: lib.h:98
int msg_count
total number of messages
Definition: lib.h:90

◆ folder_new_mail_num()

static long folder_new_mail_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: New mail flag - Implements get_number_t -.

Definition at line 383 of file expando.c.

384{
385 const struct Folder *folder = data;
386 return folder->ff->has_new_mail;
387}
bool has_new_mail
true if mailbox has "new mail"
Definition: lib.h:89

◆ folder_notify_num()

static long folder_notify_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: Alert for new mail - Implements get_number_t -.

Definition at line 392 of file expando.c.

393{
394 const struct Folder *folder = data;
395
396 return folder->ff->notify_user;
397}
bool notify_user
User will be notified of new mail.
Definition: lib.h:100

◆ folder_number_num()

static long folder_number_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: Index number - Implements get_number_t -.

Definition at line 402 of file expando.c.

403{
404 const struct Folder *folder = data;
405
406 return folder->num + 1;
407}
int num
Number in the index.
Definition: lib.h:71

◆ folder_poll_num()

static long folder_poll_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: Poll for new mail - Implements get_number_t -.

Definition at line 412 of file expando.c.

413{
414 const struct Folder *folder = data;
415
416 return folder->ff->poll_new_mail;
417}
bool poll_new_mail
Check mailbox for new mail.
Definition: lib.h:101

◆ folder_tagged_num()

static long folder_tagged_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: Is Tagged - Implements get_number_t -.

Definition at line 435 of file expando.c.

436{
437 const struct Folder *folder = data;
438 return folder->ff->tagged;
439}
bool tagged
Folder is tagged.
Definition: lib.h:102

◆ folder_unread_count_num()

static long folder_unread_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Browser: Number of unread messages - Implements get_number_t -.

Definition at line 457 of file expando.c.

459{
460 const struct Folder *folder = data;
461
462 if (folder->ff->has_mailbox)
463 return folder->ff->msg_unread;
464
465 return 0;
466}
int msg_unread
number of unread messages
Definition: lib.h:91

◆ compose_attach_count_num()

static long compose_attach_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Compose: Number of attachments - Implements get_number_t -.

Definition at line 44 of file expando.c.

46{
47 const struct ComposeSharedData *shared = data;
48 struct ComposeAttachData *adata = shared->adata;
49
50 if (!adata || !adata->menu)
51 return 0;
52
53 return adata->menu->max;
54}
Data to fill the Compose Attach Window.
Definition: attach_data.h:33
struct Menu * menu
Menu displaying the attachments.
Definition: attach_data.h:35
Shared Compose Data.
Definition: shared_data.h:35
struct ComposeAttachData * adata
Attachments.
Definition: shared_data.h:39
int max
Number of entries in the menu.
Definition: lib.h:81

◆ compose_attach_size_num()

static long compose_attach_size_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Compose: Size in bytes - Implements get_number_t -.

Definition at line 73 of file expando.c.

75{
76 const struct ComposeSharedData *shared = data;
77 return cum_attachs_size(shared->sub, shared->adata);
78}
unsigned long cum_attachs_size(struct ConfigSubset *sub, struct ComposeAttachData *adata)
Cumulative Attachments Size.
Definition: attach.c:84
struct ConfigSubset * sub
Config set to use.
Definition: shared_data.h:36
+ Here is the call graph for this function:

◆ history_number()

static long history_number ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

History: Index number - Implements get_number_t -.

Definition at line 39 of file expando.c.

40{
41 const struct HistoryEntry *entry = data;
42
43 return entry->num + 1;
44}
A line in the History menu.
Definition: lib.h:67
int num
Index number.
Definition: lib.h:68

◆ email_attachment_count()

static long email_attachment_count ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Number of MIME attachments - Implements get_number_t -.

Definition at line 379 of file expando_index.c.

380{
381 const struct HdrFormatInfo *hfi = data;
382 struct Email *e = hfi->email;
383 if (!e)
384 return 0;
385
386 struct Mailbox *m = hfi->mailbox;
387
388 struct Message *msg = mx_msg_open(m, e);
389 if (!msg)
390 return 0;
391
392 const int num = mutt_count_body_parts(e, msg->fp);
393 mx_msg_close(m, &msg);
394 return num;
395}
int mutt_count_body_parts(struct Email *e, FILE *fp)
Count the MIME Body parts.
Definition: attachments.c:251
int mx_msg_close(struct Mailbox *m, struct Message **ptr)
Close a message.
Definition: mx.c:1180
struct Message * mx_msg_open(struct Mailbox *m, struct Email *e)
Return a stream pointer for a message.
Definition: mx.c:1134
The envelope/body of an email.
Definition: email.h:39
Data passed to index_format_str()
Definition: private.h:37
struct Email * email
Current Email.
Definition: private.h:40
struct Mailbox * mailbox
Current Mailbox.
Definition: private.h:38
A mailbox.
Definition: mailbox.h:79
A local copy of an email.
Definition: message.h:34
FILE * fp
pointer to the message data
Definition: message.h:35
+ Here is the call graph for this function:

◆ email_date_format_local_num()

static long email_date_format_local_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Local Date and time - Implements get_number_t -.

Definition at line 576 of file expando_index.c.

578{
579 const struct HdrFormatInfo *hfi = data;
580 const struct Email *e = hfi->email;
581 if (!e)
582 return 0;
583
584 return e->date_sent;
585}
time_t date_sent
Time when the message was sent (UTC)
Definition: email.h:60

◆ email_date_format_num()

static long email_date_format_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Senders Date and time - Implements get_number_t -.

Definition at line 590 of file expando_index.c.

591{
592 const struct HdrFormatInfo *hfi = data;
593 const struct Email *e = hfi->email;
594 if (!e)
595 return 0;
596
597 return e->date_sent;
598}

◆ email_date_strf_num()

static long email_date_strf_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Sender's date and time - Implements get_number_t -.

Definition at line 617 of file expando_index.c.

618{
619 const struct HdrFormatInfo *hfi = data;
620 const struct Email *e = hfi->email;
621 if (!e)
622 return 0;
623
624 return e->date_sent;
625}

◆ email_date_strf_local_num()

static long email_date_strf_local_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Local date and time - Implements get_number_t -.

Definition at line 644 of file expando_index.c.

646{
647 const struct HdrFormatInfo *hfi = data;
648 const struct Email *e = hfi->email;
649 if (!e)
650 return 0;
651
652 return e->date_sent;
653}

◆ email_lines()

static long email_lines ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Number of lines - Implements get_number_t -.

Definition at line 736 of file expando_index.c.

737{
738 const struct HdrFormatInfo *hfi = data;
739 const struct Email *e = hfi->email;
740 if (!e)
741 return 0;
742
743 if (flags & MUTT_FORMAT_INDEX)
745
746 return e->lines;
747}
@ MT_COLOR_INDEX_SIZE
Index: size field.
Definition: color.h:90
void node_expando_set_color(const struct ExpandoNode *node, int cid)
Set the colour for an Expando.
Definition: node_expando.c:100
#define MUTT_FORMAT_INDEX
This is a main index entry.
Definition: render.h:38
int lines
How many lines in the body of this message?
Definition: email.h:62
+ Here is the call graph for this function:

◆ email_number()

static long email_number ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Index number - Implements get_number_t -.

Definition at line 809 of file expando_index.c.

810{
811 const struct HdrFormatInfo *hfi = data;
812 const struct Email *e = hfi->email;
813 if (!e)
814 return 0;
815
816 if (flags & MUTT_FORMAT_INDEX)
818
819 return e->msgno + 1;
820}
@ MT_COLOR_INDEX_NUMBER
Index: index number.
Definition: color.h:89
int msgno
Number displayed to the user.
Definition: email.h:111
+ Here is the call graph for this function:

◆ email_score()

static long email_score ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Message score - Implements get_number_t -.

Definition at line 825 of file expando_index.c.

826{
827 const struct HdrFormatInfo *hfi = data;
828 const struct Email *e = hfi->email;
829 if (!e)
830 return 0;
831
832 return e->score;
833}
int score
Message score.
Definition: email.h:113

◆ email_size_num()

static long email_size_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Number of bytes - Implements get_number_t -.

Definition at line 858 of file expando_index.c.

859{
860 const struct HdrFormatInfo *hfi = data;
861 const struct Email *e = hfi->email;
862 if (!e || !e->body)
863 return 0;
864
865 return e->body->length;
866}
struct Body * body
List of MIME parts.
Definition: email.h:69

◆ email_strf_recv_local_num()

static long email_strf_recv_local_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Local received date and time - Implements get_number_t -.

Definition at line 945 of file expando_index.c.

947{
948 const struct HdrFormatInfo *hfi = data;
949 const struct Email *e = hfi->email;
950 if (!e)
951 return 0;
952
953 return e->received;
954}
time_t received
Time when the message was placed in the mailbox.
Definition: email.h:61

◆ email_thread_count()

static long email_thread_count ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Number of messages thread - Implements get_number_t -.

Definition at line 995 of file expando_index.c.

996{
997 const struct HdrFormatInfo *hfi = data;
998 struct Email *e = hfi->email;
999 struct Mailbox *m = hfi->mailbox;
1000
1002}
int mutt_messages_in_thread(struct Mailbox *m, struct Email *e, enum MessageInThread mit)
Count the messages in a thread.
Definition: mutt_thread.c:1659
@ MIT_NUM_MESSAGES
How many messages are in the thread.
Definition: mutt_thread.h:89
+ Here is the call graph for this function:

◆ email_thread_hidden_count_num()

static long email_thread_hidden_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Number of hidden messages - Implements get_number_t -.

Definition at line 1037 of file expando_index.c.

1039{
1040 const struct HdrFormatInfo *hfi = data;
1041 const struct Email *e = hfi->email;
1042 if (!e)
1043 return 0;
1044
1045 const bool threads = mutt_using_threads();
1046 const bool is_index = (flags & MUTT_FORMAT_INDEX) != 0;
1047
1048 if (threads && is_index && e->collapsed && (e->num_hidden > 1))
1049 {
1050 if (flags & MUTT_FORMAT_INDEX)
1052 return e->num_hidden;
1053 }
1054
1055 return 0;
1056}
@ MT_COLOR_INDEX_COLLAPSED
Index: number of messages in collapsed thread.
Definition: color.h:85
#define mutt_using_threads()
Definition: mutt_thread.h:114
bool collapsed
Is this message part of a collapsed thread?
Definition: email.h:120
size_t num_hidden
Number of hidden messages in this view (only valid when collapsed is set)
Definition: email.h:123
+ Here is the call graph for this function:

◆ email_thread_number()

static long email_thread_number ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Thread index number - Implements get_number_t -.

Definition at line 1061 of file expando_index.c.

1062{
1063 const struct HdrFormatInfo *hfi = data;
1064 struct Email *e = hfi->email;
1065 struct Mailbox *m = hfi->mailbox;
1066
1068}
@ MIT_POSITION
Our position in the thread.
Definition: mutt_thread.h:90
+ Here is the call graph for this function:

◆ mailbox_message_count()

static long mailbox_message_count ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Index: Total number of message - Implements get_number_t -.

Definition at line 1684 of file expando_index.c.

1685{
1686 const struct HdrFormatInfo *hfi = data;
1687 const struct Mailbox *m = hfi->mailbox;
1688
1689 if (m)
1690 return m->msg_count;
1691
1692 return 0;
1693}
int msg_count
Total number of messages.
Definition: mailbox.h:88

◆ index_deleted_count_num()

static long index_deleted_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Number of deleted messages - Implements get_number_t -.

Definition at line 133 of file expando_status.c.

135{
136 const struct MenuStatusLineData *msld = data;
137 const struct IndexSharedData *shared = msld->shared;
138 const struct Mailbox *m = shared->mailbox;
139
140 return m ? m->msg_deleted : 0;
141}
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:37
struct Mailbox * mailbox
Current Mailbox.
Definition: shared_data.h:41
int msg_deleted
Number of deleted messages.
Definition: mailbox.h:93
Data for creating a Menu line.
struct IndexSharedData * shared
Data shared between Index, Pager and Sidebar.

◆ index_flagged_count_num()

static long index_flagged_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Number of flagged messages - Implements get_number_t -.

Definition at line 167 of file expando_status.c.

169{
170 const struct MenuStatusLineData *msld = data;
171 const struct IndexSharedData *shared = msld->shared;
172 const struct Mailbox *m = shared->mailbox;
173
174 return m ? m->msg_flagged : 0;
175}
int msg_flagged
Number of flagged messages.
Definition: mailbox.h:90

◆ index_limit_count_num()

static long index_limit_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Number of messages - Implements get_number_t -.

Definition at line 180 of file expando_status.c.

181{
182 const struct MenuStatusLineData *msld = data;
183 const struct IndexSharedData *shared = msld->shared;
184 const struct Mailbox *m = shared->mailbox;
185
186 return m ? m->vcount : 0;
187}
int vcount
The number of virtual messages.
Definition: mailbox.h:99

◆ index_limit_size_num()

static long index_limit_size_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Size of the messages - Implements get_number_t -.

Definition at line 223 of file expando_status.c.

224{
225 const struct MenuStatusLineData *msld = data;
226 const struct IndexSharedData *shared = msld->shared;
227 const struct MailboxView *mailbox_view = shared->mailbox_view;
228 if (!mailbox_view)
229 return 0;
230
231 return mailbox_view->vsize;
232}
struct MailboxView * mailbox_view
Current Mailbox view.
Definition: shared_data.h:40
View of a Mailbox.
Definition: mview.h:40
off_t vsize
Size (in bytes) of the messages shown.
Definition: mview.h:41

◆ index_mailbox_size_num()

static long index_mailbox_size_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Size of the current mailbox - Implements get_number_t -.

Definition at line 288 of file expando_status.c.

289{
290 const struct MenuStatusLineData *msld = data;
291 const struct IndexSharedData *shared = msld->shared;
292 const struct Mailbox *m = shared->mailbox;
293 if (!m)
294 return 0;
295
296 return m->size;
297}
off_t size
Size of the Mailbox.
Definition: mailbox.h:84

◆ index_message_count_num()

static long index_message_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Number of messages in the mailbox - Implements get_number_t -.

Definition at line 302 of file expando_status.c.

304{
305 const struct MenuStatusLineData *msld = data;
306 const struct IndexSharedData *shared = msld->shared;
307 const struct Mailbox *m = shared->mailbox;
308
309 return m ? m->msg_count : 0;
310}

◆ index_new_count_num()

static long index_new_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Number of new messages - Implements get_number_t -.

Definition at line 315 of file expando_status.c.

316{
317 const struct MenuStatusLineData *msld = data;
318 const struct IndexSharedData *shared = msld->shared;
319 const struct Mailbox *m = shared->mailbox;
320
321 return m ? m->msg_new : 0;
322}
int msg_new
Number of new messages.
Definition: mailbox.h:92

◆ index_old_count_num()

static long index_old_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Number of old messages - Implements get_number_t -.

Definition at line 327 of file expando_status.c.

328{
329 const struct MenuStatusLineData *msld = data;
330 const struct IndexSharedData *shared = msld->shared;
331 const struct Mailbox *m = shared->mailbox;
332
333 return m ? (m->msg_unread - m->msg_new) : 0;
334}
int msg_unread
Number of unread messages.
Definition: mailbox.h:89

◆ index_postponed_count_num()

static long index_postponed_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Number of postponed messages - Implements get_number_t -.

Definition at line 339 of file expando_status.c.

341{
342 const struct MenuStatusLineData *msld = data;
343 const struct IndexSharedData *shared = msld->shared;
344 struct Mailbox *m = shared->mailbox;
345
346 return mutt_num_postponed(m, false);
347}
int mutt_num_postponed(struct Mailbox *m, bool force)
Return the number of postponed messages.
Definition: postpone.c:70
+ Here is the call graph for this function:

◆ index_read_count_num()

static long index_read_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Number of read messages - Implements get_number_t -.

Definition at line 385 of file expando_status.c.

386{
387 const struct MenuStatusLineData *msld = data;
388 const struct IndexSharedData *shared = msld->shared;
389 const struct Mailbox *m = shared->mailbox;
390
391 return m ? (m->msg_count - m->msg_unread) : 0;
392}

◆ index_tagged_count_num()

static long index_tagged_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Number of tagged messages - Implements get_number_t -.

Definition at line 397 of file expando_status.c.

398{
399 const struct MenuStatusLineData *msld = data;
400 const struct IndexSharedData *shared = msld->shared;
401 const struct Mailbox *m = shared->mailbox;
402
403 return m ? m->msg_tagged : 0;
404}
int msg_tagged
How many messages are tagged?
Definition: mailbox.h:94

◆ index_unread_count_num()

static long index_unread_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Number of unread messages - Implements get_number_t -.

Definition at line 409 of file expando_status.c.

410{
411 const struct MenuStatusLineData *msld = data;
412 const struct IndexSharedData *shared = msld->shared;
413 const struct Mailbox *m = shared->mailbox;
414
415 return m ? m->msg_unread : 0;
416}

◆ index_unread_mailboxes_num()

static long index_unread_mailboxes_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Number of mailboxes with new mail - Implements get_number_t -.

Definition at line 421 of file expando_status.c.

423{
424 const struct MenuStatusLineData *msld = data;
425 const struct IndexSharedData *shared = msld->shared;
426 struct Mailbox *m = shared->mailbox;
427
429}
int mutt_mailbox_check(struct Mailbox *m_cur, CheckStatsFlags flags)
Check all all Mailboxes for new mail.
Definition: mutt_mailbox.c:169
#define MUTT_MAILBOX_CHECK_NO_FLAGS
No flags are set.
Definition: mxapi.h:53
+ Here is the call graph for this function:

◆ menu_percentage_num()

static long menu_percentage_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Status: Percentage through index - Implements get_number_t -.

Definition at line 469 of file expando_status.c.

470{
471 const struct MenuStatusLineData *msld = data;
472 const struct Menu *menu = msld->menu;
473 if (!menu)
474 return 0;
475
476 if (menu->top + menu->page_len >= menu->max)
477 return 100;
478
479 return (100 * (menu->top + menu->page_len)) / menu->max;
480}
struct Menu * menu
Current Menu.
Definition: lib.h:79
int top
Entry that is the top of the current page.
Definition: lib.h:90
int page_len
Number of entries per screen.
Definition: lib.h:84

◆ gpgme_entry_number_num()

static long gpgme_entry_number_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

GPGME: Index number - Implements get_number_t -.

Definition at line 96 of file expando_gpgme.c.

97{
98 const struct CryptEntry *entry = data;
99 return entry->num;
100}
An entry in the Select-Key menu.
Definition: crypt_gpgme.h:86
size_t num
Index number.
Definition: crypt_gpgme.h:87

◆ gpgme_key_date_num()

static long gpgme_key_date_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

GPGME: Date of the key - Implements get_number_t -.

Definition at line 232 of file expando_gpgme.c.

233{
234 const struct CryptEntry *entry = data;
235 const struct CryptKeyInfo *key = entry->key;
236 return key->kobj->subkeys->timestamp;
237}
struct CryptKeyInfo * key
Key.
Definition: crypt_gpgme.h:88
A stored PGP key.
Definition: crypt_gpgme.h:44
gpgme_key_t kobj
Definition: crypt_gpgme.h:46

◆ gpgme_key_length_num()

static long gpgme_key_length_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

GPGME: Key length - Implements get_number_t -.

Definition at line 285 of file expando_gpgme.c.

286{
287 const struct CryptEntry *entry = data;
288 const struct CryptKeyInfo *key = entry->key;
289
290 return key->kobj->subkeys ? key->kobj->subkeys->length : 0;
291}

◆ pgp_entry_number_num()

static long pgp_entry_number_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

PGP: Index number - Implements get_number_t -.

Definition at line 74 of file expando_pgp.c.

75{
76 const struct PgpEntry *entry = data;
77 return entry->num;
78}
An entry in a PGP key menu.
Definition: private.h:39
size_t num
Index number.
Definition: private.h:40

◆ pgp_key_date_num()

static long pgp_key_date_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

PGP: Date of the key - Implements get_number_t -.

Definition at line 200 of file expando_pgp.c.

201{
202 const struct PgpEntry *entry = data;
203 const struct PgpUid *uid = entry->uid;
204 const struct PgpKeyInfo *key = uid->parent;
205
206 return key->gen_time;
207}
struct PgpUid * uid
PGP Key info.
Definition: private.h:41
Information about a PGP key.
Definition: pgplib.h:49
time_t gen_time
Definition: pgplib.h:55
PGP User ID.
Definition: pgplib.h:36
struct PgpKeyInfo * parent
Parent key.
Definition: pgplib.h:40

◆ pgp_key_length_num()

static long pgp_key_length_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

PGP: Key length - Implements get_number_t -.

Definition at line 241 of file expando_pgp.c.

242{
243 const struct PgpEntry *entry = data;
244 const struct PgpUid *uid = entry->uid;
245 const struct PgpKeyInfo *key = uid->parent;
246
247 return key->keylen;
248}
short keylen
Definition: pgplib.h:54

◆ pgp_pkey_length_num()

static long pgp_pkey_length_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

PGP: Principal Key length - Implements get_number_t -.

Definition at line 316 of file expando_pgp.c.

317{
318 const struct PgpEntry *entry = data;
319 const struct PgpUid *uid = entry->uid;
320 struct PgpKeyInfo *key = uid->parent;
321 struct PgpKeyInfo *pkey = pgp_principal_key(key);
322
323 return pkey->keylen;
324}
struct PgpKeyInfo * pgp_principal_key(struct PgpKeyInfo *key)
Get the main (parent) PGP key.
Definition: pgpkey.c:92
+ Here is the call graph for this function:

◆ group_index_notify_num()

static long group_index_notify_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

NNTP: Alert for new mail - Implements get_number_t -.

Definition at line 127 of file expando_browser.c.

128{
129 const struct Folder *folder = data;
130
131 return folder->ff->notify_user;
132}

◆ group_index_new_count_num()

static long group_index_new_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

NNTP: Number of new articles - Implements get_number_t -.

Definition at line 137 of file expando_browser.c.

139{
140 const struct Folder *folder = data;
141 const struct NntpMboxData *nd = folder->ff->nd;
142
143 const bool c_mark_old = cs_subset_bool(NeoMutt->sub, "mark_old");
144
145 if (c_mark_old && (nd->last_cached >= nd->first_message) &&
146 (nd->last_cached <= nd->last_message))
147 {
148 return nd->last_message - nd->last_cached;
149 }
150
151 return nd->unread;
152}
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:47
struct NntpMboxData * nd
Extra NNTP data.
Definition: lib.h:103
Container for Accounts, Notifications.
Definition: neomutt.h:42
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:46
NNTP-specific Mailbox data -.
Definition: mdata.h:34
anum_t last_cached
Definition: mdata.h:40
anum_t last_message
Definition: mdata.h:38
anum_t unread
Definition: mdata.h:41
anum_t first_message
Definition: mdata.h:37
+ Here is the call graph for this function:

◆ group_index_number_num()

static long group_index_number_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

NNTP: Index number - Implements get_number_t -.

Definition at line 157 of file expando_browser.c.

158{
159 const struct Folder *folder = data;
160
161 return folder->num + 1;
162}

◆ group_index_poll_num()

static long group_index_poll_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

NNTP: Poll for new mail - Implements get_number_t -.

Definition at line 167 of file expando_browser.c.

168{
169 const struct Folder *folder = data;
170
171 return folder->ff->poll_new_mail;
172}

◆ group_index_unread_count_num()

static long group_index_unread_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

NNTP: Number of unread articles - Implements get_number_t -.

Definition at line 177 of file expando_browser.c.

179{
180 const struct Folder *folder = data;
181
182 return folder->ff->nd->unread;
183}

◆ nntp_port()

static long nntp_port ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Newsrc: Port - Implements get_number_t -.

Definition at line 67 of file expando_newsrc.c.

68{
69 const struct NntpAccountData *adata = data;
70 const struct ConnAccount *cac = &adata->conn->account;
71
72 return cac->port;
73}
void * adata
Private data (for Mailbox backends)
Definition: account.h:42
Login details for a remote server.
Definition: connaccount.h:53
unsigned short port
Port to connect to.
Definition: connaccount.h:58
struct ConnAccount account
Account details: username, password, etc.
Definition: connection.h:49
NNTP-specific Account data -.
Definition: adata.h:36
struct Connection * conn
Connection to NNTP Server.
Definition: adata.h:62

◆ nntp_port_if_num()

static long nntp_port_if_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Newsrc: Port if specified - Implements get_number_t -.

Definition at line 78 of file expando_newsrc.c.

79{
80 const struct NntpAccountData *adata = data;
81 const struct ConnAccount *cac = &adata->conn->account;
82
83 if (cac->flags & MUTT_ACCT_PORT)
84 return cac->port;
85
86 return 0;
87}
#define MUTT_ACCT_PORT
Port field has been set.
Definition: connaccount.h:43
MuttAccountFlags flags
Which fields are initialised, e.g. MUTT_ACCT_USER.
Definition: connaccount.h:60

◆ pattern_number_num()

static long pattern_number_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Pattern: Index number - Implements get_number_t -.

Definition at line 63 of file expando.c.

64{
65 const struct PatternEntry *entry = data;
66
67 return entry->num;
68}
A line in the Pattern Completion menu.
Definition: pattern_data.h:35
int num
Index number.
Definition: pattern_data.h:36

◆ sidebar_deleted_count_num()

static long sidebar_deleted_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: Number of deleted messages - Implements get_number_t -.

Definition at line 60 of file expando.c.

62{
63 const struct SidebarData *sdata = data;
64 const struct SbEntry *sbe = sdata->entry;
65 const struct IndexSharedData *shared = sdata->shared;
66 const struct Mailbox *m = sbe->mailbox;
67 const struct Mailbox *m_cur = shared->mailbox;
68
69 const bool c = m_cur && mutt_str_equal(m_cur->realpath, m->realpath);
70
71 return c ? m_cur->msg_deleted : 0;
72}
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:660
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
Definition: mailbox.h:81
Info about folders in the sidebar.
Definition: private.h:41
struct Mailbox * mailbox
Mailbox this represents.
Definition: private.h:45
Data passed to sidebar_format_str()
Definition: expando.h:34
struct IndexSharedData * shared
Shared Index Data.
Definition: expando.h:36
struct SbEntry * entry
Info about a folder.
Definition: expando.h:35
+ Here is the call graph for this function:

◆ sidebar_flagged_count_num()

static long sidebar_flagged_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: Number of flagged messages - Implements get_number_t -.

Definition at line 131 of file expando.c.

133{
134 const struct SidebarData *sdata = data;
135 const struct SbEntry *sbe = sdata->entry;
136 const struct Mailbox *m = sbe->mailbox;
137
138 return m->msg_flagged;
139}

◆ sidebar_limited_count_num()

static long sidebar_limited_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: Number of limited messages - Implements get_number_t -.

Definition at line 144 of file expando.c.

146{
147 const struct SidebarData *sdata = data;
148 const struct SbEntry *sbe = sdata->entry;
149 const struct IndexSharedData *shared = sdata->shared;
150 const struct Mailbox *m = sbe->mailbox;
151 const struct Mailbox *m_cur = shared->mailbox;
152
153 const bool c = m_cur && mutt_str_equal(m_cur->realpath, m->realpath);
154
155 return c ? m_cur->vcount : m->msg_count;
156}
+ Here is the call graph for this function:

◆ sidebar_message_count_num()

static long sidebar_message_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: number of messages - Implements get_number_t -.

Definition at line 161 of file expando.c.

163{
164 const struct SidebarData *sdata = data;
165 const struct SbEntry *sbe = sdata->entry;
166 const struct Mailbox *m = sbe->mailbox;
167
168 return m->msg_count;
169}

◆ sidebar_new_mail_num()

static long sidebar_new_mail_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: New mail flag - Implements get_number_t -.

Definition at line 207 of file expando.c.

208{
209 const struct SidebarData *sdata = data;
210 const struct SbEntry *sbe = sdata->entry;
211 const struct Mailbox *m = sbe->mailbox;
212
213 return m->has_new;
214}
bool has_new
Mailbox has new mail.
Definition: mailbox.h:85

◆ sidebar_notify_num()

static long sidebar_notify_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: Alert for new mail - Implements get_number_t -.

Definition at line 219 of file expando.c.

220{
221 const struct SidebarData *sdata = data;
222 const struct SbEntry *sbe = sdata->entry;
223 const struct Mailbox *m = sbe->mailbox;
224
225 return m->notify_user;
226}
bool notify_user
Notify the user of new mail.
Definition: mailbox.h:113

◆ sidebar_old_count_num()

static long sidebar_old_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: Number of old messages - Implements get_number_t -.

Definition at line 231 of file expando.c.

232{
233 const struct SidebarData *sdata = data;
234 const struct SbEntry *sbe = sdata->entry;
235 const struct Mailbox *m = sbe->mailbox;
236
237 return m->msg_unread - m->msg_new;
238}

◆ sidebar_poll_num()

static long sidebar_poll_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: Poll for new mail - Implements get_number_t -.

Definition at line 243 of file expando.c.

244{
245 const struct SidebarData *sdata = data;
246 const struct SbEntry *sbe = sdata->entry;
247 const struct Mailbox *m = sbe->mailbox;
248
249 return m->poll_new_mail;
250}
bool poll_new_mail
Check for new mail.
Definition: mailbox.h:115

◆ sidebar_read_count_num()

static long sidebar_read_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: Number of read messages - Implements get_number_t -.

Definition at line 255 of file expando.c.

256{
257 const struct SidebarData *sdata = data;
258 const struct SbEntry *sbe = sdata->entry;
259 const struct Mailbox *m = sbe->mailbox;
260
261 return m->msg_count - m->msg_unread;
262}

◆ sidebar_tagged_count_num()

static long sidebar_tagged_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: Number of tagged messages - Implements get_number_t -.

Definition at line 267 of file expando.c.

269{
270 const struct SidebarData *sdata = data;
271 const struct SbEntry *sbe = sdata->entry;
272 const struct IndexSharedData *shared = sdata->shared;
273 const struct Mailbox *m = sbe->mailbox;
274 const struct Mailbox *m_cur = shared->mailbox;
275
276 const bool c = m_cur && mutt_str_equal(m_cur->realpath, m->realpath);
277
278 return c ? m_cur->msg_tagged : 0;
279}
+ Here is the call graph for this function:

◆ sidebar_unread_count_num()

static long sidebar_unread_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: Number of unread messages - Implements get_number_t -.

Definition at line 284 of file expando.c.

286{
287 const struct SidebarData *sdata = data;
288 const struct SbEntry *sbe = sdata->entry;
289 const struct Mailbox *m = sbe->mailbox;
290
291 return m->msg_unread;
292}

◆ sidebar_unseen_count_num()

static long sidebar_unseen_count_num ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags 
)
static

Sidebar: Number of new messages - Implements get_number_t -.

Definition at line 297 of file expando.c.

299{
300 const struct SidebarData *sdata = data;
301 const struct SbEntry *sbe = sdata->entry;
302 const struct Mailbox *m = sbe->mailbox;
303
304 return m->msg_new;
305}