NeoMutt  2025-01-09-117-gace867
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
Expando Get String API

Get some string data. More...

+ Collaboration diagram for Expando Get String API:

Functions

static void alias_address (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Alias: Full Address - Implements get_string_t -.
 
static void alias_alias (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Alias: Alias name - Implements get_string_t -.
 
static void alias_comment (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Alias: Comment - Implements get_string_t -.
 
static void alias_email (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Alias: Email Address - Implements get_string_t -.
 
static void alias_name (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Alias: Personal Name - Implements get_string_t -.
 
static void alias_tags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Alias: Tags - Implements get_string_t -.
 
static void alias_view_flags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 AliasView: Flags - Implements get_string_t -.
 
static void alias_view_tagged (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 AliasView: Tagged char - Implements get_string_t -.
 
static void attach_charset (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Attachment: Charset - Implements get_string_t -.
 
static void attach_tree (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Attachment: Tree characters - Implements get_string_t -.
 
static void body_attach_qualifies (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: Attachment counting - Implements get_string_t -.
 
static void body_charset_convert (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: Requires conversion flag - Implements get_string_t -.
 
static void body_deleted (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: Deleted - Implements get_string_t -.
 
static void body_description (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: Description - Implements get_string_t -.
 
static void body_disposition (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: Disposition flag - Implements get_string_t -.
 
static void body_file (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: Filename - Implements get_string_t -.
 
static void body_file_disposition (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: Filename in header - Implements get_string_t -.
 
static void body_file_size (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: Size - Implements get_string_t -.
 
static void body_mime_encoding (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: MIME type - Implements get_string_t -.
 
static void body_mime_major (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: Major MIME type - Implements get_string_t -.
 
static void body_mime_minor (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: MIME subtype - Implements get_string_t -.
 
static void body_tagged (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: Is Tagged - Implements get_string_t -.
 
static void body_unlink (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Body: Unlink flag - Implements get_string_t -.
 
static void autocrypt_address (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Autocrypt: Address - Implements get_string_t -.
 
static void autocrypt_enabled (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Autocrypt: Status flag - Implements get_string_t -.
 
static void autocrypt_keyid (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Autocrypt: GPG Key - Implements get_string_t -.
 
static void autocrypt_prefer_encrypt (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Autocrypt: Prefer-encrypt flag - Implements get_string_t -.
 
static void folder_date (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Last modified - Implements get_string_t -.
 
static void folder_date_format (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Last modified ($date_format) - Implements get_string_t -.
 
static void folder_date_strf (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Last modified (strftime) - Implements get_string_t -.
 
static void folder_description (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Description - Implements get_string_t -.
 
static void folder_filename (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Filename - Implements get_string_t -.
 
static void folder_file_group (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Group name - Implements get_string_t -.
 
static void folder_file_mode (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: File permissions - Implements get_string_t -.
 
static void folder_file_owner (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Owner name - Implements get_string_t -.
 
static void folder_file_size (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Size in bytes - Implements get_string_t -.
 
static void folder_hard_links (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Hard links - Implements get_string_t -.
 
static void folder_message_count (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Number of messages - Implements get_string_t -.
 
static void folder_new_mail (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: New mail flag - Implements get_string_t -.
 
static void folder_tagged (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Is Tagged - Implements get_string_t -.
 
static void folder_unread_count (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Browser: Number of unread messages - Implements get_string_t -.
 
static void global_padding_space (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Fixed whitespace - Implements get_string_t -.
 
static void compress_from (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Compress: From filename - Implements get_string_t -.
 
static void compress_to (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Compress: To filename - Implements get_string_t -.
 
static void compose_attach_size (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Compose: Size in bytes - Implements get_string_t -.
 
static void global_hostname (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Compose: Hostname - Implements get_string_t -.
 
static void global_version (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Compose: Version - Implements get_string_t -.
 
static void history_match (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 History: History match - Implements get_string_t -.
 
static void email_body_characters (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Number of raw bytes - Implements get_string_t -.
 
static void email_combined_flags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Status flags - Implements get_string_t -.
 
static void email_crypto_flags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Message crypto flags - Implements get_string_t -.
 
static void email_date_format (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Sent date and time - Implements get_string_t -.
 
static void email_date_format_local (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Sent local date and time - Implements get_string_t -.
 
static void email_date_strf (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Sent date and time - Implements get_string_t -.
 
static void email_date_strf_local (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Sent local date and time - Implements get_string_t -.
 
static void email_flag_chars (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Status flag - Implements get_string_t -.
 
static void email_from_list (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: List address - Implements get_string_t -.
 
static void email_index_hook (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: index-format-hook - Implements get_string_t -.
 
static void email_list_or_save_folder (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: List Name or Save folder - Implements get_string_t -.
 
static void email_message_flags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Message tag flags - Implements get_string_t -.
 
static void email_size (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Number of bytes - Implements get_string_t -.
 
static void email_status_flags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Message status flags - Implements get_string_t -.
 
static void email_strf_recv_local (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Received local date and time - Implements get_string_t -.
 
static void email_tags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Message tags - Implements get_string_t -.
 
static void email_tags_transformed (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Individual tag - Implements get_string_t -.
 
static void email_thread_hidden_count (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Number of hidden messages - Implements get_string_t -.
 
static void email_thread_tags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Tags - Implements get_string_t -.
 
static void email_to_chars (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: $to_chars flag - Implements get_string_t -.
 
static void envelope_cc_all (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Cc recipients - Implements get_string_t -.
 
static void envelope_first_name (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: First name - Implements get_string_t -.
 
static void envelope_from (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Author Address - Implements get_string_t -.
 
static void envelope_from_full (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Sender - Implements get_string_t -.
 
static void envelope_initials (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Initials of author - Implements get_string_t -.
 
static void envelope_list_address (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Email list - Implements get_string_t -.
 
static void envelope_list_empty (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Mailing list - Implements get_string_t -.
 
static void envelope_message_id (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Message-id - Implements get_string_t -.
 
static void envelope_name (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Author's real name - Implements get_string_t -.
 
static void envelope_newsgroup (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Newsgroup name - Implements get_string_t -.
 
static void envelope_organization (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Organization - Implements get_string_t -.
 
static void envelope_reply_to (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Reply-to address - Implements get_string_t -.
 
static void envelope_sender (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Author name - Implements get_string_t -.
 
static void envelope_sender_plain (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Plain author name - Implements get_string_t -.
 
static void envelope_spam (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Spam attributes - Implements get_string_t -.
 
static void envelope_subject (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Subject - Implements get_string_t -.
 
static void envelope_thread_tree (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Thread tree - Implements get_string_t -.
 
static void envelope_thread_x_label (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: X-Label (if different) - Implements get_string_t -.
 
static void envelope_to (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: To field - Implements get_string_t -.
 
static void envelope_to_all (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: To recipients - Implements get_string_t -.
 
static void envelope_username (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: User name - Implements get_string_t -.
 
static void envelope_x_comment_to (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: X-Comment-To - Implements get_string_t -.
 
static void envelope_x_label (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: X-Label - Implements get_string_t -.
 
static void mailbox_mailbox_name (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Filename - Implements get_string_t -.
 
static void mailbox_percentage (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Index: Progress indicator - Implements get_string_t -.
 
static void global_config_sort (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Status: Sorting mode - Implements get_string_t -.
 
static void global_config_sort_aux (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Status: Aux sorting method - Implements get_string_t -.
 
static void global_config_use_threads (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Status: Current threading mode - Implements get_string_t -.
 
static void index_description (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Status: Description of the mailbox - Implements get_string_t -.
 
static void index_limit_pattern (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Status: Active limit pattern - Implements get_string_t -.
 
static void index_limit_size (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Status: Size of the messages - Implements get_string_t -.
 
static void index_mailbox_path (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Status: pathname of the mailbox - Implements get_string_t -.
 
static void index_mailbox_size (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Status: Size of the current mailbox - Implements get_string_t -.
 
static void index_readonly (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Status: Modified/read-only flag - Implements get_string_t -.
 
static void menu_percentage (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Status: Percentage through index - Implements get_string_t -.
 
static void pgp_command_file_message (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP Command: Filename of message - Implements get_string_t -.
 
static void pgp_command_file_signature (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP Command: Filename of signature - Implements get_string_t -.
 
static void pgp_command_key_ids (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP Command: key IDs - Implements get_string_t -.
 
static void pgp_command_need_pass (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP Command: PGPPASSFD=0 if passphrase is needed - Implements get_string_t -.
 
static void pgp_command_sign_as (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP Command: $pgp_sign_as or $pgp_default_key - Implements get_string_t -.
 
static void gpgme_entry_trust (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 GPGME: Trust/validity - Implements get_string_t -.
 
static void gpgme_entry_user_id (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 GPGME: User id - Implements get_string_t -.
 
static void gpgme_key_algorithm (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 GPGME: Key Algorithm - Implements get_string_t -.
 
static void gpgme_key_capabilities (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 GPGME: Key Capabilities - Implements get_string_t -.
 
static void gpgme_key_date (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 GPGME: Date of the key - Implements get_string_t -.
 
static void gpgme_key_fingerprint (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 GPGME: Key fingerprint - Implements get_string_t -.
 
static void gpgme_key_flags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 GPGME: Key Flags - Implements get_string_t -.
 
static void gpgme_key_id (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 GPGME: Key id - Implements get_string_t -.
 
static void gpgme_key_protocol (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 GPGME: Protocol - Implements get_string_t -.
 
static void pgp_entry_ignore (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: Field not supported - Implements get_string_t -.
 
static void pgp_entry_trust (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: Trust/validity - Implements get_string_t -.
 
static void pgp_entry_user_id (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: User id - Implements get_string_t -.
 
static void pgp_key_algorithm (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: Key Algorithm - Implements get_string_t -.
 
static void pgp_key_capabilities (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: Key Capabilities - Implements get_string_t -.
 
static void pgp_key_date (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: Date of the key - Implements get_string_t -.
 
static void pgp_key_flags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: Key Flags - Implements get_string_t -.
 
static void pgp_key_id (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: Key id - Implements get_string_t -.
 
static void pgp_pkey_algorithm (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: Principal Key Algorithm - Implements get_string_t -.
 
static void pgp_pkey_capabilities (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: Principal Key Capabilities - Implements get_string_t -.
 
static void pgp_pkey_flags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: Principal Key Flags - Implements get_string_t -.
 
static void pgp_pkey_id (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 PGP: Principal Key id - Implements get_string_t -.
 
static void smime_command_algorithm (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Smime Command: algorithm - Implements get_string_t -.
 
static void smime_command_certificate_ids (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Smime Command: certificate IDs - Implements get_string_t -.
 
static void smime_command_certificate_path (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Smime Command: CA location - Implements get_string_t -.
 
static void smime_command_digest_algorithm (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Smime Command: Message digest algorithm - Implements get_string_t -.
 
static void smime_command_intermediate_ids (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Smime Command: Intermediate certificates - Implements get_string_t -.
 
static void smime_command_key (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Smime Command: Key-pair - Implements get_string_t -.
 
static void smime_command_message_file (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Smime Command: Filename of message - Implements get_string_t -.
 
static void smime_command_signature_file (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Smime Command: Filename of signature - Implements get_string_t -.
 
static void group_index_description (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 NNTP: Description - Implements get_string_t -.
 
static void group_index_flags (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 NNTP: Moderated flag - Implements get_string_t -.
 
static void group_index_flags2 (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 NNTP: New flag - Implements get_string_t -.
 
static void group_index_newsgroup (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 NNTP: Newsgroup name - Implements get_string_t -.
 
static void nntp_account (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Newsrc: Account url - Implements get_string_t -.
 
static void nntp_port_if (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Newsrc: Port if specified - Implements get_string_t -.
 
static void nntp_schema (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Newsrc: Url schema - Implements get_string_t -.
 
static void nntp_server (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Newsrc: News server name - Implements get_string_t -.
 
static void nntp_username (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Newsrc: Username - Implements get_string_t -.
 
static void pattern_description (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Pattern: pattern description - Implements get_string_t -.
 
static void pattern_expression (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Pattern: pattern expression - Implements get_string_t -.
 
static void greeting_real_name (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Greeting: Real name - Implements get_string_t -.
 
static void greeting_login_name (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Greeting: Login name - Implements get_string_t -.
 
static void greeting_first_name (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Greeting: First name - Implements get_string_t -.
 
static void sidebar_description (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Sidebar: Descriptive name - Implements get_string_t -.
 
static void sidebar_flagged (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Sidebar: Flagged flags - Implements get_string_t -.
 
static void sidebar_name (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Sidebar: Name of the mailbox - Implements get_string_t -.
 
static void sidebar_new_mail (const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
 Sidebar: New mail flag - Implements get_string_t -.
 

Detailed Description

Get some string data.

Parameters
[in]nodeExpandoNode containing the callback
[in]dataPrivate data
[in]flagsFlags, see MuttFormatFlags
[out]bufBuffer in which to save string

Get some string data to be formatted.

Function Documentation

◆ alias_address()

static void alias_address ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Alias: Full Address - Implements get_string_t -.

Definition at line 42 of file expando.c.

44{
45 const struct AliasView *av = data;
46 const struct Alias *alias = av->alias;
47
48 mutt_addrlist_write(&alias->addr, buf, true);
49}
size_t mutt_addrlist_write(const struct AddressList *al, struct Buffer *buf, bool display)
Write an Address to a buffer.
Definition: address.c:1206
GUI data wrapping an Alias.
Definition: gui.h:38
struct Alias * alias
Alias.
Definition: gui.h:46
A shortcut for an email address or addresses.
Definition: alias.h:35
struct AddressList addr
List of Addresses the Alias expands to.
Definition: alias.h:37
+ Here is the call graph for this function:

◆ alias_alias()

static void alias_alias ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Alias: Alias name - Implements get_string_t -.

Definition at line 54 of file expando.c.

56{
57 const struct AliasView *av = data;
58 const struct Alias *alias = av->alias;
59
60 const char *s = alias->name;
61 buf_strcpy(buf, s);
62}
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Definition: buffer.c:395
char * name
Short name.
Definition: alias.h:36
+ Here is the call graph for this function:

◆ alias_comment()

static void alias_comment ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Alias: Comment - Implements get_string_t -.

Definition at line 67 of file expando.c.

69{
70 const struct AliasView *av = data;
71 const struct Alias *alias = av->alias;
72
73 const char *s = alias->comment;
74 buf_strcpy(buf, s);
75}
char * comment
Free-form comment string.
Definition: alias.h:38
+ Here is the call graph for this function:

◆ alias_email()

static void alias_email ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Alias: Email Address - Implements get_string_t -.

Definition at line 80 of file expando.c.

82{
83 const struct AliasView *av = data;
84 const struct Alias *alias = av->alias;
85
86 struct Address *a = NULL;
87 TAILQ_FOREACH(a, &alias->addr, entries)
88 {
89 struct Address *next = TAILQ_NEXT(a, entries);
90
91 buf_add_printf(buf, "<%s>", buf_string(a->mailbox));
92 if (next)
93 buf_addstr(buf, ", ");
94 }
95}
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
Definition: buffer.c:204
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
Definition: buffer.c:226
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:96
#define TAILQ_FOREACH(var, head, field)
Definition: queue.h:782
#define TAILQ_NEXT(elm, field)
Definition: queue.h:889
An email address.
Definition: address.h:36
struct Buffer * mailbox
Mailbox and host address.
Definition: address.h:38
+ Here is the call graph for this function:

◆ alias_name()

static void alias_name ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Alias: Personal Name - Implements get_string_t -.

Definition at line 100 of file expando.c.

102{
103 const struct AliasView *av = data;
104 const struct Alias *alias = av->alias;
105
106 struct Address *a = NULL;
107 TAILQ_FOREACH(a, &alias->addr, entries)
108 {
109 struct Address *next = TAILQ_NEXT(a, entries);
110
112 if (next)
113 buf_addstr(buf, ", ");
114 }
115}
struct Buffer * personal
Real name of address.
Definition: address.h:37
+ Here is the call graph for this function:

◆ alias_tags()

static void alias_tags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Alias: Tags - Implements get_string_t -.

Definition at line 120 of file expando.c.

122{
123 const struct AliasView *av = data;
124
125 alias_tags_to_buffer(&av->alias->tags, buf);
126}
void alias_tags_to_buffer(struct TagList *tl, struct Buffer *buf)
Write a comma-separated list of tags to a Buffer.
Definition: commands.c:49
struct TagList tags
Tags.
Definition: alias.h:39
+ Here is the call graph for this function:

◆ alias_view_flags()

static void alias_view_flags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

AliasView: Flags - Implements get_string_t -.

Definition at line 131 of file expando.c.

133{
134 const struct AliasView *av = data;
135
136 // NOTE(g0mb4): use $flag_chars?
137 const char *s = av->is_deleted ? "D" : " ";
138 buf_strcpy(buf, s);
139}
bool is_deleted
Is it deleted?
Definition: gui.h:44
+ Here is the call graph for this function:

◆ alias_view_tagged()

static void alias_view_tagged ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

AliasView: Tagged char - Implements get_string_t -.

Definition at line 163 of file expando.c.

165{
166 const struct AliasView *av = data;
167
168 // NOTE(g0mb4): use $flag_chars?
169 const char *s = av->is_tagged ? "*" : " ";
170 buf_strcpy(buf, s);
171}
bool is_tagged
Is it tagged?
Definition: gui.h:43
+ Here is the call graph for this function:

◆ attach_charset()

static void attach_charset ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Attachment: Charset - Implements get_string_t -.

Definition at line 48 of file expando.c.

50{
51 const struct AttachPtr *aptr = data;
52
53 char tmp[128] = { 0 };
54
55 if (mutt_is_text_part(aptr->body) && mutt_body_get_charset(aptr->body, tmp, sizeof(tmp)))
56 {
57 buf_strcpy(buf, tmp);
58 }
59}
char * mutt_body_get_charset(struct Body *b, char *buf, size_t buflen)
Get a body's character set.
Definition: body.c:133
bool mutt_is_text_part(const struct Body *b)
Is this part of an email in plain text?
Definition: muttlib.c:407
An email to which things will be attached.
Definition: attach.h:35
struct Body * body
Attachment.
Definition: attach.h:36
+ Here is the call graph for this function:

◆ attach_tree()

static void attach_tree ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Attachment: Tree characters - Implements get_string_t -.

Definition at line 74 of file expando.c.

76{
77 const struct AttachPtr *aptr = data;
78
80 node_expando_set_has_tree(node, true);
81 const char *s = aptr->tree;
82 buf_strcpy(buf, s);
83}
@ MT_COLOR_TREE
Index: tree-drawing characters.
Definition: color.h:84
void node_expando_set_color(const struct ExpandoNode *node, int cid)
Set the colour for an Expando.
Definition: node_expando.c:100
void node_expando_set_has_tree(const struct ExpandoNode *node, bool has_tree)
Set the has_tree flag for an Expando.
Definition: node_expando.c:115
char * tree
Tree characters to display.
Definition: attach.h:39
+ Here is the call graph for this function:

◆ body_attach_qualifies()

static void body_attach_qualifies ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: Attachment counting - Implements get_string_t -.

Definition at line 99 of file expando.c.

101{
102 const struct AttachPtr *aptr = data;
103
104 // NOTE(g0mb4): use $to_chars?
105 const char *s = aptr->body->attach_qualifies ? "Q" : " ";
106 buf_strcpy(buf, s);
107}
bool attach_qualifies
This attachment should be counted.
Definition: body.h:87
+ Here is the call graph for this function:

◆ body_charset_convert()

static void body_charset_convert ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: Requires conversion flag - Implements get_string_t -.

Definition at line 122 of file expando.c.

124{
125 const struct AttachPtr *aptr = data;
126
127 // NOTE(g0mb4): use $to_chars?
128 const char *s = ((aptr->body->type != TYPE_TEXT) || aptr->body->noconv) ? "n" : "c";
129 buf_strcpy(buf, s);
130}
@ TYPE_TEXT
Type: 'text/*'.
Definition: mime.h:38
bool noconv
Don't do character set conversion.
Definition: body.h:46
unsigned int type
content-type primary type, ContentType
Definition: body.h:40
+ Here is the call graph for this function:

◆ body_deleted()

static void body_deleted ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: Deleted - Implements get_string_t -.

Definition at line 135 of file expando.c.

137{
138 const struct AttachPtr *aptr = data;
139
140 // NOTE(g0mb4): use $to_chars?
141 const char *s = aptr->body->deleted ? "D" : " ";
142 buf_strcpy(buf, s);
143}
bool deleted
Attachment marked for deletion.
Definition: body.h:88
+ Here is the call graph for this function:

◆ body_description()

static void body_description ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: Description - Implements get_string_t -.

Definition at line 157 of file expando.c.

159{
160 const struct AttachPtr *aptr = data;
161
162 const struct Expando *c_message_format = cs_subset_expando(NeoMutt->sub, "message_format");
163 if (aptr->body->description)
164 {
165 const char *s = aptr->body->description;
166 buf_strcpy(buf, s);
167 return;
168 }
169
170 if (mutt_is_message_type(aptr->body->type, aptr->body->subtype) &&
171 c_message_format && aptr->body->email)
172 {
173 mutt_make_string(buf, -1, c_message_format, NULL, -1, aptr->body->email,
175
176 return;
177 }
178
179 if (!aptr->body->d_filename && !aptr->body->filename)
180 {
181 const char *s = "<no description>";
182 buf_strcpy(buf, s);
183 return;
184 }
185
186 body_file_disposition(node, data, flags, buf);
187}
const struct Expando * cs_subset_expando(const struct ConfigSubset *sub, const char *name)
Get an Expando config item by name.
Definition: config_type.c:361
int mutt_make_string(struct Buffer *buf, size_t max_cols, const struct Expando *exp, struct Mailbox *m, int inpgr, struct Email *e, MuttFormatFlags flags, const char *progress)
Create formatted strings using mailbox expandos.
Definition: dlg_index.c:803
bool mutt_is_message_type(int type, const char *subtype)
Determine if a mime type matches a message or not.
Definition: parse.c:1498
static void body_file_disposition(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Body: Filename in header - Implements get_string_t -.
Definition: expando.c:241
#define MUTT_FORMAT_FORCESUBJ
Print the subject even if unchanged.
Definition: render.h:34
#define MUTT_FORMAT_ARROWCURSOR
Reserve space for arrow_cursor.
Definition: render.h:37
char * d_filename
filename to be used for the content-disposition header If NULL, filename is used instead.
Definition: body.h:56
struct Email * email
header information for message/rfc822
Definition: body.h:74
char * description
content-description
Definition: body.h:55
char * subtype
content-type subtype
Definition: body.h:61
char * filename
When sending a message, this is the file to which this structure refers.
Definition: body.h:59
Parsed Expando trees.
Definition: expando.h:41
struct ExpandoNode * node
Parsed tree.
Definition: expando.h:43
Container for Accounts, Notifications.
Definition: neomutt.h:43
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:47
+ Here is the call graph for this function:

◆ body_disposition()

static void body_disposition ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: Disposition flag - Implements get_string_t -.

Definition at line 192 of file expando.c.

194{
195 const struct AttachPtr *aptr = data;
196
197 // NOTE(g0mb4): use $to_chars?
198 static const char dispchar[] = { 'I', 'A', 'F', '-' };
199 char ch;
200
201 if (aptr->body->disposition < sizeof(dispchar))
202 {
203 ch = dispchar[aptr->body->disposition];
204 }
205 else
206 {
207 mutt_debug(LL_DEBUG1, "ERROR: invalid content-disposition %d\n", aptr->body->disposition);
208 ch = '!';
209 }
210
211 buf_printf(buf, "%c", ch);
212}
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:161
#define mutt_debug(LEVEL,...)
Definition: logging2.h:90
@ LL_DEBUG1
Log at debug level 1.
Definition: logging2.h:44
unsigned int disposition
content-disposition, ContentDisposition
Definition: body.h:42
+ Here is the call graph for this function:

◆ body_file()

static void body_file ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: Filename - Implements get_string_t -.

Definition at line 217 of file expando.c.

219{
220 const struct AttachPtr *aptr = data;
221
222 if (aptr->body->filename && (*aptr->body->filename == '/'))
223 {
224 struct Buffer *path = buf_pool_get();
225
226 buf_strcpy(path, aptr->body->filename);
227 buf_pretty_mailbox(path);
228 buf_copy(buf, path);
229 buf_pool_release(&path);
230 }
231 else
232 {
233 const char *s = aptr->body->filename;
234 buf_strcpy(buf, s);
235 }
236}
size_t buf_copy(struct Buffer *dst, const struct Buffer *src)
Copy a Buffer's contents to another Buffer.
Definition: buffer.c:601
void buf_pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
Definition: muttlib.c:519
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
Definition: pool.c:82
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
Definition: pool.c:96
String manipulation buffer.
Definition: buffer.h:36
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ body_file_disposition()

static void body_file_disposition ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: Filename in header - Implements get_string_t -.

Definition at line 241 of file expando.c.

243{
244 const struct AttachPtr *aptr = data;
245
246 if (aptr->body->d_filename)
247 {
248 const char *s = aptr->body->d_filename;
249 buf_strcpy(buf, s);
250 return;
251 }
252
253 body_file(node, data, flags, buf);
254}
static void body_file(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Body: Filename - Implements get_string_t -.
Definition: expando.c:217
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ body_file_size()

static void body_file_size ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: Size - Implements get_string_t -.

Definition at line 259 of file expando.c.

261{
262 const struct AttachPtr *aptr = data;
263
264 size_t l = 0;
265 if (aptr->body->filename && (flags & MUTT_FORMAT_STAT_FILE))
266 {
267 l = mutt_file_get_size(aptr->body->filename);
268 }
269 else
270 {
271 l = aptr->body->length;
272 }
273
274 mutt_str_pretty_size(buf, l);
275}
long mutt_file_get_size(const char *path)
Get the size of a file.
Definition: file.c:1412
int mutt_str_pretty_size(struct Buffer *buf, size_t num)
Display an abbreviated size, like 3.4K.
Definition: muttlib.c:1003
#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
+ Here is the call graph for this function:

◆ body_mime_encoding()

static void body_mime_encoding ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: MIME type - Implements get_string_t -.

Definition at line 293 of file expando.c.

295{
296 const struct AttachPtr *aptr = data;
297
298 const char *s = ENCODING(aptr->body->encoding);
299 buf_strcpy(buf, s);
300}
#define ENCODING(x)
Definition: mime.h:92
unsigned int encoding
content-transfer-encoding, ContentEncoding
Definition: body.h:41
+ Here is the call graph for this function:

◆ body_mime_major()

static void body_mime_major ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: Major MIME type - Implements get_string_t -.

Definition at line 305 of file expando.c.

307{
308 const struct AttachPtr *aptr = data;
309
310 const char *s = BODY_TYPE(aptr->body);
311 buf_strcpy(buf, s);
312}
#define BODY_TYPE(body)
Definition: mime.h:89
+ Here is the call graph for this function:

◆ body_mime_minor()

static void body_mime_minor ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: MIME subtype - Implements get_string_t -.

Definition at line 317 of file expando.c.

319{
320 const struct AttachPtr *aptr = data;
321
322 const char *s = aptr->body->subtype;
323 buf_strcpy(buf, s);
324}
+ Here is the call graph for this function:

◆ body_tagged()

static void body_tagged ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: Is Tagged - Implements get_string_t -.

Definition at line 329 of file expando.c.

331{
332 const struct AttachPtr *aptr = data;
333
334 // NOTE(g0mb4): use $to_chars?
335 const char *s = aptr->body->tagged ? "*" : " ";
336 buf_strcpy(buf, s);
337}
bool tagged
This attachment is tagged.
Definition: body.h:90
+ Here is the call graph for this function:

◆ body_unlink()

static void body_unlink ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Body: Unlink flag - Implements get_string_t -.

Definition at line 351 of file expando.c.

353{
354 const struct AttachPtr *aptr = data;
355
356 // NOTE(g0mb4): use $to_chars?
357 const char *s = aptr->body->unlink ? "-" : " ";
358 buf_strcpy(buf, s);
359}
bool unlink
If true, filename should be unlink()ed before free()ing this structure.
Definition: body.h:68
+ Here is the call graph for this function:

◆ autocrypt_address()

static void autocrypt_address ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Autocrypt: Address - Implements get_string_t -.

Definition at line 41 of file expando.c.

43{
44 const struct AccountEntry *entry = data;
45
46 buf_copy(buf, entry->addr->mailbox);
47}
An entry in the Autocrypt account Menu.
Definition: private.h:46
struct Address * addr
Email address associated with the account.
Definition: private.h:49
+ Here is the call graph for this function:

◆ autocrypt_enabled()

static void autocrypt_enabled ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Autocrypt: Status flag - Implements get_string_t -.

Definition at line 52 of file expando.c.

54{
55 const struct AccountEntry *entry = data;
56
57 if (entry->account->enabled)
58 {
59 /* L10N: Autocrypt Account menu.
60 flag that an account is enabled/active */
61 buf_addstr(buf, _("active"));
62 }
63 else
64 {
65 /* L10N: Autocrypt Account menu.
66 flag that an account is disabled/inactive */
67 buf_addstr(buf, _("inactive"));
68 }
69}
#define _(a)
Definition: message.h:28
struct AutocryptAccount * account
Account details.
Definition: private.h:48
bool enabled
Is this account enabled.
Definition: lib.h:115
+ Here is the call graph for this function:

◆ autocrypt_keyid()

static void autocrypt_keyid ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Autocrypt: GPG Key - Implements get_string_t -.

Definition at line 74 of file expando.c.

76{
77 const struct AccountEntry *entry = data;
78
79 const char *s = entry->account->keyid;
80 buf_strcpy(buf, s);
81}
char * keyid
PGP Key id.
Definition: lib.h:112
+ Here is the call graph for this function:

◆ autocrypt_prefer_encrypt()

static void autocrypt_prefer_encrypt ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Autocrypt: Prefer-encrypt flag - Implements get_string_t -.

Definition at line 96 of file expando.c.

98{
99 const struct AccountEntry *entry = data;
100
101 if (entry->account->prefer_encrypt)
102 {
103 /* L10N: Autocrypt Account menu.
104 flag that an account has prefer-encrypt set */
105 buf_addstr(buf, _("prefer encrypt"));
106 }
107 else
108 {
109 /* L10N: Autocrypt Account menu.
110 flag that an account has prefer-encrypt unset;
111 thus encryption will need to be manually enabled. */
112 buf_addstr(buf, _("manual encrypt"));
113 }
114}
bool prefer_encrypt
false = nopref, true = mutual
Definition: lib.h:114
+ Here is the call graph for this function:

◆ folder_date()

static void folder_date ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: Last modified - Implements get_string_t -.

Definition at line 47 of file expando.c.

49{
50 const struct Folder *folder = data;
51 if (!folder->ff->local)
52 return;
53
54 static const time_t one_year = 31536000;
55 const char *t_fmt = ((mutt_date_now() - folder->ff->mtime) < one_year) ?
56 "%b %d %H:%M" :
57 "%b %d %Y";
58
59 char tmp[128] = { 0 };
60
61 mutt_date_localtime_format(tmp, sizeof(tmp), t_fmt, folder->ff->mtime);
62
63 buf_strcpy(buf, tmp);
64}
size_t mutt_date_localtime_format(char *buf, size_t buflen, const char *format, time_t t)
Format localtime.
Definition: date.c:951
time_t mutt_date_now(void)
Return the number of seconds since the Unix epoch.
Definition: date.c:456
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
+ Here is the call graph for this function:

◆ folder_date_format()

static void folder_date_format ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

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

Definition at line 81 of file expando.c.

83{
84 const struct Folder *folder = data;
85 if (!folder->ff->local)
86 return;
87
88 char tmp[128] = { 0 };
89 bool use_c_locale = false;
90 const char *const c_date_format = cs_subset_string(NeoMutt->sub, "date_format");
91 const char *t_fmt = NONULL(c_date_format);
92 if (*t_fmt == '!')
93 {
94 t_fmt++;
95 use_c_locale = true;
96 }
97
98 if (use_c_locale)
99 {
100 mutt_date_localtime_format_locale(tmp, sizeof(tmp), t_fmt,
101 folder->ff->mtime, NeoMutt->time_c_locale);
102 }
103 else
104 {
105 mutt_date_localtime_format(tmp, sizeof(tmp), t_fmt, folder->ff->mtime);
106 }
107
108 buf_strcpy(buf, tmp);
109}
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Definition: helpers.c:291
size_t mutt_date_localtime_format_locale(char *buf, size_t buflen, const char *format, time_t t, locale_t loc)
Format localtime using a given locale.
Definition: date.c:969
#define NONULL(x)
Definition: string2.h:37
locale_t time_c_locale
Current locale but LC_TIME=C.
Definition: neomutt.h:49
+ Here is the call graph for this function:

◆ folder_date_strf()

static void folder_date_strf ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

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

Definition at line 126 of file expando.c.

128{
129 const struct Folder *folder = data;
130
131 if (!folder->ff->local)
132 return;
133
134 bool use_c_locale = false;
135 const char *text = node->text;
136 if (*text == '!')
137 {
138 use_c_locale = true;
139 text++;
140 }
141
142 char tmp[128] = { 0 };
143 struct tm tm = mutt_date_localtime(folder->ff->mtime);
144
145 if (use_c_locale)
146 {
147 strftime_l(tmp, sizeof(tmp), text, &tm, NeoMutt->time_c_locale);
148 }
149 else
150 {
151 strftime(tmp, sizeof(tmp), text, &tm);
152 }
153
154 buf_strcpy(buf, tmp);
155}
struct tm mutt_date_localtime(time_t t)
Converts calendar time to a broken-down time structure expressed in user timezone.
Definition: date.c:906
const char * text
Node-specific text.
Definition: node.h:73
+ Here is the call graph for this function:

◆ folder_description()

static void folder_description ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: Description - Implements get_string_t -.

Definition at line 173 of file expando.c.

175{
176 const struct Folder *folder = data;
177
178 const char *s = NULL;
179 if (folder->ff->desc)
180 s = folder->ff->desc;
181 else
182 s = folder->ff->name;
183
184 buf_printf(buf, "%s%s", s,
185 folder->ff->local ?
186 (S_ISLNK(folder->ff->mode) ?
187 "@" :
188 (S_ISDIR(folder->ff->mode) ?
189 "/" :
190 (((folder->ff->mode & S_IXUSR) != 0) ? "*" : ""))) :
191 "");
192}
char * name
Name of file/dir/mailbox.
Definition: lib.h:86
char * desc
Description of mailbox.
Definition: lib.h:87
mode_t mode
File permissions.
Definition: lib.h:79
+ Here is the call graph for this function:

◆ folder_filename()

static void folder_filename ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: Filename - Implements get_string_t -.

Definition at line 197 of file expando.c.

199{
200 const struct Folder *folder = data;
201
202 const char *s = NONULL(folder->ff->name);
203
204 buf_printf(buf, "%s%s", s,
205 folder->ff->local ?
206 (S_ISLNK(folder->ff->mode) ?
207 "@" :
208 (S_ISDIR(folder->ff->mode) ?
209 "/" :
210 (((folder->ff->mode & S_IXUSR) != 0) ? "*" : ""))) :
211 "");
212}
+ Here is the call graph for this function:

◆ folder_file_group()

static void folder_file_group ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: Group name - Implements get_string_t -.

Definition at line 217 of file expando.c.

219{
220 const struct Folder *folder = data;
221 if (!folder->ff->local)
222 return;
223
224 struct group *gr = getgrgid(folder->ff->gid);
225 if (gr)
226 {
227 buf_addstr(buf, gr->gr_name);
228 }
229 else
230 {
231 buf_printf(buf, "%u", folder->ff->gid);
232 }
233}
gid_t gid
File's Group ID.
Definition: lib.h:83
+ Here is the call graph for this function:

◆ folder_file_mode()

static void folder_file_mode ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: File permissions - Implements get_string_t -.

Definition at line 238 of file expando.c.

240{
241 const struct Folder *folder = data;
242
243 if (folder->ff->local)
244 {
245 buf_printf(buf, "%c%c%c%c%c%c%c%c%c%c",
246 S_ISDIR(folder->ff->mode) ? 'd' : (S_ISLNK(folder->ff->mode) ? 'l' : '-'),
247 ((folder->ff->mode & S_IRUSR) != 0) ? 'r' : '-',
248 ((folder->ff->mode & S_IWUSR) != 0) ? 'w' : '-',
249 ((folder->ff->mode & S_ISUID) != 0) ? 's' :
250 ((folder->ff->mode & S_IXUSR) != 0) ? 'x' :
251 '-',
252 ((folder->ff->mode & S_IRGRP) != 0) ? 'r' : '-',
253 ((folder->ff->mode & S_IWGRP) != 0) ? 'w' : '-',
254 ((folder->ff->mode & S_ISGID) != 0) ? 's' :
255 ((folder->ff->mode & S_IXGRP) != 0) ? 'x' :
256 '-',
257 ((folder->ff->mode & S_IROTH) != 0) ? 'r' : '-',
258 ((folder->ff->mode & S_IWOTH) != 0) ? 'w' : '-',
259 ((folder->ff->mode & S_ISVTX) != 0) ? 't' :
260 ((folder->ff->mode & S_IXOTH) != 0) ? 'x' :
261 '-');
262 }
263 else if (folder->ff->imap)
264 {
265 /* mark folders with subfolders AND mail */
266 buf_printf(buf, "IMAP %c", (folder->ff->inferiors && folder->ff->selectable) ? '+' : ' ');
267 }
268}
bool selectable
Folder can be selected.
Definition: lib.h:96
bool imap
This is an IMAP folder.
Definition: lib.h:95
bool inferiors
Folder has children.
Definition: lib.h:97
+ Here is the call graph for this function:

◆ folder_file_owner()

static void folder_file_owner ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: Owner name - Implements get_string_t -.

Definition at line 273 of file expando.c.

275{
276 const struct Folder *folder = data;
277 if (!folder->ff->local)
278 return;
279
280 struct passwd *pw = getpwuid(folder->ff->uid);
281 if (pw)
282 {
283 buf_addstr(buf, pw->pw_name);
284 }
285 else
286 {
287 buf_printf(buf, "%u", folder->ff->uid);
288 }
289}
uid_t uid
File's User ID.
Definition: lib.h:82
+ Here is the call graph for this function:

◆ folder_file_size()

static void folder_file_size ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: Size in bytes - Implements get_string_t -.

Definition at line 294 of file expando.c.

296{
297 const struct Folder *folder = data;
298
299 mutt_str_pretty_size(buf, folder->ff->size);
300}
off_t size
File size.
Definition: lib.h:80
+ Here is the call graph for this function:

◆ folder_hard_links()

static void folder_hard_links ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: Hard links - Implements get_string_t -.

Definition at line 314 of file expando.c.

316{
317 const struct Folder *folder = data;
318 if (!folder->ff->local)
319 return;
320
321 buf_add_printf(buf, "%d", (int) folder->ff->nlink);
322}
nlink_t nlink
Number of hard links.
Definition: lib.h:84
+ Here is the call graph for this function:

◆ folder_message_count()

static void folder_message_count ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: Number of messages - Implements get_string_t -.

Definition at line 340 of file expando.c.

342{
343 const struct Folder *folder = data;
344 if (!folder->ff->has_mailbox)
345 return;
346
347 buf_add_printf(buf, "%d", folder->ff->msg_count);
348}
bool has_mailbox
This is a mailbox.
Definition: lib.h:98
int msg_count
total number of messages
Definition: lib.h:90
+ Here is the call graph for this function:

◆ folder_new_mail()

static void folder_new_mail ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: New mail flag - Implements get_string_t -.

Definition at line 367 of file expando.c.

369{
370 const struct Folder *folder = data;
371
372 // NOTE(g0mb4): use $to_chars?
373 const char *s = folder->ff->has_new_mail ? "N" : " ";
374 buf_strcpy(buf, s);
375}
bool has_new_mail
true if mailbox has "new mail"
Definition: lib.h:89
+ Here is the call graph for this function:

◆ folder_tagged()

static void folder_tagged ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: Is Tagged - Implements get_string_t -.

Definition at line 419 of file expando.c.

421{
422 const struct Folder *folder = data;
423
424 // NOTE(g0mb4): use $to_chars?
425 const char *s = folder->ff->tagged ? "*" : " ";
426 buf_strcpy(buf, s);
427}
bool tagged
Folder is tagged.
Definition: lib.h:102
+ Here is the call graph for this function:

◆ folder_unread_count()

static void folder_unread_count ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Browser: Number of unread messages - Implements get_string_t -.

Definition at line 441 of file expando.c.

443{
444 const struct Folder *folder = data;
445 if (!folder->ff->has_mailbox)
446 return;
447
448 buf_add_printf(buf, "%d", folder->ff->msg_unread);
449}
int msg_unread
number of unread messages
Definition: lib.h:91
+ Here is the call graph for this function:

◆ global_padding_space()

static void global_padding_space ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Fixed whitespace - Implements get_string_t -.

Definition at line 468 of file expando.c.

470{
471 buf_addstr(buf, " ");
472}
+ Here is the call graph for this function:

◆ compress_from()

static void compress_from ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Compress: From filename - Implements get_string_t -.

Definition at line 40 of file expando.c.

42{
43 const struct Mailbox *m = data;
44
45 struct Buffer *quoted = buf_pool_get();
46 buf_quote_filename(quoted, m->realpath, false);
47 buf_copy(buf, quoted);
48 buf_pool_release(&quoted);
49}
void buf_quote_filename(struct Buffer *buf, const char *filename, bool add_outer)
Quote a filename to survive the shell's quoting rules.
Definition: file.c:810
A mailbox.
Definition: mailbox.h:79
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
Definition: mailbox.h:81
+ Here is the call graph for this function:

◆ compress_to()

static void compress_to ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Compress: To filename - Implements get_string_t -.

Definition at line 54 of file expando.c.

56{
57 const struct Mailbox *m = data;
58
59 struct Buffer *quoted = buf_pool_get();
60 buf_quote_filename(quoted, mailbox_path(m), false);
61 buf_copy(buf, quoted);
62 buf_pool_release(&quoted);
63}
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
Definition: mailbox.h:223
+ Here is the call graph for this function:

◆ compose_attach_size()

static void compose_attach_size ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Compose: Size in bytes - Implements get_string_t -.

Definition at line 59 of file expando.c.

61{
62 const struct ComposeSharedData *shared = data;
63
64 mutt_str_pretty_size(buf, cum_attachs_size(shared->sub, shared->adata));
65}
unsigned long cum_attachs_size(struct ConfigSubset *sub, struct ComposeAttachData *adata)
Cumulative Attachments Size.
Definition: attach.c:85
Shared Compose Data.
Definition: shared_data.h:36
struct ConfigSubset * sub
Config set to use.
Definition: shared_data.h:37
struct ComposeAttachData * adata
Attachments.
Definition: shared_data.h:40
+ Here is the call graph for this function:

◆ global_hostname()

static void global_hostname ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Compose: Hostname - Implements get_string_t -.

Definition at line 80 of file expando.c.

82{
83 const char *s = ShortHostname;
84 buf_strcpy(buf, s);
85}
char * ShortHostname
Short version of the hostname.
Definition: globals.c:37
+ Here is the call graph for this function:

◆ global_version()

static void global_version ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Compose: Version - Implements get_string_t -.

Definition at line 90 of file expando.c.

92{
93 const char *s = mutt_make_version();
94 buf_strcpy(buf, s);
95}
const char * mutt_make_version(void)
Generate the NeoMutt version string.
Definition: muttlib.c:857
+ Here is the call graph for this function:

◆ history_match()

static void history_match ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

History: History match - Implements get_string_t -.

Definition at line 49 of file expando.c.

51{
52 const struct HistoryEntry *entry = data;
53
54 const char *s = entry->history;
55 buf_strcpy(buf, s);
56}
A line in the History menu.
Definition: lib.h:67
const char * history
Description of history.
Definition: lib.h:69
+ Here is the call graph for this function:

◆ email_body_characters()

static void email_body_characters ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Number of raw bytes - Implements get_string_t -.

Definition at line 400 of file expando_index.c.

402{
403 const struct EmailFormatInfo *efi = (const struct EmailFormatInfo *) data;
404 const struct Email *e = efi->email;
405 if (!e)
406 return;
407
408 if (flags & MUTT_FORMAT_INDEX)
410
412}
@ MT_COLOR_INDEX_SIZE
Index: size field.
Definition: color.h:95
size_t email_get_size(const struct Email *e)
Compute the size of an email.
Definition: email.c:121
#define MUTT_FORMAT_INDEX
This is a main index entry.
Definition: render.h:38
Data passed to index_format_str()
Definition: private.h:37
struct Email * email
Current Email.
Definition: private.h:40
The envelope/body of an email.
Definition: email.h:39
+ Here is the call graph for this function:

◆ email_combined_flags()

static void email_combined_flags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Status flags - Implements get_string_t -.

Definition at line 417 of file expando_index.c.

419{
420 const struct EmailFormatInfo *efi = data;
421 struct Email *e = efi->email;
422 if (!e)
423 return;
424
425 const int msg_in_pager = efi->msg_in_pager;
426
427 const struct MbTable *c_crypt_chars = cs_subset_mbtable(NeoMutt->sub, "crypt_chars");
428 const struct MbTable *c_flag_chars = cs_subset_mbtable(NeoMutt->sub, "flag_chars");
429 const struct MbTable *c_to_chars = cs_subset_mbtable(NeoMutt->sub, "to_chars");
430 const bool threads = mutt_using_threads();
431
432 const char *first = NULL;
433 if (threads && thread_is_new(e))
434 {
435 first = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_NEW_THREAD);
436 }
437 else if (threads && thread_is_old(e))
438 {
439 first = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_OLD_THREAD);
440 }
441 else if (e->read && (msg_in_pager != e->msgno))
442 {
443 if (e->replied)
444 {
445 first = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_REPLIED);
446 }
447 else
448 {
449 first = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_ZEMPTY);
450 }
451 }
452 else
453 {
454 if (e->old)
455 {
456 first = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_OLD);
457 }
458 else
459 {
460 first = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_NEW);
461 }
462 }
463
464 /* Marked for deletion; deleted attachments; crypto */
465 const char *second = NULL;
466 if (e->deleted)
467 second = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_DELETED);
468 else if (e->attach_del)
469 second = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_DELETED_ATTACH);
470 else if ((WithCrypto != 0) && (e->security & SEC_GOODSIGN))
471 second = mbtable_get_nth_wchar(c_crypt_chars, FLAG_CHAR_CRYPT_GOOD_SIGN);
472 else if ((WithCrypto != 0) && (e->security & SEC_ENCRYPT))
473 second = mbtable_get_nth_wchar(c_crypt_chars, FLAG_CHAR_CRYPT_ENCRYPTED);
474 else if ((WithCrypto != 0) && (e->security & SEC_SIGN))
475 second = mbtable_get_nth_wchar(c_crypt_chars, FLAG_CHAR_CRYPT_SIGNED);
476 else if (((WithCrypto & APPLICATION_PGP) != 0) && (e->security & PGP_KEY))
478 else
479 second = mbtable_get_nth_wchar(c_crypt_chars, FLAG_CHAR_CRYPT_NO_CRYPTO);
480
481 /* Tagged, flagged and recipient flag */
482 const char *third = NULL;
483 if (e->tagged)
484 third = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_TAGGED);
485 else if (e->flagged)
486 third = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_IMPORTANT);
487 else
488 third = mbtable_get_nth_wchar(c_to_chars, user_is_recipient(e));
489
490 if (flags & MUTT_FORMAT_INDEX)
492
493 buf_printf(buf, "%s%s%s", first, second, third);
494}
@ MT_COLOR_INDEX_FLAGS
Index: flags field.
Definition: color.h:92
struct MbTable * cs_subset_mbtable(const struct ConfigSubset *sub, const char *name)
Get a Multibyte table config item by name.
Definition: helpers.c:119
static bool thread_is_old(struct Email *e)
Does the email thread contain any unread emails?
static enum ToChars user_is_recipient(struct Email *e)
Is the user a recipient of the message.
static bool thread_is_new(struct Email *e)
Does the email thread contain any new emails?
@ FLAG_CHAR_CRYPT_CONTAINS_KEY
Character denoting a message contains a PGP key.
Definition: expando_index.h:58
@ FLAG_CHAR_CRYPT_SIGNED
Character denoting a message is signed.
Definition: expando_index.h:57
@ FLAG_CHAR_CRYPT_NO_CRYPTO
Character denoting a message has no cryptography information.
Definition: expando_index.h:59
@ FLAG_CHAR_CRYPT_GOOD_SIGN
Character denoting a message signed with a verified key.
Definition: expando_index.h:55
@ FLAG_CHAR_CRYPT_ENCRYPTED
Character denoting a message is PGP-encrypted.
Definition: expando_index.h:56
@ FLAG_CHAR_OLD
Character denoting an email that has been read.
Definition: expando_index.h:42
@ FLAG_CHAR_REPLIED
Character denoting an email that has been replied to.
Definition: expando_index.h:41
@ FLAG_CHAR_OLD_THREAD
Character denoting a thread of emails that has been read.
Definition: expando_index.h:44
@ FLAG_CHAR_ZEMPTY
Character denoting a read email, $index_format Z expando.
Definition: expando_index.h:47
@ FLAG_CHAR_TAGGED
Character denoting a tagged email.
Definition: expando_index.h:37
@ FLAG_CHAR_NEW
Character denoting an unread email.
Definition: expando_index.h:43
@ FLAG_CHAR_DELETED
Character denoting a deleted email.
Definition: expando_index.h:39
@ FLAG_CHAR_NEW_THREAD
Character denoting a thread containing at least one new email.
Definition: expando_index.h:45
@ FLAG_CHAR_DELETED_ATTACH
Character denoting a deleted attachment.
Definition: expando_index.h:40
@ FLAG_CHAR_IMPORTANT
Character denoting a important (flagged) email.
Definition: expando_index.h:38
const char * mbtable_get_nth_wchar(const struct MbTable *table, int index)
Extract one char from a multi-byte table.
Definition: mbtable.c:340
#define mutt_using_threads()
Definition: mutt_thread.h:113
#define SEC_GOODSIGN
Email has a valid signature.
Definition: lib.h:86
#define APPLICATION_PGP
Use PGP to encrypt/sign.
Definition: lib.h:96
#define SEC_ENCRYPT
Email is encrypted.
Definition: lib.h:84
#define PGP_KEY
Definition: lib.h:105
#define WithCrypto
Definition: lib.h:122
#define SEC_SIGN
Email is signed.
Definition: lib.h:85
int msg_in_pager
Index of Email displayed in the Pager.
Definition: private.h:39
bool read
Email is read.
Definition: email.h:50
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
Definition: email.h:43
bool old
Email is seen, but unread.
Definition: email.h:49
bool attach_del
Has an attachment marked for deletion.
Definition: email.h:99
bool flagged
Marked important?
Definition: email.h:47
bool replied
Email has been replied to.
Definition: email.h:51
int msgno
Number displayed to the user.
Definition: email.h:111
bool deleted
Email is deleted.
Definition: email.h:78
bool tagged
Email is tagged.
Definition: email.h:107
Multibyte character table.
Definition: mbtable.h:36
+ Here is the call graph for this function:

◆ email_crypto_flags()

static void email_crypto_flags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Message crypto flags - Implements get_string_t -.

Definition at line 499 of file expando_index.c.

501{
502 const struct EmailFormatInfo *efi = data;
503 const struct Email *e = efi->email;
504 if (!e)
505 return;
506
507 const struct MbTable *c_crypt_chars = cs_subset_mbtable(NeoMutt->sub, "crypt_chars");
508
509 const char *ch = NULL;
510 if ((WithCrypto != 0) && (e->security & SEC_GOODSIGN))
511 {
513 }
514 else if ((WithCrypto != 0) && (e->security & SEC_ENCRYPT))
515 {
517 }
518 else if ((WithCrypto != 0) && (e->security & SEC_SIGN))
519 {
521 }
522 else if (((WithCrypto & APPLICATION_PGP) != 0) && ((e->security & PGP_KEY) == PGP_KEY))
523 {
525 }
526 else
527 {
529 }
530
531 if (flags & MUTT_FORMAT_INDEX)
533 buf_strcpy(buf, ch);
534}
+ Here is the call graph for this function:

◆ email_date_format()

static void email_date_format ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Sent date and time - Implements get_string_t -.

Definition at line 539 of file expando_index.c.

541{
542 const struct EmailFormatInfo *efi = data;
543 const struct Email *e = efi->email;
544 if (!e)
545 return;
546
547 const char *c_date_format = cs_subset_string(NeoMutt->sub, "date_format");
548 const char *cp = NONULL(c_date_format);
549
550 index_email_date(node, e, SENT_SENDER, flags, buf, cp);
551}
static void index_email_date(const struct ExpandoNode *node, const struct Email *e, enum IndexDateChoice which, MuttFormatFlags flags, struct Buffer *buf, const char *format)
Index: Sent/Received Local/Sender date and time.
@ SENT_SENDER
Date sent in the sender's timezone.
Definition: expando_index.c:88
+ Here is the call graph for this function:

◆ email_date_format_local()

static void email_date_format_local ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Sent local date and time - Implements get_string_t -.

Definition at line 556 of file expando_index.c.

558{
559 const struct EmailFormatInfo *efi = data;
560 const struct Email *e = efi->email;
561 if (!e)
562 return;
563
564 const char *c_date_format = cs_subset_string(NeoMutt->sub, "date_format");
565 const char *cp = NONULL(c_date_format);
566
567 index_email_date(node, e, SENT_LOCAL, flags, buf, cp);
568}
@ SENT_LOCAL
Date sent in the local timezone.
Definition: expando_index.c:89
+ Here is the call graph for this function:

◆ email_date_strf()

static void email_date_strf ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Sent date and time - Implements get_string_t -.

Definition at line 600 of file expando_index.c.

602{
603 const struct EmailFormatInfo *efi = data;
604 const struct Email *e = efi->email;
605 if (!e)
606 return;
607
608 index_email_date(node, e, SENT_SENDER, flags, buf, node->text);
609}
+ Here is the call graph for this function:

◆ email_date_strf_local()

static void email_date_strf_local ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Sent local date and time - Implements get_string_t -.

Definition at line 627 of file expando_index.c.

629{
630 const struct EmailFormatInfo *efi = data;
631 const struct Email *e = efi->email;
632 if (!e)
633 return;
634
635 index_email_date(node, e, SENT_LOCAL, flags, buf, node->text);
636}
+ Here is the call graph for this function:

◆ email_flag_chars()

static void email_flag_chars ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Status flag - Implements get_string_t -.

Definition at line 655 of file expando_index.c.

657{
658 const struct EmailFormatInfo *efi = data;
659 const struct Email *e = efi->email;
660 if (!e)
661 return;
662
663 const struct MbTable *c_flag_chars = cs_subset_mbtable(NeoMutt->sub, "flag_chars");
664 const int msg_in_pager = efi->msg_in_pager;
665
666 const char *wch = NULL;
667 if (e->deleted)
668 wch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_DELETED);
669 else if (e->attach_del)
671 else if (e->tagged)
672 wch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_TAGGED);
673 else if (e->flagged)
674 wch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_IMPORTANT);
675 else if (e->replied)
676 wch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_REPLIED);
677 else if (e->read && (msg_in_pager != e->msgno))
678 wch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_SEMPTY);
679 else if (e->old)
680 wch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_OLD);
681 else
682 wch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_NEW);
683
684 if (flags & MUTT_FORMAT_INDEX)
686
687 buf_strcpy(buf, wch);
688}
@ FLAG_CHAR_SEMPTY
Character denoting a read email, $index_format S expando.
Definition: expando_index.h:46
+ Here is the call graph for this function:

◆ email_from_list()

static void email_from_list ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: List address - Implements get_string_t -.

Definition at line 693 of file expando_index.c.

695{
696 const struct EmailFormatInfo *efi = data;
697 const struct Email *e = efi->email;
698 if (!e)
699 return;
700
701 char tmp[128] = { 0 };
702
703 make_from(e->env, tmp, sizeof(tmp), true, flags);
704
705 if (flags & MUTT_FORMAT_INDEX)
707 buf_strcpy(buf, tmp);
708}
@ MT_COLOR_INDEX_AUTHOR
Index: author field.
Definition: color.h:89
static void make_from(struct Envelope *env, char *buf, size_t buflen, bool do_lists, MuttFormatFlags flags)
Generate a From: field (with optional prefix)
struct Envelope * env
Envelope information.
Definition: email.h:68
+ Here is the call graph for this function:

◆ email_index_hook()

static void email_index_hook ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: index-format-hook - Implements get_string_t -.

Definition at line 713 of file expando_index.c.

715{
716 const struct EmailFormatInfo *efi = data;
717 struct Email *e = efi->email;
718 if (!e)
719 return;
720
721 struct Mailbox *m = efi->mailbox;
722
723 const struct Expando *exp = mutt_idxfmt_hook(node->text, m, e);
724 if (!exp)
725 return;
726
728 buf->dsize, NeoMutt->env, buf);
729}
int expando_filter(const struct Expando *exp, const struct ExpandoRenderCallback *erc, void *data, MuttFormatFlags flags, int max_cols, char **env_list, struct Buffer *buf)
Render an Expando and run the result through a filter.
Definition: filter.c:139
const struct ExpandoRenderCallback IndexRenderCallbacks[]
Callbacks for Index Expandos.
const struct Expando * mutt_idxfmt_hook(const char *name, struct Mailbox *m, struct Email *e)
Get index-format-hook format string.
Definition: hook.c:992
#define MUTT_FORMAT_NO_FLAGS
No flags are set.
Definition: render.h:33
size_t dsize
Length of data.
Definition: buffer.h:39
struct Mailbox * mailbox
Current Mailbox.
Definition: private.h:38
char ** env
Private copy of the environment variables.
Definition: neomutt.h:55
+ Here is the call graph for this function:

◆ email_list_or_save_folder()

static void email_list_or_save_folder ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: List Name or Save folder - Implements get_string_t -.

Definition at line 750 of file expando_index.c.

752{
753 const struct EmailFormatInfo *efi = data;
754 const struct Email *e = efi->email;
755 if (!e || !e->env)
756 return;
757
758 char tmp[128] = { 0 };
759 char *p = NULL;
760
761 make_from_addr(e->env, tmp, sizeof(tmp), true);
762 const bool c_save_address = cs_subset_bool(NeoMutt->sub, "save_address");
763 if (!c_save_address && (p = strpbrk(tmp, "%@")))
764 {
765 *p = '\0';
766 }
767
768 buf_strcpy(buf, tmp);
769}
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:47
static void make_from_addr(struct Envelope *env, char *buf, size_t buflen, bool do_lists)
Create a 'from' address for a reply email.
+ Here is the call graph for this function:

◆ email_message_flags()

static void email_message_flags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Message tag flags - Implements get_string_t -.

Definition at line 774 of file expando_index.c.

776{
777 const struct EmailFormatInfo *efi = data;
778 struct Email *e = efi->email;
779 if (!e)
780 return;
781
782 const struct MbTable *c_flag_chars = cs_subset_mbtable(NeoMutt->sub, "flag_chars");
783 const struct MbTable *c_to_chars = cs_subset_mbtable(NeoMutt->sub, "to_chars");
784
785 const char *ch = NULL;
786 if (e->tagged)
787 {
788 ch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_TAGGED);
789 }
790 else if (e->flagged)
791 {
792 ch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_IMPORTANT);
793 }
794 else
795 {
796 ch = mbtable_get_nth_wchar(c_to_chars, user_is_recipient(e));
797 }
798
799 if (flags & MUTT_FORMAT_INDEX)
801 buf_strcpy(buf, ch);
802}
+ Here is the call graph for this function:

◆ email_size()

static void email_size ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Number of bytes - Implements get_string_t -.

Definition at line 836 of file expando_index.c.

838{
839 const struct EmailFormatInfo *efi = data;
840 const struct Email *e = efi->email;
841 if (!e)
842 return;
843
844 if (flags & MUTT_FORMAT_INDEX)
846
848}
struct Body * body
List of MIME parts.
Definition: email.h:69
+ Here is the call graph for this function:

◆ email_status_flags()

static void email_status_flags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Message status flags - Implements get_string_t -.

Definition at line 866 of file expando_index.c.

868{
869 const struct EmailFormatInfo *efi = data;
870 struct Email *e = efi->email;
871 if (!e)
872 return;
873
874 const bool threads = mutt_using_threads();
875 const struct MbTable *c_flag_chars = cs_subset_mbtable(NeoMutt->sub, "flag_chars");
876 const int msg_in_pager = efi->msg_in_pager;
877
878 const char *ch = NULL;
879 if (e->deleted)
880 {
881 ch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_DELETED);
882 }
883 else if (e->attach_del)
884 {
886 }
887 else if (threads && thread_is_new(e))
888 {
890 }
891 else if (threads && thread_is_old(e))
892 {
894 }
895 else if (e->read && (msg_in_pager != e->msgno))
896 {
897 if (e->replied)
898 {
899 ch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_REPLIED);
900 }
901 else
902 {
903 ch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_ZEMPTY);
904 }
905 }
906 else
907 {
908 if (e->old)
909 {
910 ch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_OLD);
911 }
912 else
913 {
914 ch = mbtable_get_nth_wchar(c_flag_chars, FLAG_CHAR_NEW);
915 }
916 }
917
918 if (flags & MUTT_FORMAT_INDEX)
920 buf_strcpy(buf, ch);
921}
+ Here is the call graph for this function:

◆ email_strf_recv_local()

static void email_strf_recv_local ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Received local date and time - Implements get_string_t -.

Definition at line 926 of file expando_index.c.

928{
929 const struct EmailFormatInfo *efi = data;
930 const struct Email *e = efi->email;
931 if (!e)
932 return;
933
934 index_email_date(node, e, RECV_LOCAL, flags, buf, node->text);
935}
@ RECV_LOCAL
Date received in the local timezone.
Definition: expando_index.c:90
+ Here is the call graph for this function:

◆ email_tags()

static void email_tags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Message tags - Implements get_string_t -.

Definition at line 954 of file expando_index.c.

956{
957 const struct EmailFormatInfo *efi = data;
958 struct Email *e = efi->email;
959 if (!e)
960 return;
961
962 if (flags & MUTT_FORMAT_INDEX)
965}
@ MT_COLOR_INDEX_TAGS
Index: tags field (g, J)
Definition: color.h:98
struct TagList tags
For drivers that support server tagging.
Definition: email.h:72
void driver_tags_get_transformed(struct TagList *tl, struct Buffer *tags)
Get transformed tags separated by space.
Definition: tags.c:152
+ Here is the call graph for this function:

◆ email_tags_transformed()

static void email_tags_transformed ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Individual tag - Implements get_string_t -.

Definition at line 970 of file expando_index.c.

972{
973 const struct EmailFormatInfo *efi = data;
974 struct Email *e = efi->email;
975 if (!e)
976 return;
977
978 char *tag = mutt_hash_find(TagFormats, node->text);
979 if (!tag)
980 return;
981
982 if (flags & MUTT_FORMAT_INDEX)
985}
@ MT_COLOR_INDEX_TAG
Index: tag field (G)
Definition: color.h:97
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
Definition: hash.c:362
struct HashTable * TagFormats
Hash Table: "inbox" -> "GI" - Tag format strings.
Definition: tags.c:42
void driver_tags_get_transformed_for(struct TagList *tl, const char *name, struct Buffer *tags)
Get transformed tags for a tag name separated by space.
Definition: tags.c:187
+ Here is the call graph for this function:

◆ email_thread_hidden_count()

static void email_thread_hidden_count ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Number of hidden messages - Implements get_string_t -.

Definition at line 1002 of file expando_index.c.

1004{
1005 const struct EmailFormatInfo *efi = data;
1006 const struct Email *e = efi->email;
1007 if (!e)
1008 return;
1009
1010 const bool threads = mutt_using_threads();
1011 const bool is_index = (flags & MUTT_FORMAT_INDEX) != 0;
1012
1013 if (threads && is_index && e->collapsed && (e->num_hidden > 1))
1014 {
1015 if (flags & MUTT_FORMAT_INDEX)
1017 const int num = e->num_hidden;
1018 buf_printf(buf, "%d", num);
1019 }
1020 else if (is_index && threads)
1021 {
1022 if (flags & MUTT_FORMAT_INDEX)
1024 const char *s = " ";
1025 buf_strcpy(buf, s);
1026 }
1027}
@ MT_COLOR_INDEX_COLLAPSED
Index: number of messages in collapsed thread.
Definition: color.h:90
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_tags()

static void email_thread_tags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Tags - Implements get_string_t -.

Definition at line 1068 of file expando_index.c.

1070{
1071 const struct EmailFormatInfo *efi = data;
1072 struct Email *e = efi->email;
1073 if (!e)
1074 return;
1075
1076 bool have_tags = true;
1077 struct Buffer *tags = buf_pool_get();
1079 if (!buf_is_empty(tags))
1080 {
1081 if (flags & MUTT_FORMAT_TREE)
1082 {
1083 struct Buffer *parent_tags = buf_pool_get();
1084 if (e->thread->prev && e->thread->prev->message)
1085 {
1086 driver_tags_get_transformed(&e->thread->prev->message->tags, parent_tags);
1087 }
1088 if (!parent_tags && e->thread->parent && e->thread->parent->message)
1089 {
1091 }
1092 if (parent_tags && buf_istr_equal(tags, parent_tags))
1093 have_tags = false;
1094 buf_pool_release(&parent_tags);
1095 }
1096 }
1097 else
1098 {
1099 have_tags = false;
1100 }
1101
1102 if (flags & MUTT_FORMAT_INDEX)
1104
1105 const char *s = have_tags ? buf_string(tags) : "";
1106 buf_strcpy(buf, s);
1107
1108 buf_pool_release(&tags);
1109}
bool buf_istr_equal(const struct Buffer *a, const struct Buffer *b)
Return if two buffers are equal, case insensitive.
Definition: buffer.c:695
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
Definition: buffer.c:291
#define MUTT_FORMAT_TREE
Draw the thread tree.
Definition: render.h:35
struct MuttThread * thread
Thread of Emails.
Definition: email.h:119
struct MuttThread * parent
Parent of this Thread.
Definition: thread.h:44
struct MuttThread * prev
Previous sibling Thread.
Definition: thread.h:47
struct Email * message
Email this Thread refers to.
Definition: thread.h:49
+ Here is the call graph for this function:

◆ email_to_chars()

static void email_to_chars ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: $to_chars flag - Implements get_string_t -.

Definition at line 1114 of file expando_index.c.

1116{
1117 const struct EmailFormatInfo *efi = data;
1118 struct Email *e = efi->email;
1119 if (!e)
1120 return;
1121
1122 const struct MbTable *c_to_chars = cs_subset_mbtable(NeoMutt->sub, "to_chars");
1123
1124 int i;
1125 const char *s = (c_to_chars && ((i = user_is_recipient(e))) < c_to_chars->len) ?
1126 c_to_chars->chars[i] :
1127 " ";
1128
1129 buf_strcpy(buf, s);
1130}
int len
Number of characters.
Definition: mbtable.h:38
+ Here is the call graph for this function:

◆ envelope_cc_all()

static void envelope_cc_all ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Cc recipients - Implements get_string_t -.

Definition at line 1135 of file expando_index.c.

1137{
1138 const struct EmailFormatInfo *efi = data;
1139 const struct Email *e = efi->email;
1140 if (!e || !e->env)
1141 return;
1142
1143 mutt_addrlist_write(&e->env->cc, buf, true);
1144}
struct AddressList cc
Email's 'Cc' list.
Definition: envelope.h:61
+ Here is the call graph for this function:

◆ envelope_first_name()

static void envelope_first_name ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: First name - Implements get_string_t -.

Definition at line 1149 of file expando_index.c.

1151{
1152 const struct EmailFormatInfo *efi = data;
1153 const struct Email *e = efi->email;
1154 if (!e || !e->env)
1155 return;
1156
1157 const struct Address *from = TAILQ_FIRST(&e->env->from);
1158 const struct Address *to = TAILQ_FIRST(&e->env->to);
1159 const struct Address *cc = TAILQ_FIRST(&e->env->cc);
1160
1161 char tmp[128] = { 0 };
1162 char *p = NULL;
1163
1164 if (mutt_addr_is_user(from))
1165 {
1166 if (to)
1167 {
1168 const char *s = mutt_get_name(to);
1169 mutt_str_copy(tmp, NONULL(s), sizeof(tmp));
1170 }
1171 else if (cc)
1172 {
1173 const char *s = mutt_get_name(cc);
1174 mutt_str_copy(tmp, NONULL(s), sizeof(tmp));
1175 }
1176 }
1177 else
1178 {
1179 const char *s = mutt_get_name(from);
1180 mutt_str_copy(tmp, NONULL(s), sizeof(tmp));
1181 }
1182 p = strpbrk(tmp, " %@");
1183 if (p)
1184 {
1185 *p = '\0';
1186 }
1187
1188 buf_strcpy(buf, tmp);
1189}
bool mutt_addr_is_user(const struct Address *addr)
Does the address belong to the user.
Definition: alias.c:596
const char * mutt_get_name(const struct Address *a)
Pick the best name to display from an address.
Definition: sort.c:139
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition: string.c:582
#define TAILQ_FIRST(head)
Definition: queue.h:780
struct AddressList to
Email's 'To' list.
Definition: envelope.h:60
struct AddressList from
Email's 'From' list.
Definition: envelope.h:59
+ Here is the call graph for this function:

◆ envelope_from()

static void envelope_from ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Author Address - Implements get_string_t -.

Definition at line 1194 of file expando_index.c.

1196{
1197 const struct EmailFormatInfo *efi = data;
1198 const struct Email *e = efi->email;
1199 if (!e || !e->env)
1200 return;
1201
1202 const struct Address *from = TAILQ_FIRST(&e->env->from);
1203
1204 const char *s = NULL;
1205 if (from && from->mailbox)
1206 {
1207 s = mutt_addr_for_display(from);
1208 }
1209
1210 if (flags & MUTT_FORMAT_INDEX)
1212 buf_strcpy(buf, s);
1213}
const char * mutt_addr_for_display(const struct Address *a)
Convert an Address for display purposes.
Definition: address.c:1012
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ envelope_from_full()

static void envelope_from_full ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Sender - Implements get_string_t -.

Definition at line 1218 of file expando_index.c.

1220{
1221 const struct EmailFormatInfo *efi = data;
1222 struct Email *e = efi->email;
1223 if (!e || !e->env)
1224 return;
1225
1226 mutt_addrlist_write(&e->env->from, buf, true);
1227}
+ Here is the call graph for this function:

◆ envelope_initials()

static void envelope_initials ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Initials of author - Implements get_string_t -.

Definition at line 1232 of file expando_index.c.

1234{
1235 const struct EmailFormatInfo *efi = data;
1236 const struct Email *e = efi->email;
1237 if (!e || !e->env)
1238 return;
1239
1240 const struct Address *from = TAILQ_FIRST(&e->env->from);
1241
1242 char tmp[128] = { 0 };
1243
1244 if (mutt_mb_get_initials(mutt_get_name(from), tmp, sizeof(tmp)))
1245 {
1246 if (flags & MUTT_FORMAT_INDEX)
1248
1249 buf_strcpy(buf, tmp);
1250 return;
1251 }
1252
1253 envelope_from(node, data, flags, buf);
1254}
static void envelope_from(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Author Address - Implements get_string_t -.
bool mutt_mb_get_initials(const char *name, char *buf, size_t buflen)
Turn a name into initials.
Definition: mbyte.c:82
+ Here is the call graph for this function:

◆ envelope_list_address()

static void envelope_list_address ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Email list - Implements get_string_t -.

Definition at line 1259 of file expando_index.c.

1261{
1262 const struct EmailFormatInfo *efi = data;
1263 const struct Email *e = efi->email;
1264 if (!e || !e->env)
1265 return;
1266
1267 char tmp[128] = { 0 };
1268
1269 if (first_mailing_list(tmp, sizeof(tmp), &e->env->to) ||
1270 first_mailing_list(tmp, sizeof(tmp), &e->env->cc))
1271 {
1272 buf_strcpy(buf, tmp);
1273 return;
1274 }
1275
1276 mailbox_mailbox_name(node, data, flags, buf);
1277}
static void mailbox_mailbox_name(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Index: Filename - Implements get_string_t -.
bool first_mailing_list(char *buf, size_t buflen, struct AddressList *al)
Get the first mailing list in the list of addresses.
Definition: maillist.c:124
+ Here is the call graph for this function:

◆ envelope_list_empty()

static void envelope_list_empty ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Mailing list - Implements get_string_t -.

Definition at line 1282 of file expando_index.c.

1284{
1285 const struct EmailFormatInfo *efi = data;
1286 const struct Email *e = efi->email;
1287 if (!e || !e->env)
1288 return;
1289
1290 char tmp[128] = { 0 };
1291
1292 if (first_mailing_list(tmp, sizeof(tmp), &e->env->to) ||
1293 first_mailing_list(tmp, sizeof(tmp), &e->env->cc))
1294 {
1295 buf_strcpy(buf, tmp);
1296 }
1297}
+ Here is the call graph for this function:

◆ envelope_message_id()

static void envelope_message_id ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Message-id - Implements get_string_t -.

Definition at line 1302 of file expando_index.c.

1304{
1305 const struct EmailFormatInfo *efi = data;
1306 struct Email *e = efi->email;
1307 if (!e || !e->env)
1308 return;
1309
1310 const char *s = e->env->message_id ? e->env->message_id : "<no.id>";
1311 buf_strcpy(buf, s);
1312}
char * message_id
Message ID.
Definition: envelope.h:73
+ Here is the call graph for this function:

◆ envelope_name()

static void envelope_name ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Author's real name - Implements get_string_t -.

Definition at line 1317 of file expando_index.c.

1319{
1320 const struct EmailFormatInfo *efi = data;
1321 const struct Email *e = efi->email;
1322 if (!e || !e->env)
1323 return;
1324
1325 const struct Address *from = TAILQ_FIRST(&e->env->from);
1326
1327 if (flags & MUTT_FORMAT_INDEX)
1329
1330 const char *s = mutt_get_name(from);
1331 buf_strcpy(buf, s);
1332}
+ Here is the call graph for this function:

◆ envelope_newsgroup()

static void envelope_newsgroup ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Newsgroup name - Implements get_string_t -.

Definition at line 1337 of file expando_index.c.

1339{
1340 const struct EmailFormatInfo *efi = data;
1341 const struct Email *e = efi->email;
1342 if (!e || !e->env)
1343 return;
1344
1345 const char *s = e->env->newsgroups;
1346 buf_strcpy(buf, s);
1347}
char * newsgroups
List of newsgroups.
Definition: envelope.h:78
+ Here is the call graph for this function:

◆ envelope_organization()

static void envelope_organization ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Organization - Implements get_string_t -.

Definition at line 1352 of file expando_index.c.

1354{
1355 const struct EmailFormatInfo *efi = data;
1356 const struct Email *e = efi->email;
1357 if (!e || !e->env)
1358 return;
1359
1360 const char *s = e->env->organization;
1361 buf_strcpy(buf, s);
1362}
char * organization
Organisation header.
Definition: envelope.h:77
+ Here is the call graph for this function:

◆ envelope_reply_to()

static void envelope_reply_to ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Reply-to address - Implements get_string_t -.

Definition at line 1367 of file expando_index.c.

1369{
1370 const struct EmailFormatInfo *efi = data;
1371 const struct Email *e = efi->email;
1372 if (!e || !e->env)
1373 return;
1374
1375 const struct Address *reply_to = TAILQ_FIRST(&e->env->reply_to);
1376
1377 if (reply_to && reply_to->mailbox)
1378 {
1379 if (flags & MUTT_FORMAT_INDEX)
1381 const char *s = mutt_addr_for_display(reply_to);
1382 buf_strcpy(buf, s);
1383 return;
1384 }
1385
1386 envelope_from(node, data, flags, buf);
1387}
struct AddressList reply_to
Email's 'reply-to'.
Definition: envelope.h:64
+ Here is the call graph for this function:

◆ envelope_sender()

static void envelope_sender ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Author name - Implements get_string_t -.

Definition at line 1392 of file expando_index.c.

1394{
1395 const struct EmailFormatInfo *efi = data;
1396 struct Email *e = efi->email;
1397 if (!e || !e->env)
1398 return;
1399
1400 char tmp[128] = { 0 };
1401
1402 make_from(e->env, tmp, sizeof(tmp), false, MUTT_FORMAT_NO_FLAGS);
1403
1404 if (flags & MUTT_FORMAT_INDEX)
1406
1407 buf_strcpy(buf, tmp);
1408}
+ Here is the call graph for this function:

◆ envelope_sender_plain()

static void envelope_sender_plain ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Plain author name - Implements get_string_t -.

Definition at line 1413 of file expando_index.c.

1415{
1416 const struct EmailFormatInfo *efi = (const struct EmailFormatInfo *) data;
1417 struct Email *e = efi->email;
1418 if (!e || !e->env)
1419 return;
1420
1421 char tmp[128] = { 0 };
1422
1423 if (flags & MUTT_FORMAT_INDEX)
1425
1426 make_from(e->env, tmp, sizeof(tmp), false, MUTT_FORMAT_PLAIN);
1427
1428 buf_strcpy(buf, tmp);
1429}
#define MUTT_FORMAT_PLAIN
Do not prepend DISP_TO, DISP_CC ...
Definition: render.h:39
+ Here is the call graph for this function:

◆ envelope_spam()

static void envelope_spam ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Spam attributes - Implements get_string_t -.

Definition at line 1434 of file expando_index.c.

1436{
1437 const struct EmailFormatInfo *efi = data;
1438 struct Email *e = efi->email;
1439 if (!e || !e->env)
1440 return;
1441
1442 buf_copy(buf, &e->env->spam);
1443}
struct Buffer spam
Spam header.
Definition: envelope.h:82
+ Here is the call graph for this function:

◆ envelope_subject()

static void envelope_subject ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Subject - Implements get_string_t -.

Definition at line 1448 of file expando_index.c.

1450{
1451 const struct EmailFormatInfo *efi = data;
1452 const struct Email *e = efi->email;
1453 if (!e || !e->env)
1454 return;
1455
1456 if ((flags & MUTT_FORMAT_TREE) && !e->collapsed && !(flags & MUTT_FORMAT_FORCESUBJ))
1457 return;
1458
1459 if (flags & MUTT_FORMAT_INDEX)
1461
1463
1464 if (e->env->disp_subj)
1465 buf_strcpy(buf, e->env->disp_subj);
1466 else
1467 buf_strcpy(buf, e->env->subject);
1468}
@ MT_COLOR_INDEX_SUBJECT
Index: subject field.
Definition: color.h:96
char *const subject
Email's subject.
Definition: envelope.h:70
char * disp_subj
Display subject (modified copy of subject)
Definition: envelope.h:72
bool subjrx_apply_mods(struct Envelope *env)
Apply regex modifications to the subject.
Definition: subjectrx.c:133
+ Here is the call graph for this function:

◆ envelope_thread_tree()

static void envelope_thread_tree ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Thread tree - Implements get_string_t -.

Definition at line 1473 of file expando_index.c.

1475{
1476 const struct EmailFormatInfo *efi = data;
1477 const struct Email *e = efi->email;
1478 if (!e || !e->env)
1479 return;
1480
1481 if (!(flags & MUTT_FORMAT_TREE) || e->collapsed)
1482 return;
1483
1485 node_expando_set_has_tree(node, true);
1486 buf_strcpy(buf, e->tree);
1487}
char * tree
Character string to print thread tree.
Definition: email.h:125
+ Here is the call graph for this function:

◆ envelope_thread_x_label()

static void envelope_thread_x_label ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: X-Label (if different) - Implements get_string_t -.

Definition at line 1492 of file expando_index.c.

1494{
1495 const struct EmailFormatInfo *efi = data;
1496 const struct Email *e = efi->email;
1497 if (!e || !e->env)
1498 return;
1499
1500 bool label = true;
1501 if (e->env->x_label)
1502 {
1503 struct Email *e_tmp = NULL;
1504 if (flags & MUTT_FORMAT_TREE && (e->thread->prev && e->thread->prev->message &&
1505 e->thread->prev->message->env->x_label))
1506 {
1507 e_tmp = e->thread->prev->message;
1508 }
1509 else if (flags & MUTT_FORMAT_TREE && (e->thread->parent && e->thread->parent->message &&
1511 {
1512 e_tmp = e->thread->parent->message;
1513 }
1514
1515 if (e_tmp && mutt_istr_equal(e->env->x_label, e_tmp->env->x_label))
1516 {
1517 label = false;
1518 }
1519 }
1520 else
1521 {
1522 label = false;
1523 }
1524
1525 if (flags & MUTT_FORMAT_INDEX)
1527
1528 if (label)
1529 {
1530 const char *s = e->env->x_label;
1531 buf_strcpy(buf, s);
1532 }
1533}
@ MT_COLOR_INDEX_LABEL
Index: label field.
Definition: color.h:93
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
Definition: string.c:673
char * x_label
X-Label.
Definition: envelope.h:76
+ Here is the call graph for this function:

◆ envelope_to()

static void envelope_to ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: To field - Implements get_string_t -.

Definition at line 1538 of file expando_index.c.

1540{
1541 const struct EmailFormatInfo *efi = data;
1542 const struct Email *e = efi->email;
1543 if (!e || !e->env)
1544 return;
1545
1546 const struct Address *to = TAILQ_FIRST(&e->env->to);
1547 const struct Address *cc = TAILQ_FIRST(&e->env->cc);
1548
1549 char tmp[128] = { 0 };
1550
1551 if (!check_for_mailing_list(&e->env->to, "To ", tmp, sizeof(tmp)) &&
1552 !check_for_mailing_list(&e->env->cc, "Cc ", tmp, sizeof(tmp)))
1553 {
1554 if (to)
1555 snprintf(tmp, sizeof(tmp), "To %s", mutt_get_name(to));
1556 else if (cc)
1557 snprintf(tmp, sizeof(tmp), "Cc %s", mutt_get_name(cc));
1558 else
1559 {
1560 tmp[0] = '\0';
1561 }
1562 }
1563
1564 buf_strcpy(buf, tmp);
1565}
bool check_for_mailing_list(struct AddressList *al, const char *pfx, char *buf, int buflen)
Search list of addresses for a mailing list.
Definition: maillist.c:78
+ Here is the call graph for this function:

◆ envelope_to_all()

static void envelope_to_all ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: To recipients - Implements get_string_t -.

Definition at line 1570 of file expando_index.c.

1572{
1573 const struct EmailFormatInfo *efi = data;
1574 const struct Email *e = efi->email;
1575 if (!e || !e->env)
1576 return;
1577
1578 mutt_addrlist_write(&e->env->to, buf, true);
1579}
+ Here is the call graph for this function:

◆ envelope_username()

static void envelope_username ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: User name - Implements get_string_t -.

Definition at line 1584 of file expando_index.c.

1586{
1587 const struct EmailFormatInfo *efi = data;
1588 const struct Email *e = efi->email;
1589 if (!e || !e->env)
1590 return;
1591
1592 const struct Address *from = TAILQ_FIRST(&e->env->from);
1593 if (!from || !from->mailbox)
1594 return;
1595
1596 char tmp[128] = { 0 };
1597 char *p = NULL;
1598
1599 mutt_str_copy(tmp, mutt_addr_for_display(from), sizeof(tmp));
1600 p = strpbrk(tmp, "%@");
1601 if (p)
1602 {
1603 *p = '\0';
1604 }
1605
1606 buf_strcpy(buf, tmp);
1607}
+ Here is the call graph for this function:

◆ envelope_x_comment_to()

static void envelope_x_comment_to ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: X-Comment-To - Implements get_string_t -.

Definition at line 1612 of file expando_index.c.

1614{
1615 const struct EmailFormatInfo *efi = data;
1616 const struct Email *e = efi->email;
1617 if (!e || !e->env)
1618 return;
1619
1620 const char *s = e->env->x_comment_to;
1621 buf_strcpy(buf, s);
1622}
char * x_comment_to
List of 'X-comment-to' fields.
Definition: envelope.h:81
+ Here is the call graph for this function:

◆ envelope_x_label()

static void envelope_x_label ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: X-Label - Implements get_string_t -.

Definition at line 1627 of file expando_index.c.

1629{
1630 const struct EmailFormatInfo *efi = data;
1631 const struct Email *e = efi->email;
1632 if (!e || !e->env)
1633 return;
1634
1635 if (flags & MUTT_FORMAT_INDEX)
1637
1638 const char *s = e->env->x_label;
1639 buf_strcpy(buf, s);
1640}
+ Here is the call graph for this function:

◆ mailbox_mailbox_name()

static void mailbox_mailbox_name ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Filename - Implements get_string_t -.

Definition at line 1645 of file expando_index.c.

1647{
1648 const struct EmailFormatInfo *efi = data;
1649 struct Mailbox *m = efi->mailbox;
1650 if (!m)
1651 {
1652 buf_addstr(buf, "(null)");
1653 return;
1654 }
1655
1656 char *p = NULL;
1657
1658#ifdef USE_NOTMUCH
1659 struct Email *e = efi->email;
1660 if (m->type == MUTT_NOTMUCH)
1661 {
1663 }
1664#endif
1665 if (!p)
1666 {
1667 p = strrchr(mailbox_path(m), '/');
1668 if (p)
1669 {
1670 p++;
1671 }
1672 }
1673 buf_addstr(buf, p ? p : mailbox_path(m));
1674}
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:51
char * nm_email_get_folder_rel_db(struct Mailbox *m, struct Email *e)
Get the folder for a Email from the same level as the notmuch database.
Definition: notmuch.c:1508
enum MailboxType type
Mailbox type.
Definition: mailbox.h:102
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_percentage()

static void mailbox_percentage ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Index: Progress indicator - Implements get_string_t -.

Definition at line 1693 of file expando_index.c.

1695{
1696 const struct EmailFormatInfo *efi = data;
1697
1698 const char *s = efi->pager_progress;
1699 buf_strcpy(buf, s);
1700}
const char * pager_progress
String representing Pager position through Email.
Definition: private.h:41
+ Here is the call graph for this function:

◆ global_config_sort()

static void global_config_sort ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Status: Sorting mode - Implements get_string_t -.

Definition at line 77 of file expando_status.c.

79{
80 char tmp[128] = { 0 };
81
82 const enum EmailSortType c_sort = cs_subset_sort(NeoMutt->sub, "sort");
83 const char *s = get_sort_str(tmp, sizeof(tmp), c_sort);
84 buf_strcpy(buf, s);
85}
short cs_subset_sort(const struct ConfigSubset *sub, const char *name)
Get a sort config item by name.
Definition: helpers.c:266
EmailSortType
Methods for sorting Emails.
Definition: sort.h:53
static char * get_sort_str(char *buf, size_t buflen, enum EmailSortType method)
Get the sort method as a string.
+ Here is the call graph for this function:

◆ global_config_sort_aux()

static void global_config_sort_aux ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Status: Aux sorting method - Implements get_string_t -.

Definition at line 90 of file expando_status.c.

92{
93 char tmp[128] = { 0 };
94
95 const enum EmailSortType c_sort_aux = cs_subset_sort(NeoMutt->sub, "sort_aux");
96 const char *s = get_sort_str(tmp, sizeof(tmp), c_sort_aux);
97 buf_strcpy(buf, s);
98}
+ Here is the call graph for this function:

◆ global_config_use_threads()

static void global_config_use_threads ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Status: Current threading mode - Implements get_string_t -.

Definition at line 103 of file expando_status.c.

105{
106 const enum UseThreads c_use_threads = mutt_thread_style();
107 const char *s = get_use_threads_str(c_use_threads);
108 buf_strcpy(buf, s);
109}
const char * get_use_threads_str(enum UseThreads value)
Convert UseThreads enum to string.
Definition: mutt_thread.c:99
enum UseThreads mutt_thread_style(void)
Which threading style is active?
Definition: mutt_thread.c:81
UseThreads
Which threading style is active, $use_threads.
Definition: mutt_thread.h:96
+ Here is the call graph for this function:

◆ index_description()

static void index_description ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Status: Description of the mailbox - Implements get_string_t -.

Definition at line 147 of file expando_status.c.

149{
150 const struct MenuStatusLineData *msld = data;
151 const struct IndexSharedData *shared = msld->shared;
152 const struct Mailbox *m = shared->mailbox;
153
154 // If there's a descriptive name, use it. Otherwise, use %f
155 if (m && m->name)
156 {
157 const char *s = m->name;
158 buf_strcpy(buf, s);
159 return;
160 }
161
162 index_mailbox_path(node, data, flags, buf);
163}
static void index_mailbox_path(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Status: pathname of the mailbox - Implements get_string_t -.
Data shared between Index, Pager and Sidebar.
Definition: shared_data.h:37
struct Mailbox * mailbox
Current Mailbox.
Definition: shared_data.h:41
char * name
A short name for the Mailbox.
Definition: mailbox.h:82
Data for creating a Menu line.
struct IndexSharedData * shared
Data shared between Index, Pager and Sidebar.
+ Here is the call graph for this function:

◆ index_limit_pattern()

static void index_limit_pattern ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Status: Active limit pattern - Implements get_string_t -.

Definition at line 193 of file expando_status.c.

195{
196 const struct MenuStatusLineData *msld = data;
197 const struct IndexSharedData *shared = msld->shared;
198 const struct MailboxView *mailbox_view = shared->mailbox_view;
199
200 const char *s = mview_has_limit(mailbox_view) ? mailbox_view->pattern : "";
201 buf_strcpy(buf, s);
202}
bool mview_has_limit(const struct MailboxView *mv)
Is a limit active?
Definition: mview.c:438
struct MailboxView * mailbox_view
Current Mailbox view.
Definition: shared_data.h:40
View of a Mailbox.
Definition: mview.h:40
char * pattern
Limit pattern string.
Definition: mview.h:42
+ Here is the call graph for this function:

◆ index_limit_size()

static void index_limit_size ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Status: Size of the messages - Implements get_string_t -.

Definition at line 207 of file expando_status.c.

209{
210 const struct MenuStatusLineData *msld = data;
211 const struct IndexSharedData *shared = msld->shared;
212 const struct MailboxView *mailbox_view = shared->mailbox_view;
213
214 const off_t num = mailbox_view ? mailbox_view->vsize : 0;
215 mutt_str_pretty_size(buf, num);
216}
off_t vsize
Size (in bytes) of the messages shown.
Definition: mview.h:41
+ Here is the call graph for this function:

◆ index_mailbox_path()

static void index_mailbox_path ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Status: pathname of the mailbox - Implements get_string_t -.

Definition at line 235 of file expando_status.c.

237{
238 const struct MenuStatusLineData *msld = data;
239 const struct IndexSharedData *shared = msld->shared;
240 const struct Mailbox *m = shared->mailbox;
241
242 char tmp[128] = { 0 };
243
244 if (m && m->compress_info && (m->realpath[0] != '\0'))
245 {
246 mutt_str_copy(tmp, m->realpath, sizeof(tmp));
247 mutt_pretty_mailbox(tmp, sizeof(tmp));
248 }
249 else if (m && (m->type == MUTT_NOTMUCH) && m->name)
250 {
251 mutt_str_copy(tmp, m->name, sizeof(tmp));
252 }
253 else if (m && !buf_is_empty(&m->pathbuf))
254 {
255 mutt_str_copy(tmp, mailbox_path(m), sizeof(tmp));
256 mutt_pretty_mailbox(tmp, sizeof(tmp));
257 }
258 else
259 {
260 mutt_str_copy(tmp, _("(no mailbox)"), sizeof(tmp));
261 }
262
263 buf_strcpy(buf, tmp);
264}
void mutt_pretty_mailbox(char *buf, size_t buflen)
Shorten a mailbox path using '~' or '='.
Definition: muttlib.c:440
struct Buffer pathbuf
Path of the Mailbox.
Definition: mailbox.h:80
void * compress_info
Compressed mbox module private data.
Definition: mailbox.h:121
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ index_mailbox_size()

static void index_mailbox_size ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

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

Definition at line 269 of file expando_status.c.

271{
272 const struct MenuStatusLineData *msld = data;
273 const struct IndexSharedData *shared = msld->shared;
274 const struct Mailbox *m = shared->mailbox;
275
276 const off_t num = m ? m->size : 0;
277 mutt_str_pretty_size(buf, num);
278}
off_t size
Size of the Mailbox.
Definition: mailbox.h:84
+ Here is the call graph for this function:

◆ index_readonly()

static void index_readonly ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Status: Modified/read-only flag - Implements get_string_t -.

Definition at line 347 of file expando_status.c.

349{
350 const struct MbTable *c_status_chars = cs_subset_mbtable(NeoMutt->sub, "status_chars");
351 if (!c_status_chars || !c_status_chars->len)
352 return;
353
354 const struct MenuStatusLineData *msld = data;
355 const struct IndexSharedData *shared = msld->shared;
356 const struct Mailbox *m = shared->mailbox;
357
358 int i = STATUS_CHAR_UNCHANGED;
359
360 if (m)
361 {
362 if (shared->attach_msg)
364 else if (m->readonly || m->dontwrite)
366 else if (m->changed || ((m->type != MUTT_IMAP) && m->msg_deleted)) /* deleted doesn't necessarily mean changed in IMAP */
368 else
370 }
371
372 if (i >= c_status_chars->len)
373 buf_addstr(buf, c_status_chars->chars[STATUS_CHAR_UNCHANGED]);
374 else
375 buf_addstr(buf, c_status_chars->chars[i]);
376}
@ MUTT_IMAP
'IMAP' Mailbox type
Definition: mailbox.h:50
@ STATUS_CHAR_UNCHANGED
Mailbox is unchanged.
@ STATUS_CHAR_READ_ONLY
Mailbox is read-only.
@ STATUS_CHAR_NEED_RESYNC
Mailbox has been changed and needs to be resynchronized.
@ STATUS_CHAR_ATTACH
Mailbox opened in attach-message mode.
bool attach_msg
Are we in "attach message" mode?
Definition: shared_data.h:46
bool changed
Mailbox has been modified.
Definition: mailbox.h:110
int msg_deleted
Number of deleted messages.
Definition: mailbox.h:93
bool dontwrite
Don't write the mailbox on close.
Definition: mailbox.h:111
bool readonly
Don't allow changes to the mailbox.
Definition: mailbox.h:116
char ** chars
The array of multibyte character strings.
Definition: mbtable.h:39
+ Here is the call graph for this function:

◆ menu_percentage()

static void menu_percentage ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Status: Percentage through index - Implements get_string_t -.

Definition at line 430 of file expando_status.c.

432{
433 const struct MenuStatusLineData *msld = data;
434 const struct Menu *menu = msld->menu;
435 if (!menu)
436 return;
437
438 char tmp[128] = { 0 };
439
440 char *cp = NULL;
441 if (menu->top + menu->page_len >= menu->max)
442 {
443 cp = menu->top ?
444 /* L10N: Status bar message: the end of the list emails is visible in the index */
445 _("end") :
446 /* L10N: Status bar message: all the emails are visible in the index */
447 _("all");
448 }
449 else
450 {
451 int count = (100 * (menu->top + menu->page_len)) / menu->max;
452 /* L10N: Status bar, percentage of way through index.
453 `%d` is the number, `%%` is the percent symbol.
454 They may be reordered, or space inserted, if you wish. */
455 snprintf(tmp, sizeof(tmp), _("%d%%"), count);
456 cp = tmp;
457 }
458
459 buf_strcpy(buf, cp);
460}
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 max
Number of entries in the menu.
Definition: lib.h:81
int page_len
Number of entries per screen.
Definition: lib.h:84
+ Here is the call graph for this function:

◆ pgp_command_file_message()

static void pgp_command_file_message ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP Command: Filename of message - Implements get_string_t -.

Definition at line 39 of file expando_command.c.

41{
42 const struct PgpCommandContext *cctx = data;
43
44 const char *s = cctx->fname;
45 buf_strcpy(buf, s);
46}
Data for a PGP command.
Definition: pgp.h:43
const char * fname
f
Definition: pgp.h:45
+ Here is the call graph for this function:

◆ pgp_command_file_signature()

static void pgp_command_file_signature ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP Command: Filename of signature - Implements get_string_t -.

Definition at line 51 of file expando_command.c.

53{
54 const struct PgpCommandContext *cctx = data;
55
56 const char *s = cctx->sig_fname;
57 buf_strcpy(buf, s);
58}
const char * sig_fname
s
Definition: pgp.h:46
+ Here is the call graph for this function:

◆ pgp_command_key_ids()

static void pgp_command_key_ids ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP Command: key IDs - Implements get_string_t -.

Definition at line 63 of file expando_command.c.

65{
66 const struct PgpCommandContext *cctx = data;
67
68 const char *s = cctx->ids;
69 buf_strcpy(buf, s);
70}
const char * ids
r
Definition: pgp.h:48
+ Here is the call graph for this function:

◆ pgp_command_need_pass()

static void pgp_command_need_pass ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP Command: PGPPASSFD=0 if passphrase is needed - Implements get_string_t -.

Definition at line 75 of file expando_command.c.

77{
78 const struct PgpCommandContext *cctx = data;
79
80 const char *s = cctx->need_passphrase ? "PGPPASSFD=0" : "";
81 buf_strcpy(buf, s);
82}
bool need_passphrase
p
Definition: pgp.h:44
+ Here is the call graph for this function:

◆ pgp_command_sign_as()

static void pgp_command_sign_as ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP Command: $pgp_sign_as or $pgp_default_key - Implements get_string_t -.

Definition at line 87 of file expando_command.c.

89{
90 const struct PgpCommandContext *cctx = data;
91
92 const char *s = cctx->signas;
93 buf_strcpy(buf, s);
94}
const char * signas
a
Definition: pgp.h:47
+ Here is the call graph for this function:

◆ gpgme_entry_trust()

static void gpgme_entry_trust ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

GPGME: Trust/validity - Implements get_string_t -.

Definition at line 105 of file expando_gpgme.c.

107{
108 const struct CryptEntry *entry = data;
109 const struct CryptKeyInfo *key = entry->key;
110
111 const char *s = "";
112 if ((key->flags & KEYFLAG_ISX509))
113 {
114 s = "x";
115 }
116 else
117 {
118 switch (key->validity)
119 {
120 case GPGME_VALIDITY_FULL:
121 s = "f";
122 break;
123 case GPGME_VALIDITY_MARGINAL:
124 s = "m";
125 break;
126 case GPGME_VALIDITY_NEVER:
127 s = "n";
128 break;
129 case GPGME_VALIDITY_ULTIMATE:
130 s = "u";
131 break;
132 case GPGME_VALIDITY_UNDEFINED:
133 s = "q";
134 break;
135 case GPGME_VALIDITY_UNKNOWN:
136 default:
137 s = "?";
138 break;
139 }
140 }
141
142 buf_strcpy(buf, s);
143}
#define KEYFLAG_ISX509
Key is an X.509 key.
Definition: lib.h:135
An entry in the Select-Key menu.
Definition: crypt_gpgme.h:86
struct CryptKeyInfo * key
Key.
Definition: crypt_gpgme.h:88
A stored PGP key.
Definition: crypt_gpgme.h:44
gpgme_validity_t validity
uid validity (cached for convenience)
Definition: crypt_gpgme.h:50
KeyFlags flags
global and per uid flags (for convenience)
Definition: crypt_gpgme.h:49
+ Here is the call graph for this function:

◆ gpgme_entry_user_id()

static void gpgme_entry_user_id ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

GPGME: User id - Implements get_string_t -.

Definition at line 148 of file expando_gpgme.c.

150{
151 const struct CryptEntry *entry = data;
152 const struct CryptKeyInfo *key = entry->key;
153
154 const char *s = key->uid;
155 buf_strcpy(buf, s);
156}
const char * uid
and for convenience point to this user ID
Definition: crypt_gpgme.h:48
+ Here is the call graph for this function:

◆ gpgme_key_algorithm()

static void gpgme_key_algorithm ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

GPGME: Key Algorithm - Implements get_string_t -.

Definition at line 161 of file expando_gpgme.c.

163{
164 const struct CryptEntry *entry = data;
165 const struct CryptKeyInfo *key = entry->key;
166
167 const char *s = NULL;
168 if (key->kobj->subkeys)
169 s = gpgme_pubkey_algo_name(key->kobj->subkeys->pubkey_algo);
170 else
171 s = "?";
172
173 buf_strcpy(buf, s);
174}
gpgme_key_t kobj
Definition: crypt_gpgme.h:46
+ Here is the call graph for this function:

◆ gpgme_key_capabilities()

static void gpgme_key_capabilities ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

GPGME: Key Capabilities - Implements get_string_t -.

Definition at line 179 of file expando_gpgme.c.

181{
182 const struct CryptEntry *entry = data;
183 const struct CryptKeyInfo *key = entry->key;
184
185 const char *s = crypt_key_abilities(key->flags);
186 buf_strcpy(buf, s);
187}
static char * crypt_key_abilities(KeyFlags flags)
Parse key flags into a string.
Definition: expando_gpgme.c:49
+ Here is the call graph for this function:

◆ gpgme_key_date()

static void gpgme_key_date ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

GPGME: Date of the key - Implements get_string_t -.

Definition at line 192 of file expando_gpgme.c.

194{
195 const struct CryptEntry *entry = data;
196 const struct CryptKeyInfo *key = entry->key;
197
198 const char *text = node->text;
199 bool use_c_locale = false;
200 if (*text == '!')
201 {
202 use_c_locale = true;
203 text++;
204 }
205
206 struct tm tm = { 0 };
207 if (key->kobj->subkeys && (key->kobj->subkeys->timestamp > 0))
208 {
209 tm = mutt_date_localtime(key->kobj->subkeys->timestamp);
210 }
211 else
212 {
213 tm = mutt_date_localtime(0); // Default to 1970-01-01
214 }
215
216 char tmp[128] = { 0 };
217 if (use_c_locale)
218 {
219 strftime_l(tmp, sizeof(tmp), text, &tm, NeoMutt->time_c_locale);
220 }
221 else
222 {
223 strftime(tmp, sizeof(tmp), text, &tm);
224 }
225
226 buf_strcpy(buf, tmp);
227}
+ Here is the call graph for this function:

◆ gpgme_key_fingerprint()

static void gpgme_key_fingerprint ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

GPGME: Key fingerprint - Implements get_string_t -.

Definition at line 242 of file expando_gpgme.c.

244{
245 const struct CryptEntry *entry = data;
246 struct CryptKeyInfo *key = entry->key;
247
248 /* fixme: we need a way to distinguish between main and subkeys.
249 * Store the idx in entry? */
250 const char *s = crypt_fpr_or_lkeyid(key);
251 buf_strcpy(buf, s);
252}
const char * crypt_fpr_or_lkeyid(struct CryptKeyInfo *k)
Find the fingerprint of a key.
Definition: crypt_gpgme.c:214
+ Here is the call graph for this function:

◆ gpgme_key_flags()

static void gpgme_key_flags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

GPGME: Key Flags - Implements get_string_t -.

Definition at line 257 of file expando_gpgme.c.

259{
260 const struct CryptEntry *entry = data;
261 const struct CryptKeyInfo *key = entry->key;
262
263 const char *s = crypt_flags(key->flags);
264 buf_strcpy(buf, s);
265}
static char * crypt_flags(KeyFlags flags)
Parse the key flags into a single character.
Definition: expando_gpgme.c:79
+ Here is the call graph for this function:

◆ gpgme_key_id()

static void gpgme_key_id ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

GPGME: Key id - Implements get_string_t -.

Definition at line 270 of file expando_gpgme.c.

272{
273 const struct CryptEntry *entry = data;
274 struct CryptKeyInfo *key = entry->key;
275
276 /* fixme: we need a way to distinguish between main and subkeys.
277 * Store the idx in entry? */
278 const char *s = crypt_keyid(key);
279 buf_strcpy(buf, s);
280}
const char * crypt_keyid(struct CryptKeyInfo *k)
Find the ID for the key.
Definition: crypt_gpgme.c:138
+ Here is the call graph for this function:

◆ gpgme_key_protocol()

static void gpgme_key_protocol ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

GPGME: Protocol - Implements get_string_t -.

Definition at line 296 of file expando_gpgme.c.

298{
299 const struct CryptEntry *entry = data;
300 const struct CryptKeyInfo *key = entry->key;
301
302 const char *s = gpgme_get_protocol_name(key->kobj->protocol);
303 buf_strcpy(buf, s);
304}
+ Here is the call graph for this function:

◆ pgp_entry_ignore()

static void pgp_entry_ignore ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: Field not supported - Implements get_string_t -.

Definition at line 66 of file expando_pgp.c.

68{
69}

◆ pgp_entry_trust()

static void pgp_entry_trust ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: Trust/validity - Implements get_string_t -.

Definition at line 83 of file expando_pgp.c.

85{
86 const struct PgpEntry *entry = data;
87 const struct PgpUid *uid = entry->uid;
88
89 buf_printf(buf, "%c", TrustFlags[uid->trust & 0x03]);
90}
static const char TrustFlags[]
Characters used to show the trust level for PGP keys.
Definition: expando_pgp.c:42
An entry in a PGP key menu.
Definition: private.h:39
struct PgpUid * uid
PGP Key info.
Definition: private.h:41
PGP User ID.
Definition: pgplib.h:36
short trust
Definition: pgplib.h:38
+ Here is the call graph for this function:

◆ pgp_entry_user_id()

static void pgp_entry_user_id ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: User id - Implements get_string_t -.

Definition at line 95 of file expando_pgp.c.

97{
98 const struct PgpEntry *entry = data;
99 const struct PgpUid *uid = entry->uid;
100
101 const char *s = uid->addr;
102 buf_strcpy(buf, s);
103}
char * addr
Definition: pgplib.h:37
+ Here is the call graph for this function:

◆ pgp_key_algorithm()

static void pgp_key_algorithm ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: Key Algorithm - Implements get_string_t -.

Definition at line 138 of file expando_pgp.c.

140{
141 const struct PgpEntry *entry = data;
142 const struct PgpUid *uid = entry->uid;
143 const struct PgpKeyInfo *key = uid->parent;
144
145 const char *s = key->algorithm;
146 buf_strcpy(buf, s);
147}
Information about a PGP key.
Definition: pgplib.h:49
const char * algorithm
Definition: pgplib.h:57
struct PgpKeyInfo * parent
Parent key.
Definition: pgplib.h:40
+ Here is the call graph for this function:

◆ pgp_key_capabilities()

static void pgp_key_capabilities ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: Key Capabilities - Implements get_string_t -.

Definition at line 152 of file expando_pgp.c.

154{
155 const struct PgpEntry *entry = data;
156 const struct PgpUid *uid = entry->uid;
157 const struct PgpKeyInfo *key = uid->parent;
158
159 const KeyFlags kflags = key->flags | uid->flags;
160
161 const char *s = pgp_key_abilities(kflags);
162 buf_strcpy(buf, s);
163}
static char * pgp_key_abilities(KeyFlags flags)
Turn PGP key abilities into a string.
Definition: expando_pgp.c:112
uint16_t KeyFlags
Flags describing PGP/SMIME keys, e.g. KEYFLAG_CANSIGN.
Definition: lib.h:131
KeyFlags flags
Definition: pgplib.h:53
int flags
Definition: pgplib.h:39
+ Here is the call graph for this function:

◆ pgp_key_date()

static void pgp_key_date ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: Date of the key - Implements get_string_t -.

Definition at line 168 of file expando_pgp.c.

170{
171 const struct PgpEntry *entry = data;
172 const struct PgpUid *uid = entry->uid;
173 const struct PgpKeyInfo *key = uid->parent;
174
175 bool use_c_locale = false;
176 const char *text = node->text;
177 if (*text == '!')
178 {
179 use_c_locale = true;
180 text++;
181 }
182
183 char tmp[128] = { 0 };
184 if (use_c_locale)
185 {
186 mutt_date_localtime_format_locale(tmp, sizeof(tmp), text, key->gen_time,
188 }
189 else
190 {
191 mutt_date_localtime_format(tmp, sizeof(tmp), text, key->gen_time);
192 }
193
194 buf_strcpy(buf, tmp);
195}
time_t gen_time
Definition: pgplib.h:55
+ Here is the call graph for this function:

◆ pgp_key_flags()

static void pgp_key_flags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: Key Flags - Implements get_string_t -.

Definition at line 212 of file expando_pgp.c.

214{
215 const struct PgpEntry *entry = data;
216 const struct PgpUid *uid = entry->uid;
217 const struct PgpKeyInfo *key = uid->parent;
218
219 const KeyFlags kflags = key->flags | uid->flags;
220
221 buf_printf(buf, "%c", pgp_flags(kflags));
222}
static char pgp_flags(KeyFlags flags)
Turn PGP key flags into a string.
Definition: expando_pgp.c:49
+ Here is the call graph for this function:

◆ pgp_key_id()

static void pgp_key_id ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: Key id - Implements get_string_t -.

Definition at line 227 of file expando_pgp.c.

229{
230 const struct PgpEntry *entry = data;
231 const struct PgpUid *uid = entry->uid;
232 struct PgpKeyInfo *key = uid->parent;
233
234 const char *s = pgp_this_keyid(key);
235 buf_strcpy(buf, s);
236}
char * pgp_this_keyid(struct PgpKeyInfo *k)
Get the ID of this key.
Definition: pgp.c:191
+ Here is the call graph for this function:

◆ pgp_pkey_algorithm()

static void pgp_pkey_algorithm ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: Principal Key Algorithm - Implements get_string_t -.

Definition at line 253 of file expando_pgp.c.

255{
256 const struct PgpEntry *entry = data;
257 const struct PgpUid *uid = entry->uid;
258 struct PgpKeyInfo *key = uid->parent;
259 struct PgpKeyInfo *pkey = pgp_principal_key(key);
260
261 const char *s = pkey->algorithm;
262 buf_strcpy(buf, s);
263}
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:

◆ pgp_pkey_capabilities()

static void pgp_pkey_capabilities ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: Principal Key Capabilities - Implements get_string_t -.

Definition at line 268 of file expando_pgp.c.

270{
271 const struct PgpEntry *entry = data;
272 const struct PgpUid *uid = entry->uid;
273 struct PgpKeyInfo *key = uid->parent;
274 struct PgpKeyInfo *pkey = pgp_principal_key(key);
275
276 const KeyFlags kflags = (pkey->flags & KEYFLAG_RESTRICTIONS) | uid->flags;
277
278 const char *s = pgp_key_abilities(kflags);
279 buf_strcpy(buf, s);
280}
#define KEYFLAG_RESTRICTIONS
Definition: lib.h:146
+ Here is the call graph for this function:

◆ pgp_pkey_flags()

static void pgp_pkey_flags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: Principal Key Flags - Implements get_string_t -.

Definition at line 285 of file expando_pgp.c.

287{
288 const struct PgpEntry *entry = data;
289 const struct PgpUid *uid = entry->uid;
290 struct PgpKeyInfo *key = uid->parent;
291 struct PgpKeyInfo *pkey = pgp_principal_key(key);
292
293 const KeyFlags kflags = (pkey->flags & KEYFLAG_RESTRICTIONS) | uid->flags;
294
295 buf_printf(buf, "%c", pgp_flags(kflags));
296}
+ Here is the call graph for this function:

◆ pgp_pkey_id()

static void pgp_pkey_id ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

PGP: Principal Key id - Implements get_string_t -.

Definition at line 301 of file expando_pgp.c.

303{
304 const struct PgpEntry *entry = data;
305 const struct PgpUid *uid = entry->uid;
306 struct PgpKeyInfo *key = uid->parent;
307 struct PgpKeyInfo *pkey = pgp_principal_key(key);
308
309 const char *s = pgp_this_keyid(pkey);
310 buf_strcpy(buf, s);
311}
+ Here is the call graph for this function:

◆ smime_command_algorithm()

static void smime_command_algorithm ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Smime Command: algorithm - Implements get_string_t -.

Definition at line 43 of file expando_smime.c.

45{
46 const struct SmimeCommandContext *cctx = data;
47
48 const char *s = cctx->cryptalg;
49 buf_strcpy(buf, s);
50}
Data for a SIME command.
Definition: smime.h:58
const char * cryptalg
a
Definition: smime.h:60
+ Here is the call graph for this function:

◆ smime_command_certificate_ids()

static void smime_command_certificate_ids ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Smime Command: certificate IDs - Implements get_string_t -.

Definition at line 55 of file expando_smime.c.

57{
58 const struct SmimeCommandContext *cctx = data;
59
60 const char *s = cctx->certificates;
61 buf_strcpy(buf, s);
62}
const char * certificates
c
Definition: smime.h:64
+ Here is the call graph for this function:

◆ smime_command_certificate_path()

static void smime_command_certificate_path ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Smime Command: CA location - Implements get_string_t -.

Definition at line 67 of file expando_smime.c.

69{
70 const char *const c_smime_ca_location = cs_subset_path(NeoMutt->sub, "smime_ca_location");
71
72 struct Buffer *path = buf_pool_get();
73 struct Buffer *buf1 = buf_pool_get();
74 struct Buffer *buf2 = buf_pool_get();
75 struct stat st = { 0 };
76
77 buf_strcpy(path, c_smime_ca_location);
78 buf_expand_path(path);
79 buf_quote_filename(buf1, buf_string(path), true);
80
81 if ((stat(buf_string(path), &st) != 0) || !S_ISDIR(st.st_mode))
82 {
83 buf_printf(buf2, "-CAfile %s", buf_string(buf1));
84 }
85 else
86 {
87 buf_printf(buf2, "-CApath %s", buf_string(buf1));
88 }
89
90 buf_copy(buf, buf2);
91
92 buf_pool_release(&path);
93 buf_pool_release(&buf1);
94 buf_pool_release(&buf2);
95}
const char * cs_subset_path(const struct ConfigSubset *sub, const char *name)
Get a path config item by name.
Definition: helpers.c:168
void buf_expand_path(struct Buffer *buf)
Create the canonical path.
Definition: muttlib.c:315
+ Here is the call graph for this function:

◆ smime_command_digest_algorithm()

static void smime_command_digest_algorithm ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Smime Command: Message digest algorithm - Implements get_string_t -.

Definition at line 100 of file expando_smime.c.

102{
103 const struct SmimeCommandContext *cctx = data;
104
105 const char *s = cctx->digestalg;
106 buf_strcpy(buf, s);
107}
const char * digestalg
d
Definition: smime.h:61
+ Here is the call graph for this function:

◆ smime_command_intermediate_ids()

static void smime_command_intermediate_ids ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Smime Command: Intermediate certificates - Implements get_string_t -.

Definition at line 112 of file expando_smime.c.

114{
115 const struct SmimeCommandContext *cctx = data;
116
117 const char *s = cctx->intermediates;
118 buf_strcpy(buf, s);
119}
const char * intermediates
i
Definition: smime.h:65
+ Here is the call graph for this function:

◆ smime_command_key()

static void smime_command_key ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Smime Command: Key-pair - Implements get_string_t -.

Definition at line 124 of file expando_smime.c.

126{
127 const struct SmimeCommandContext *cctx = data;
128
129 const char *s = cctx->key;
130 buf_strcpy(buf, s);
131}
const char * key
k
Definition: smime.h:59
+ Here is the call graph for this function:

◆ smime_command_message_file()

static void smime_command_message_file ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Smime Command: Filename of message - Implements get_string_t -.

Definition at line 136 of file expando_smime.c.

138{
139 const struct SmimeCommandContext *cctx = data;
140
141 const char *s = cctx->fname;
142 buf_strcpy(buf, s);
143}
const char * fname
f
Definition: smime.h:62
+ Here is the call graph for this function:

◆ smime_command_signature_file()

static void smime_command_signature_file ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Smime Command: Filename of signature - Implements get_string_t -.

Definition at line 148 of file expando_smime.c.

150{
151 const struct SmimeCommandContext *cctx = data;
152
153 const char *s = cctx->sig_fname;
154 buf_strcpy(buf, s);
155}
const char * sig_fname
s
Definition: smime.h:63
+ Here is the call graph for this function:

◆ group_index_description()

static void group_index_description ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

NNTP: Description - Implements get_string_t -.

Definition at line 45 of file expando_browser.c.

47{
48 const struct Folder *folder = data;
49
50 char tmp[128] = { 0 };
51
52 if (!folder->ff->nd->desc)
53 return;
54
55 char *desc = mutt_str_dup(folder->ff->nd->desc);
56 const char *const c_newsgroups_charset = cs_subset_string(NeoMutt->sub, "newsgroups_charset");
57 if (c_newsgroups_charset)
58 {
59 mutt_ch_convert_string(&desc, c_newsgroups_charset, cc_charset(), MUTT_ICONV_HOOK_FROM);
60 }
62 mutt_str_copy(tmp, desc, sizeof(tmp));
63 FREE(&desc);
64
65 buf_strcpy(buf, tmp);
66}
const char * cc_charset(void)
Get the cached value of $charset.
Definition: config_cache.c:116
int mutt_mb_filter_unprintable(char **s)
Replace unprintable characters.
Definition: mbyte.c:423
#define FREE(x)
Definition: memory.h:55
int mutt_ch_convert_string(char **ps, const char *from, const char *to, uint8_t flags)
Convert a string between encodings.
Definition: charset.c:831
#define MUTT_ICONV_HOOK_FROM
apply charset-hooks to fromcode
Definition: charset.h:65
char * mutt_str_dup(const char *str)
Copy a string, safely.
Definition: string.c:254
struct NntpMboxData * nd
Extra NNTP data.
Definition: lib.h:103
char * desc
Description of newsgroup.
Definition: mdata.h:36
+ Here is the call graph for this function:

◆ group_index_flags()

static void group_index_flags ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

NNTP: Moderated flag - Implements get_string_t -.

Definition at line 71 of file expando_browser.c.

73{
74 const struct Folder *folder = data;
75
76 const char *s = NULL;
77 // NOTE(g0mb4): use $flag_chars?
78 if (folder->ff->nd->deleted)
79 {
80 s = "D";
81 }
82 else
83 {
84 s = folder->ff->nd->allowed ? " " : "-";
85 }
86
87 buf_strcpy(buf, s);
88}
bool deleted
Definition: mdata.h:45
bool allowed
Definition: mdata.h:44
+ Here is the call graph for this function:

◆ group_index_flags2()

static void group_index_flags2 ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

NNTP: New flag - Implements get_string_t -.

Definition at line 93 of file expando_browser.c.

95{
96 const struct Folder *folder = data;
97
98 const char *s = NULL;
99 // NOTE(g0mb4): use $flag_chars?
100 if (folder->ff->nd->subscribed)
101 {
102 s = " ";
103 }
104 else
105 {
106 s = folder->ff->has_new_mail ? "N" : "u";
107 }
108
109 buf_strcpy(buf, s);
110}
bool subscribed
Definition: mdata.h:42
+ Here is the call graph for this function:

◆ group_index_newsgroup()

static void group_index_newsgroup ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

NNTP: Newsgroup name - Implements get_string_t -.

Definition at line 115 of file expando_browser.c.

117{
118 const struct Folder *folder = data;
119
120 const char *s = folder->ff->name;
121 buf_strcpy(buf, s);
122}
+ Here is the call graph for this function:

◆ nntp_account()

static void nntp_account ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Newsrc: Account url - Implements get_string_t -.

Definition at line 44 of file expando_newsrc.c.

46{
47 struct NntpAccountData *adata = data;
48 struct ConnAccount *cac = &adata->conn->account;
49
50 char tmp[128] = { 0 };
51
52 struct Url url = { 0 };
53 account_to_url(cac, &url);
54 url_tostring(&url, tmp, sizeof(tmp), U_PATH);
55 char *p = strchr(tmp, '/');
56 if (p)
57 {
58 *p = '\0';
59 }
60
61 buf_strcpy(buf, tmp);
62}
void account_to_url(struct ConnAccount *cac, struct Url *url)
Fill URL with info from account.
Definition: mutt_account.c:80
void * adata
Private data (for Mailbox backends)
Definition: account.h:42
Login details for a remote server.
Definition: connaccount.h:53
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
A parsed URL proto://user:password@host:port/path?a=1&b=2
Definition: url.h:69
int url_tostring(const struct Url *url, char *dest, size_t len, uint8_t flags)
Output the URL string for a given Url object.
Definition: url.c:423
#define U_PATH
Definition: url.h:50
+ Here is the call graph for this function:

◆ nntp_port_if()

static void nntp_port_if ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Newsrc: Port if specified - Implements get_string_t -.

Definition at line 92 of file expando_newsrc.c.

94{
95 const struct NntpAccountData *adata = data;
96 const struct ConnAccount *cac = &adata->conn->account;
97
98 if (cac->flags & MUTT_ACCT_PORT)
99 {
100 buf_add_printf(buf, "%hd", cac->port);
101 }
102}
#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
unsigned short port
Port to connect to.
Definition: connaccount.h:58
+ Here is the call graph for this function:

◆ nntp_schema()

static void nntp_schema ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Newsrc: Url schema - Implements get_string_t -.

Definition at line 107 of file expando_newsrc.c.

109{
110 struct NntpAccountData *adata = data;
111 struct ConnAccount *cac = &adata->conn->account;
112
113 char tmp[128] = { 0 };
114
115 struct Url url = { 0 };
116 account_to_url(cac, &url);
117 url_tostring(&url, tmp, sizeof(tmp), U_PATH);
118 char *p = strchr(tmp, ':');
119 if (p)
120 {
121 *p = '\0';
122 }
123
124 buf_strcpy(buf, tmp);
125}
+ Here is the call graph for this function:

◆ nntp_server()

static void nntp_server ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Newsrc: News server name - Implements get_string_t -.

Definition at line 130 of file expando_newsrc.c.

132{
133 const struct NntpAccountData *adata = data;
134 const struct ConnAccount *cac = &adata->conn->account;
135
136 char tmp[128] = { 0 };
137
138 mutt_str_copy(tmp, cac->host, sizeof(tmp));
139 mutt_str_lower(tmp);
140
141 buf_strcpy(buf, tmp);
142}
char * mutt_str_lower(char *str)
Convert all characters in the string to lowercase.
Definition: string.c:314
char host[128]
Server to login to.
Definition: connaccount.h:54
+ Here is the call graph for this function:

◆ nntp_username()

static void nntp_username ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Newsrc: Username - Implements get_string_t -.

Definition at line 147 of file expando_newsrc.c.

149{
150 const struct NntpAccountData *adata = data;
151 const struct ConnAccount *cac = &adata->conn->account;
152
153 const char *s = cac->user;
154 buf_strcpy(buf, s);
155}
char user[128]
Username.
Definition: connaccount.h:56
+ Here is the call graph for this function:

◆ pattern_description()

static void pattern_description ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Pattern: pattern description - Implements get_string_t -.

Definition at line 39 of file expando.c.

41{
42 const struct PatternEntry *entry = data;
43
44 const char *s = entry->desc;
45 buf_strcpy(buf, s);
46}
A line in the Pattern Completion menu.
Definition: pattern_data.h:35
const char * desc
Description of pattern.
Definition: pattern_data.h:39
+ Here is the call graph for this function:

◆ pattern_expression()

static void pattern_expression ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Pattern: pattern expression - Implements get_string_t -.

Definition at line 51 of file expando.c.

53{
54 const struct PatternEntry *entry = data;
55
56 const char *s = entry->expr;
57 buf_strcpy(buf, s);
58}
const char * expr
Displayed in the menu.
Definition: pattern_data.h:38
+ Here is the call graph for this function:

◆ greeting_real_name()

static void greeting_real_name ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Greeting: Real name - Implements get_string_t -.

Definition at line 41 of file expando.c.

43{
44 const struct Email *e = data;
45 const struct Address *to = TAILQ_FIRST(&e->env->to);
46
47 const char *s = mutt_get_name(to);
48 buf_strcpy(buf, s);
49}
+ Here is the call graph for this function:

◆ greeting_login_name()

static void greeting_login_name ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Greeting: Login name - Implements get_string_t -.

Definition at line 54 of file expando.c.

56{
57 const struct Email *e = data;
58 const struct Address *to = TAILQ_FIRST(&e->env->to);
59
60 char tmp[128] = { 0 };
61 char *p = NULL;
62
63 if (to)
64 {
65 mutt_str_copy(tmp, mutt_addr_for_display(to), sizeof(tmp));
66 if ((p = strpbrk(tmp, "%@")))
67 {
68 *p = '\0';
69 }
70 }
71
72 buf_strcpy(buf, tmp);
73}
+ Here is the call graph for this function:

◆ greeting_first_name()

static void greeting_first_name ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Greeting: First name - Implements get_string_t -.

Definition at line 78 of file expando.c.

80{
81 const struct Email *e = data;
82 const struct Address *to = TAILQ_FIRST(&e->env->to);
83 const struct Address *cc = TAILQ_FIRST(&e->env->cc);
84
85 char tmp[128] = { 0 };
86 char *p = NULL;
87
88 if (to)
89 {
90 const char *s = mutt_get_name(to);
91 mutt_str_copy(tmp, s, sizeof(tmp));
92 }
93 else if (cc)
94 {
95 const char *s = mutt_get_name(cc);
96 mutt_str_copy(tmp, s, sizeof(tmp));
97 }
98
99 if ((p = strpbrk(tmp, " %@")))
100 *p = '\0';
101
102 buf_strcpy(buf, tmp);
103}
+ Here is the call graph for this function:

◆ sidebar_description()

static void sidebar_description ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Sidebar: Descriptive name - Implements get_string_t -.

Definition at line 73 of file expando.c.

75{
76 const struct SidebarData *sdata = data;
77 const struct SbEntry *sbe = sdata->entry;
78
79 add_indent(buf, sbe->depth);
80
81 if (sbe->mailbox->name)
82 buf_addstr(buf, sbe->mailbox->name);
83 else
84 buf_addstr(buf, sbe->box);
85}
static void add_indent(struct Buffer *buf, int depth)
Generate the needed indentation.
Definition: expando.c:44
Info about folders in the sidebar.
Definition: private.h:41
int depth
Indentation depth.
Definition: private.h:44
struct Mailbox * mailbox
Mailbox this represents.
Definition: private.h:45
char box[256]
Mailbox path (possibly abbreviated)
Definition: private.h:42
Data passed to sidebar_format_str()
Definition: expando.h:34
struct SbEntry * entry
Info about a folder.
Definition: expando.h:35
+ Here is the call graph for this function:

◆ sidebar_flagged()

static void sidebar_flagged ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Sidebar: Flagged flags - Implements get_string_t -.

Definition at line 90 of file expando.c.

92{
93 const struct SidebarData *sdata = data;
94 const struct SbEntry *sbe = sdata->entry;
95 const struct Mailbox *m = sbe->mailbox;
96
97 if (m->msg_flagged == 0)
98 {
99 buf_strcpy(buf, "");
100 }
101 else if (m->msg_flagged == 1)
102 {
103 buf_strcpy(buf, "!");
104 }
105 else if (m->msg_flagged == 2)
106 {
107 buf_strcpy(buf, "!!");
108 }
109 else
110 {
111 buf_printf(buf, "%d!", m->msg_flagged);
112 }
113}
int msg_flagged
Number of flagged messages.
Definition: mailbox.h:90
+ Here is the call graph for this function:

◆ sidebar_name()

static void sidebar_name ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Sidebar: Name of the mailbox - Implements get_string_t -.

Definition at line 161 of file expando.c.

163{
164 const struct SidebarData *sdata = data;
165 const struct SbEntry *sbe = sdata->entry;
166
167 add_indent(buf, sbe->depth);
168 buf_addstr(buf, sbe->box);
169}
+ Here is the call graph for this function:

◆ sidebar_new_mail()

static void sidebar_new_mail ( const struct ExpandoNode node,
void *  data,
MuttFormatFlags  flags,
struct Buffer buf 
)
static

Sidebar: New mail flag - Implements get_string_t -.

Definition at line 174 of file expando.c.

176{
177 const struct SidebarData *sdata = data;
178 const struct SbEntry *sbe = sdata->entry;
179 const struct Mailbox *m = sbe->mailbox;
180
181 // NOTE(g0mb4): use $flag_chars?
182 const char *s = m->has_new ? "N" : " ";
183 buf_strcpy(buf, s);
184}
bool has_new
Mailbox has new mail.
Definition: mailbox.h:85
+ Here is the call graph for this function: