67 uintptr_t count = (uintptr_t) he->
data;
75 he->
data = (
void *) count;
95 count = (uintptr_t) he->
data;
97 he->
data = (
void *) count;
132 if (!mv || !mv->
mailbox || !ea)
144 struct Email *e = *ep;
154 char *new_label = buf->
data;
156 if (*new_label ==
'\0')
161 struct Email *e = *ep;
212 struct stat st = { 0 };
220 if (mtime == (time_t) -1)
227 if ((stat(
buf_string(path), &st) != 0) || (mtime == st.st_mtime))
256 char buf[1024] = { 0 };
259 while ((bytes_read = fread(buf, 1,
sizeof(buf), fp_in)) > 0)
260 fwrite(buf, 1, bytes_read, fp_out);
293 struct ListNode *np = NULL, *tmp = NULL;
317 struct Body *body2 = NULL;
324 for (; (p[0] !=
'\0') && (p[0] !=
' ') && (p[0] !=
'\t'); p++)
void mutt_expand_aliases_env(struct Envelope *env)
Expand aliases in all the fields of an Envelope.
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
#define ARRAY_SIZE(head)
The number of elements stored.
#define ARRAY_GET(head, idx)
Return the element at index.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const struct CompleteOps CompleteLabelOps
Auto-Completion of Labels.
Convenience wrapper for the core headers.
void mutt_edit_file(const char *editor, const char *file)
Let the user edit a file.
void email_set_color(struct Mailbox *m, struct Email *e)
Select an Index colour for an Email.
Structs that make up an email.
struct Envelope * mutt_rfc822_read_header(FILE *fp, struct Email *e, bool user_hdrs, bool weed)
Parses an RFC822 header.
@ NT_EMAIL_CHANGE
Email has changed.
void mutt_env_free(struct Envelope **ptr)
Free an Envelope.
void mutt_env_to_local(struct Envelope *env)
Convert an Envelope's Address fields to local format.
#define MUTT_ENV_CHANGED_XLABEL
X-Label edited.
int mutt_file_copy_stream(FILE *fp_in, FILE *fp_out)
Copy the contents of one file into another.
time_t mutt_file_decrease_mtime(const char *fp, struct stat *st)
Decrease a file's modification time by 1 second.
void mutt_file_unlink(const char *s)
Delete a file, carefully.
#define mutt_file_fclose(FP)
#define mutt_file_fopen(PATH, MODE)
bool OptNewsSend
(pseudo) used to change behavior when posting
int mw_get_field(const char *prompt, struct Buffer *buf, CompletionFlags complete, enum HistoryClass hclass, const struct CompleteOps *comp_api, void *cdata)
Ask the user for a string -.
#define mutt_debug(LEVEL,...)
Convenience wrapper for the gui headers.
struct HashElem * mutt_hash_insert(struct HashTable *table, const char *strkey, void *data)
Add a new element to the Hash Table (with string keys)
void mutt_hash_delete(struct HashTable *table, const char *strkey, const void *data)
Remove an element from a Hash Table.
struct HashTable * mutt_hash_new(size_t num_elems, HashFlags flags)
Create a new Hash Table (with string keys)
struct HashElem * mutt_hash_find_elem(const struct HashTable *table, const char *strkey)
Find the HashElem in a Hash Table element using a key.
#define MUTT_HASH_STRDUP_KEYS
make a copy of the keys
Read/write command history from/to a file.
@ HC_OTHER
Miscellaneous strings.
GUI manage the main index (list of emails)
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
@ LL_DEBUG1
Log at debug level 1.
Convenience wrapper for the library headers.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
char * mutt_str_dup(const char *str)
Copy a string, safely.
char * mutt_str_skip_email_wsp(const char *s)
Skip over whitespace as defined by RFC5322.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
size_t mutt_istr_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix, ignoring case.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
Many unsorted constants and some structs.
#define MUTT_COMP_NO_FLAGS
No flags are set.
void buf_pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
void buf_expand_path(struct Buffer *buf)
Create the canonical path.
Some miscellaneous functions.
API for encryption/signing of emails.
uint16_t SecurityFlags
Flags, e.g. SEC_ENCRYPT.
#define APPLICATION_PGP
Use PGP to encrypt/sign.
#define APPLICATION_SMIME
Use SMIME to encrypt/sign.
#define SEC_NO_FLAGS
No flags are set.
@ NT_EMAIL
Email has changed, NotifyEmail, EventEmail.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
SecurityFlags mutt_parse_crypt_hdr(const char *p, bool set_empty_signas, SecurityFlags crypt_app)
Parse a crypto header string.
#define STAILQ_REMOVE(head, elm, type, field)
#define STAILQ_FIRST(head)
#define STAILQ_EMPTY(head)
#define STAILQ_FOREACH_SAFE(var, head, field, tvar)
#define STAILQ_SWAP(head1, head2, type)
Convenience wrapper for the send headers.
struct Body * mutt_make_file_attach(const char *path, struct ConfigSubset *sub)
Create a file attachment.
struct Body * parts
parts of a multipart or message/rfc822
char * description
content-description
struct Body * next
next attachment in the list
String manipulation buffer.
char * data
Pointer to data.
The envelope/body of an email.
struct Envelope * env
Envelope information.
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib....
struct Body * body
List of MIME parts.
bool changed
Email has been edited.
struct Notify * notify
Notifications: NotifyEmail, EventEmail.
struct ListHead userhdrs
user defined headers
unsigned char changed
Changed fields, e.g. MUTT_ENV_CHANGED_SUBJECT.
struct ListHead references
message references (in reverse order)
struct ListHead in_reply_to
in-reply-to header content
The item stored in a Hash Table.
void * data
User-supplied data.
struct Mailbox * mailbox
Current Mailbox.
bool changed
Mailbox has been modified.
struct HashTable * label_hash
Hash Table: "x-labels" -> Email.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.