NeoMutt  2025-12-11-694-ga89709
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 msgid_day_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Message Id: Day - Implements get_number_t -.
 
static long msgid_hour_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Message Id: Hour - Implements get_number_t -.
 
static long msgid_minute_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Message Id: Minute - Implements get_number_t -.
 
static long msgid_month_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Message Id: Month - Implements get_number_t -.
 
static long msgid_pid_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Message Id: Process Id - Implements get_number_t -.
 
static long msgid_second_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Message Id: Second - Implements get_number_t -.
 
static long msgid_year_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Message Id: Year (4 digit) - 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_fuzzy_score_num (const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
 Sidebar: Fuzzy Score - 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:1414
#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 68 of file expando.c.

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

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

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

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

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

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

305{
306 const struct Folder *folder = data;
307 return folder->ff->size;
308}
off_t size
File size.
Definition lib.h:81

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

327{
328 const struct Folder *folder = data;
329
330 if (folder->ff->local)
331 return folder->ff->nlink;
332
333 return 0;
334}
nlink_t nlink
Number of hard links.
Definition lib.h:85

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

354{
355 const struct Folder *folder = data;
356
357 if (folder->ff->has_mailbox)
358 return folder->ff->msg_count;
359
360 return 0;
361}
bool has_mailbox
This is a mailbox.
Definition lib.h:99
int msg_count
total number of messages
Definition lib.h:91

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

380{
381 const struct Folder *folder = data;
382 return folder->ff->has_new_mail;
383}
bool has_new_mail
true if mailbox has "new mail"
Definition lib.h:90

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

389{
390 const struct Folder *folder = data;
391
392 return folder->ff->notify_user;
393}
bool notify_user
User will be notified of new mail.
Definition lib.h:101

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

399{
400 const struct Folder *folder = data;
401
402 return folder->num + 1;
403}
int num
Number in the index.
Definition lib.h:72

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

409{
410 const struct Folder *folder = data;
411
412 return folder->ff->poll_new_mail;
413}
bool poll_new_mail
Check mailbox for new mail.
Definition lib.h:102

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

432{
433 const struct Folder *folder = data;
434 return folder->ff->tagged;
435}
bool tagged
Folder is tagged.
Definition lib.h:103

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

455{
456 const struct Folder *folder = data;
457
458 if (folder->ff->has_mailbox)
459 return folder->ff->msg_unread;
460
461 return 0;
462}
int msg_unread
number of unread messages
Definition lib.h:92

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

47{
48 const struct ComposeSharedData *shared = data;
49 struct ComposeAttachData *adata = shared->adata;
50
51 if (!adata || !adata->menu)
52 return 0;
53
54 return adata->menu->max;
55}
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:82

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

73{
74 const struct ComposeSharedData *shared = data;
75 return cum_attachs_size(shared->sub, shared->adata);
76}
unsigned long cum_attachs_size(struct ConfigSubset *sub, struct ComposeAttachData *adata)
Cumulative Attachments Size.
Definition attach.c:87
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:70
int num
Index number.
Definition lib.h:71

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

379{
380 const struct EmailFormatInfo *efi = data;
381 struct Email *e = efi->email;
382 if (!e)
383 return 0;
384
385 struct Mailbox *m = efi->mailbox;
386
387 struct Message *msg = mx_msg_open(m, e);
388 if (!msg)
389 return 0;
390
391 const int num = mutt_count_body_parts(e, msg->fp);
392 mx_msg_close(m, &msg);
393 return num;
394}
int mutt_count_body_parts(struct Email *e, FILE *fp)
Count the MIME Body parts.
Definition commands.c:226
int mx_msg_close(struct Mailbox *m, struct Message **ptr)
Close a message.
Definition mx.c:1182
struct Message * mx_msg_open(struct Mailbox *m, struct Email *e)
Return a stream pointer for a message.
Definition mx.c:1136
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:78
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 572 of file expando_index.c.

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

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

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

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

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

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

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

734{
735 const struct EmailFormatInfo *efi = data;
736 const struct Email *e = efi->email;
737 if (!e)
738 return 0;
739
740 if (flags & MUTT_FORMAT_INDEX)
742
743 return e->lines;
744}
@ MT_COLOR_INDEX_SIZE
Index: size field.
Definition color.h:93
void node_expando_set_color(const struct ExpandoNode *node, int cid)
Set the colour for an Expando.
#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 806 of file expando_index.c.

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

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

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

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

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

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

1054{
1055 const struct EmailFormatInfo *efi = data;
1056 struct Email *e = efi->email;
1057 struct Mailbox *m = efi->mailbox;
1058
1060}
@ MIT_POSITION
Our position in the thread.
Definition 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 1661 of file expando_index.c.

1662{
1663 const struct EmailFormatInfo *efi = data;
1664 const struct Mailbox *m = efi->mailbox;
1665
1666 if (m)
1667 return m->msg_count;
1668
1669 return 0;
1670}
int msg_count
Total number of messages.
Definition mailbox.h:87

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

129{
130 const struct MenuStatusLineData *msld = data;
131 const struct IndexSharedData *shared = msld->shared;
132 const struct Mailbox *m = shared->mailbox;
133
134 return m ? m->msg_deleted : 0;
135}
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:92
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 161 of file expando_status.c.

163{
164 const struct MenuStatusLineData *msld = data;
165 const struct IndexSharedData *shared = msld->shared;
166 const struct Mailbox *m = shared->mailbox;
167
168 return m ? m->msg_flagged : 0;
169}
int msg_flagged
Number of flagged messages.
Definition mailbox.h:89

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

175{
176 const struct MenuStatusLineData *msld = data;
177 const struct IndexSharedData *shared = msld->shared;
178 const struct Mailbox *m = shared->mailbox;
179
180 return m ? m->vcount : 0;
181}
int vcount
The number of virtual messages.
Definition mailbox.h:98

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

215{
216 const struct MenuStatusLineData *msld = data;
217 const struct IndexSharedData *shared = msld->shared;
218 const struct MailboxView *mailbox_view = shared->mailbox_view;
219 if (!mailbox_view)
220 return 0;
221
222 return mailbox_view->vsize;
223}
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 272 of file expando_status.c.

273{
274 const struct MenuStatusLineData *msld = data;
275 const struct IndexSharedData *shared = msld->shared;
276 const struct Mailbox *m = shared->mailbox;
277 if (!m)
278 return 0;
279
280 return m->size;
281}
off_t size
Size of the Mailbox.
Definition mailbox.h:83

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

288{
289 const struct MenuStatusLineData *msld = data;
290 const struct IndexSharedData *shared = msld->shared;
291 const struct Mailbox *m = shared->mailbox;
292
293 return m ? m->msg_count : 0;
294}

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

300{
301 const struct MenuStatusLineData *msld = data;
302 const struct IndexSharedData *shared = msld->shared;
303 const struct Mailbox *m = shared->mailbox;
304
305 return m ? m->msg_new : 0;
306}
int msg_new
Number of new messages.
Definition mailbox.h:91

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

312{
313 const struct MenuStatusLineData *msld = data;
314 const struct IndexSharedData *shared = msld->shared;
315 const struct Mailbox *m = shared->mailbox;
316
317 return m ? (m->msg_unread - m->msg_new) : 0;
318}
int msg_unread
Number of unread messages.
Definition mailbox.h:88

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

325{
326 const struct MenuStatusLineData *msld = data;
327 const struct IndexSharedData *shared = msld->shared;
328 struct Mailbox *m = shared->mailbox;
329
330 return mutt_num_postponed(m, false);
331}
int mutt_num_postponed(struct Mailbox *m, bool force)
Return the number of postponed messages.
Definition postpone.c:67
+ 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 370 of file expando_status.c.

371{
372 const struct MenuStatusLineData *msld = data;
373 const struct IndexSharedData *shared = msld->shared;
374 const struct Mailbox *m = shared->mailbox;
375
376 return m ? (m->msg_count - m->msg_unread) : 0;
377}

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

383{
384 const struct MenuStatusLineData *msld = data;
385 const struct IndexSharedData *shared = msld->shared;
386 const struct Mailbox *m = shared->mailbox;
387
388 return m ? m->msg_tagged : 0;
389}
int msg_tagged
How many messages are tagged?
Definition mailbox.h:93

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

395{
396 const struct MenuStatusLineData *msld = data;
397 const struct IndexSharedData *shared = msld->shared;
398 const struct Mailbox *m = shared->mailbox;
399
400 return m ? m->msg_unread : 0;
401}

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

408{
409 const struct MenuStatusLineData *msld = data;
410 const struct IndexSharedData *shared = msld->shared;
411 struct Mailbox *m = shared->mailbox;
412
414}
int mutt_mailbox_check(struct Mailbox *m_cur, CheckStatsFlags flags)
Check all all Mailboxes for new mail.
#define MUTT_MAILBOX_CHECK_NO_FLAGS
No flags are set.
Definition mxapi.h:49
+ 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 449 of file expando_status.c.

450{
451 const struct MenuStatusLineData *msld = data;
452 const struct Menu *menu = msld->menu;
453 if (!menu)
454 return 0;
455
456 if (menu->top + menu->page_len >= menu->max)
457 return 100;
458
459 return (100 * (menu->top + menu->page_len)) / menu->max;
460}
struct Menu * menu
Current Menu.
Definition lib.h:80
int top
Entry that is the top of the current page.
Definition lib.h:92
int page_len
Number of entries per screen.
Definition lib.h:85

◆ 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 95 of file expando_gpgme.c.

96{
97 const struct CryptEntry *entry = data;
98 return entry->num;
99}
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 231 of file expando_gpgme.c.

232{
233 const struct CryptEntry *entry = data;
234 const struct CryptKeyInfo *key = entry->key;
235 return key->kobj->subkeys ? key->kobj->subkeys->timestamp : 0;
236}
struct CryptKeyInfo * key
Key.
Definition crypt_gpgme.h:88
A stored PGP key.
Definition crypt_gpgme.h:44
gpgme_key_t kobj
GPGME key object.
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 284 of file expando_gpgme.c.

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

◆ 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:38
size_t num
Index number.
Definition private.h:39

◆ 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:40
Information about a PGP key.
Definition pgplib.h:49
time_t gen_time
Key generation 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
Key length.
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:91
+ 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 123 of file expando_browser.c.

124{
125 const struct Folder *folder = data;
126
127 return folder->ff->notify_user;
128}

◆ 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 133 of file expando_browser.c.

135{
136 const struct Folder *folder = data;
137 const struct NntpMboxData *nd = folder->ff->nd;
138
139 const bool c_mark_old = cs_subset_bool(NeoMutt->sub, "mark_old");
140
141 if (c_mark_old && (nd->last_cached >= nd->first_message) &&
142 (nd->last_cached <= nd->last_message))
143 {
144 return nd->last_message - nd->last_cached;
145 }
146
147 return nd->unread;
148}
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:104
Container for Accounts, Notifications.
Definition neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition neomutt.h:49
NNTP-specific Mailbox data -.
Definition mdata.h:34
anum_t last_cached
Last cached article.
Definition mdata.h:40
anum_t last_message
Last article number.
Definition mdata.h:38
anum_t unread
Unread articles.
Definition mdata.h:41
anum_t first_message
First article number.
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 153 of file expando_browser.c.

154{
155 const struct Folder *folder = data;
156
157 return folder->num + 1;
158}

◆ 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 163 of file expando_browser.c.

164{
165 const struct Folder *folder = data;
166
167 return folder->ff->poll_new_mail;
168}

◆ 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 173 of file expando_browser.c.

175{
176 const struct Folder *folder = data;
177
178 return folder->ff->nd->unread;
179}

◆ nntp_port()

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

Newsrc: Port - Implements get_number_t -.

Definition at line 66 of file expando_newsrc.c.

67{
68 const struct NntpAccountData *adata = data;
69 const struct ConnAccount *cac = &adata->conn->account;
70
71 return cac->port;
72}
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:63

◆ 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 77 of file expando_newsrc.c.

78{
79 const struct NntpAccountData *adata = data;
80 const struct ConnAccount *cac = &adata->conn->account;
81
82 if (cac->flags & MUTT_ACCT_PORT)
83 return cac->port;
84
85 return 0;
86}
#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.
int num
Index number.

◆ msgid_day_num()

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

Message Id: Day - Implements get_number_t -.

Definition at line 55 of file expando_msgid.c.

56{
57 struct MsgIdData *mid = data;
58
59 return mid->tm.tm_mday;
60}
Data to generate a Message-ID.
struct tm tm
Time Now (tm)

◆ msgid_hour_num()

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

Message Id: Hour - Implements get_number_t -.

Definition at line 76 of file expando_msgid.c.

77{
78 struct MsgIdData *mid = data;
79
80 return mid->tm.tm_hour;
81}

◆ msgid_minute_num()

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

Message Id: Minute - Implements get_number_t -.

Definition at line 86 of file expando_msgid.c.

87{
88 struct MsgIdData *mid = data;
89
90 return mid->tm.tm_min;
91}

◆ msgid_month_num()

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

Message Id: Month - Implements get_number_t -.

Definition at line 96 of file expando_msgid.c.

97{
98 struct MsgIdData *mid = data;
99
100 return mid->tm.tm_mon + 1;
101}

◆ msgid_pid_num()

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

Message Id: Process Id - Implements get_number_t -.

Definition at line 106 of file expando_msgid.c.

107{
108 return getpid();
109}

◆ msgid_second_num()

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

Message Id: Second - Implements get_number_t -.

Definition at line 164 of file expando_msgid.c.

165{
166 struct MsgIdData *mid = data;
167
168 return mid->tm.tm_sec;
169}

◆ msgid_year_num()

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

Message Id: Year (4 digit) - Implements get_number_t -.

Definition at line 174 of file expando_msgid.c.

175{
176 struct MsgIdData *mid = data;
177
178 return mid->tm.tm_year + 1900;
179}

◆ 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:665
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
Definition mailbox.h:80
Info about folders in the sidebar.
Definition private.h:42
struct Mailbox * mailbox
Mailbox this represents.
Definition private.h:46
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 114 of file expando.c.

116{
117 const struct SidebarData *sdata = data;
118 const struct SbEntry *sbe = sdata->entry;
119 const struct Mailbox *m = sbe->mailbox;
120
121 return m->msg_flagged;
122}

◆ sidebar_fuzzy_score_num()

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

Sidebar: Fuzzy Score - Implements get_number_t -.

Definition at line 127 of file expando.c.

129{
130 const struct SidebarData *sdata = data;
131 const struct SbEntry *sbe = sdata->entry;
132
133 return sbe->score;
134}
int score
Fuzzy-match score.
Definition private.h:49

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

141{
142 const struct SidebarData *sdata = data;
143 const struct SbEntry *sbe = sdata->entry;
144 const struct IndexSharedData *shared = sdata->shared;
145 const struct Mailbox *m = sbe->mailbox;
146 const struct Mailbox *m_cur = shared->mailbox;
147
148 const bool c = m_cur && mutt_str_equal(m_cur->realpath, m->realpath);
149
150 return c ? m_cur->vcount : m->msg_count;
151}
+ 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 156 of file expando.c.

158{
159 const struct SidebarData *sdata = data;
160 const struct SbEntry *sbe = sdata->entry;
161 const struct Mailbox *m = sbe->mailbox;
162
163 return m->msg_count;
164}

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

198{
199 const struct SidebarData *sdata = data;
200 const struct SbEntry *sbe = sdata->entry;
201 const struct Mailbox *m = sbe->mailbox;
202
203 return m->has_new;
204}
bool has_new
Mailbox has new mail.
Definition mailbox.h:84

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

210{
211 const struct SidebarData *sdata = data;
212 const struct SbEntry *sbe = sdata->entry;
213 const struct Mailbox *m = sbe->mailbox;
214
215 return m->notify_user;
216}
bool notify_user
Notify the user of new mail.
Definition mailbox.h:112

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

222{
223 const struct SidebarData *sdata = data;
224 const struct SbEntry *sbe = sdata->entry;
225 const struct Mailbox *m = sbe->mailbox;
226
227 return m->msg_unread - m->msg_new;
228}

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

234{
235 const struct SidebarData *sdata = data;
236 const struct SbEntry *sbe = sdata->entry;
237 const struct Mailbox *m = sbe->mailbox;
238
239 return m->poll_new_mail;
240}
bool poll_new_mail
Check for new mail.
Definition mailbox.h:114

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

246{
247 const struct SidebarData *sdata = data;
248 const struct SbEntry *sbe = sdata->entry;
249 const struct Mailbox *m = sbe->mailbox;
250
251 return m->msg_count - m->msg_unread;
252}

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

259{
260 const struct SidebarData *sdata = data;
261 const struct SbEntry *sbe = sdata->entry;
262 const struct IndexSharedData *shared = sdata->shared;
263 const struct Mailbox *m = sbe->mailbox;
264 const struct Mailbox *m_cur = shared->mailbox;
265
266 const bool c = m_cur && mutt_str_equal(m_cur->realpath, m->realpath);
267
268 return c ? m_cur->msg_tagged : 0;
269}
+ 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 274 of file expando.c.

276{
277 const struct SidebarData *sdata = data;
278 const struct SbEntry *sbe = sdata->entry;
279 const struct Mailbox *m = sbe->mailbox;
280
281 return m->msg_unread;
282}

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

289{
290 const struct SidebarData *sdata = data;
291 const struct SbEntry *sbe = sdata->entry;
292 const struct Mailbox *m = sbe->mailbox;
293
294 return m->msg_new;
295}