NeoMutt  2025-01-09-117-gace867
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 280 of file expando.c.

281{
282 const struct AttachPtr *aptr = data;
283
284 if (aptr->body->filename && (flags & MUTT_FORMAT_STAT_FILE))
285 return mutt_file_get_size(aptr->body->filename);
286
287 return aptr->body->length;
288}
long mutt_file_get_size(const char *path)
Get the size of a file.
Definition: file.c:1412
#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 342 of file expando.c.

343{
344 const struct AttachPtr *aptr = data;
345 return aptr->body->tagged;
346}
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 364 of file expando.c.

365{
366 const struct AttachPtr *aptr = data;
367 return aptr->body->unlink;
368}
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 305 of file expando.c.

306{
307 const struct Folder *folder = data;
308 return folder->ff->size;
309}
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 327 of file expando.c.

328{
329 const struct Folder *folder = data;
330
331 if (folder->ff->local)
332 return folder->ff->nlink;
333
334 return 0;
335}
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 353 of file expando.c.

355{
356 const struct Folder *folder = data;
357
358 if (folder->ff->has_mailbox)
359 return folder->ff->msg_count;
360
361 return 0;
362}
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 380 of file expando.c.

381{
382 const struct Folder *folder = data;
383 return folder->ff->has_new_mail;
384}
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 389 of file expando.c.

390{
391 const struct Folder *folder = data;
392
393 return folder->ff->notify_user;
394}
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 399 of file expando.c.

400{
401 const struct Folder *folder = data;
402
403 return folder->num + 1;
404}
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 409 of file expando.c.

410{
411 const struct Folder *folder = data;
412
413 return folder->ff->poll_new_mail;
414}
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 432 of file expando.c.

433{
434 const struct Folder *folder = data;
435 return folder->ff->tagged;
436}
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 454 of file expando.c.

456{
457 const struct Folder *folder = data;
458
459 if (folder->ff->has_mailbox)
460 return folder->ff->msg_unread;
461
462 return 0;
463}
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:36
struct ComposeAttachData * adata
Attachments.
Definition: shared_data.h:40
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 70 of file expando.c.

72{
73 const struct ComposeSharedData *shared = data;
74 return cum_attachs_size(shared->sub, shared->adata);
75}
unsigned long cum_attachs_size(struct ConfigSubset *sub, struct ComposeAttachData *adata)
Cumulative Attachments Size.
Definition: attach.c:85
struct ConfigSubset * sub
Config set to use.
Definition: shared_data.h:37
+ 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 EmailFormatInfo *efi = data;
382 struct Email *e = efi->email;
383 if (!e)
384 return 0;
385
386 struct Mailbox *m = efi->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:1185
struct Message * mx_msg_open(struct Mailbox *m, struct Email *e)
Return a stream pointer for a message.
Definition: mx.c:1139
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
The envelope/body of an email.
Definition: email.h:39
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 573 of file expando_index.c.

575{
576 const struct EmailFormatInfo *efi = data;
577 const struct Email *e = efi->email;
578 if (!e)
579 return 0;
580
581 return e->date_sent;
582}
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 587 of file expando_index.c.

588{
589 const struct EmailFormatInfo *efi = data;
590 const struct Email *e = efi->email;
591 if (!e)
592 return 0;
593
594 return e->date_sent;
595}

◆ 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 614 of file expando_index.c.

615{
616 const struct EmailFormatInfo *efi = data;
617 const struct Email *e = efi->email;
618 if (!e)
619 return 0;
620
621 return e->date_sent;
622}

◆ 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 641 of file expando_index.c.

643{
644 const struct EmailFormatInfo *efi = data;
645 const struct Email *e = efi->email;
646 if (!e)
647 return 0;
648
649 return e->date_sent;
650}

◆ 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 734 of file expando_index.c.

735{
736 const struct EmailFormatInfo *efi = data;
737 const struct Email *e = efi->email;
738 if (!e)
739 return 0;
740
741 if (flags & MUTT_FORMAT_INDEX)
743
744 return e->lines;
745}
@ MT_COLOR_INDEX_SIZE
Index: size field.
Definition: color.h:95
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 807 of file expando_index.c.

808{
809 const struct EmailFormatInfo *efi = data;
810 const struct Email *e = efi->email;
811 if (!e)
812 return 0;
813
814 if (flags & MUTT_FORMAT_INDEX)
816
817 return e->msgno + 1;
818}
@ MT_COLOR_INDEX_NUMBER
Index: index number.
Definition: color.h:94
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 823 of file expando_index.c.

824{
825 const struct EmailFormatInfo *efi = data;
826 const struct Email *e = efi->email;
827 if (!e)
828 return 0;
829
830 return e->score;
831}
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 853 of file expando_index.c.

854{
855 const struct EmailFormatInfo *efi = data;
856 const struct Email *e = efi->email;
857 if (!e || !e->body)
858 return 0;
859
860 return e->body->length;
861}
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 940 of file expando_index.c.

942{
943 const struct EmailFormatInfo *efi = data;
944 const struct Email *e = efi->email;
945 if (!e)
946 return 0;
947
948 return e->received;
949}
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 990 of file expando_index.c.

991{
992 const struct EmailFormatInfo *efi = data;
993 struct Email *e = efi->email;
994 struct Mailbox *m = efi->mailbox;
995
997}
int mutt_messages_in_thread(struct Mailbox *m, struct Email *e, enum MessageInThread mit)
Count the messages in a thread.
Definition: mutt_thread.c:1657
@ MIT_NUM_MESSAGES
How many messages are in the thread.
Definition: mutt_thread.h:88
+ 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 1032 of file expando_index.c.

1034{
1035 const struct EmailFormatInfo *efi = data;
1036 const struct Email *e = efi->email;
1037 if (!e)
1038 return 0;
1039
1040 const bool threads = mutt_using_threads();
1041 const bool is_index = (flags & MUTT_FORMAT_INDEX) != 0;
1042
1043 if (threads && is_index && e->collapsed && (e->num_hidden > 1))
1044 {
1045 if (flags & MUTT_FORMAT_INDEX)
1047 return e->num_hidden;
1048 }
1049
1050 return 0;
1051}
@ MT_COLOR_INDEX_COLLAPSED
Index: number of messages in collapsed thread.
Definition: color.h:90
#define mutt_using_threads()
Definition: mutt_thread.h:113
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 1056 of file expando_index.c.

1057{
1058 const struct EmailFormatInfo *efi = data;
1059 struct Email *e = efi->email;
1060 struct Mailbox *m = efi->mailbox;
1061
1063}
@ MIT_POSITION
Our position in the thread.
Definition: mutt_thread.h:89
+ 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 1679 of file expando_index.c.

1680{
1681 const struct EmailFormatInfo *efi = data;
1682 const struct Mailbox *m = efi->mailbox;
1683
1684 if (m)
1685 return m->msg_count;
1686
1687 return 0;
1688}
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 134 of file expando_status.c.

136{
137 const struct MenuStatusLineData *msld = data;
138 const struct IndexSharedData *shared = msld->shared;
139 const struct Mailbox *m = shared->mailbox;
140
141 return m ? m->msg_deleted : 0;
142}
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 168 of file expando_status.c.

170{
171 const struct MenuStatusLineData *msld = data;
172 const struct IndexSharedData *shared = msld->shared;
173 const struct Mailbox *m = shared->mailbox;
174
175 return m ? m->msg_flagged : 0;
176}
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 181 of file expando_status.c.

182{
183 const struct MenuStatusLineData *msld = data;
184 const struct IndexSharedData *shared = msld->shared;
185 const struct Mailbox *m = shared->mailbox;
186
187 return m ? m->vcount : 0;
188}
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 221 of file expando_status.c.

222{
223 const struct MenuStatusLineData *msld = data;
224 const struct IndexSharedData *shared = msld->shared;
225 const struct MailboxView *mailbox_view = shared->mailbox_view;
226 if (!mailbox_view)
227 return 0;
228
229 return mailbox_view->vsize;
230}
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 283 of file expando_status.c.

284{
285 const struct MenuStatusLineData *msld = data;
286 const struct IndexSharedData *shared = msld->shared;
287 const struct Mailbox *m = shared->mailbox;
288 if (!m)
289 return 0;
290
291 return m->size;
292}
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 297 of file expando_status.c.

299{
300 const struct MenuStatusLineData *msld = data;
301 const struct IndexSharedData *shared = msld->shared;
302 const struct Mailbox *m = shared->mailbox;
303
304 return m ? m->msg_count : 0;
305}

◆ 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 310 of file expando_status.c.

311{
312 const struct MenuStatusLineData *msld = data;
313 const struct IndexSharedData *shared = msld->shared;
314 const struct Mailbox *m = shared->mailbox;
315
316 return m ? m->msg_new : 0;
317}
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 322 of file expando_status.c.

323{
324 const struct MenuStatusLineData *msld = data;
325 const struct IndexSharedData *shared = msld->shared;
326 const struct Mailbox *m = shared->mailbox;
327
328 return m ? (m->msg_unread - m->msg_new) : 0;
329}
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 334 of file expando_status.c.

336{
337 const struct MenuStatusLineData *msld = data;
338 const struct IndexSharedData *shared = msld->shared;
339 struct Mailbox *m = shared->mailbox;
340
341 return mutt_num_postponed(m, false);
342}
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 381 of file expando_status.c.

382{
383 const struct MenuStatusLineData *msld = data;
384 const struct IndexSharedData *shared = msld->shared;
385 const struct Mailbox *m = shared->mailbox;
386
387 return m ? (m->msg_count - m->msg_unread) : 0;
388}

◆ 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 393 of file expando_status.c.

394{
395 const struct MenuStatusLineData *msld = data;
396 const struct IndexSharedData *shared = msld->shared;
397 const struct Mailbox *m = shared->mailbox;
398
399 return m ? m->msg_tagged : 0;
400}
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 405 of file expando_status.c.

406{
407 const struct MenuStatusLineData *msld = data;
408 const struct IndexSharedData *shared = msld->shared;
409 const struct Mailbox *m = shared->mailbox;
410
411 return m ? m->msg_unread : 0;
412}

◆ 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 417 of file expando_status.c.

419{
420 const struct MenuStatusLineData *msld = data;
421 const struct IndexSharedData *shared = msld->shared;
422 struct Mailbox *m = shared->mailbox;
423
425}
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:50
+ 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 465 of file expando_status.c.

466{
467 const struct MenuStatusLineData *msld = data;
468 const struct Menu *menu = msld->menu;
469 if (!menu)
470 return 0;
471
472 if (menu->top + menu->page_len >= menu->max)
473 return 100;
474
475 return (100 * (menu->top + menu->page_len)) / menu->max;
476}
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:43
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:47
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 56 of file expando.c.

58{
59 const struct SidebarData *sdata = data;
60 const struct SbEntry *sbe = sdata->entry;
61 const struct IndexSharedData *shared = sdata->shared;
62 const struct Mailbox *m = sbe->mailbox;
63 const struct Mailbox *m_cur = shared->mailbox;
64
65 const bool c = m_cur && mutt_str_equal(m_cur->realpath, m->realpath);
66
67 return c ? m_cur->msg_deleted : 0;
68}
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:661
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 118 of file expando.c.

120{
121 const struct SidebarData *sdata = data;
122 const struct SbEntry *sbe = sdata->entry;
123 const struct Mailbox *m = sbe->mailbox;
124
125 return m->msg_flagged;
126}

◆ 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 131 of file expando.c.

133{
134 const struct SidebarData *sdata = data;
135 const struct SbEntry *sbe = sdata->entry;
136 const struct IndexSharedData *shared = sdata->shared;
137 const struct Mailbox *m = sbe->mailbox;
138 const struct Mailbox *m_cur = shared->mailbox;
139
140 const bool c = m_cur && mutt_str_equal(m_cur->realpath, m->realpath);
141
142 return c ? m_cur->vcount : m->msg_count;
143}
+ 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 148 of file expando.c.

150{
151 const struct SidebarData *sdata = data;
152 const struct SbEntry *sbe = sdata->entry;
153 const struct Mailbox *m = sbe->mailbox;
154
155 return m->msg_count;
156}

◆ 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 189 of file expando.c.

190{
191 const struct SidebarData *sdata = data;
192 const struct SbEntry *sbe = sdata->entry;
193 const struct Mailbox *m = sbe->mailbox;
194
195 return m->has_new;
196}
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 201 of file expando.c.

202{
203 const struct SidebarData *sdata = data;
204 const struct SbEntry *sbe = sdata->entry;
205 const struct Mailbox *m = sbe->mailbox;
206
207 return m->notify_user;
208}
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 213 of file expando.c.

214{
215 const struct SidebarData *sdata = data;
216 const struct SbEntry *sbe = sdata->entry;
217 const struct Mailbox *m = sbe->mailbox;
218
219 return m->msg_unread - m->msg_new;
220}

◆ 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 225 of file expando.c.

226{
227 const struct SidebarData *sdata = data;
228 const struct SbEntry *sbe = sdata->entry;
229 const struct Mailbox *m = sbe->mailbox;
230
231 return m->poll_new_mail;
232}
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 237 of file expando.c.

238{
239 const struct SidebarData *sdata = data;
240 const struct SbEntry *sbe = sdata->entry;
241 const struct Mailbox *m = sbe->mailbox;
242
243 return m->msg_count - m->msg_unread;
244}

◆ 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 249 of file expando.c.

251{
252 const struct SidebarData *sdata = data;
253 const struct SbEntry *sbe = sdata->entry;
254 const struct IndexSharedData *shared = sdata->shared;
255 const struct Mailbox *m = sbe->mailbox;
256 const struct Mailbox *m_cur = shared->mailbox;
257
258 const bool c = m_cur && mutt_str_equal(m_cur->realpath, m->realpath);
259
260 return c ? m_cur->msg_tagged : 0;
261}
+ 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 266 of file expando.c.

268{
269 const struct SidebarData *sdata = data;
270 const struct SbEntry *sbe = sdata->entry;
271 const struct Mailbox *m = sbe->mailbox;
272
273 return m->msg_unread;
274}

◆ 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 279 of file expando.c.

281{
282 const struct SidebarData *sdata = data;
283 const struct SbEntry *sbe = sdata->entry;
284 const struct Mailbox *m = sbe->mailbox;
285
286 return m->msg_new;
287}