61 uintptr_t count = (uintptr_t) elem->
data;
69 elem->
data = (
void *) count;
89 count = (uintptr_t) elem->
data;
91 elem->
data = (
void *) count;
129 char buf[1024] = { 0 };
142 char *new_label = buf;
144 if (*new_label ==
'\0')
171 const char *p = NULL;
192 FILE *fp_in = fopen(body,
"r");
205 if (stat(
mutt_b2s(path), &st) == -1)
212 if (mtime == (time_t) -1)
220 if (mtime == st.st_mtime)
249 while ((i = fread(buf, 1,
sizeof(buf), fp_in)) > 0)
250 fwrite(buf, 1, i, fp_out);
285 struct ListNode *np = NULL, *tmp = NULL;
303 struct Body *body2 = NULL;
310 for (; (p[0] !=
'\0') && (p[0] !=
' ') && (p[0] !=
'\t'); p++)
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
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)
#define mutt_buffer_mktemp(buf)
#define STAILQ_REMOVE(head, elm, type, field)
void mutt_buffer_reset(struct Buffer *buf)
Reset an existing Buffer.
The envelope/body of an email.
struct Buffer * mutt_buffer_pool_get(void)
Get a Buffer from the pool.
struct Body * body
List of MIME parts.
Structs that make up an email.
Convenience wrapper for the send headers.
struct HashTable * label_hash
Hash Table for x-labels.
GUI manage the main index (list of emails)
#define MUTT_LABEL
Do label completion.
void mutt_expand_aliases_env(struct Envelope *env)
Expand aliases in all the fields of an Envelope.
static size_t plen
Length of cached packet.
void mutt_buffer_pool_release(struct Buffer **pbuf)
Free a Buffer from the pool.
void mutt_file_unlink(const char *s)
Delete a file, carefully.
String manipulation buffer.
char * mutt_str_dup(const char *str)
Copy a string, safely.
struct ListHead userhdrs
user defined headers
bool changed
Email has been edited.
struct Body * next
next attachment in the list
Container for Accounts, Notifications.
void mutt_buffer_pretty_mailbox(struct Buffer *buf)
Shorten a mailbox path using '~' or '='.
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
#define mutt_get_field(field, buf, buflen, complete)
struct HashElem * mutt_hash_find_elem(const struct HashTable *table, const char *strkey)
Find the HashElem in a Hash Table element using a key.
unsigned char changed
Changed fields, e.g. MUTT_ENV_CHANGED_SUBJECT.
Some miscellaneous functions.
struct ListHead in_reply_to
in-reply-to header content
Many unsorted constants and some structs.
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
struct Envelope * env
Envelope information.
Convenience wrapper for the core headers.
struct Body * mutt_make_file_attach(const char *path, struct ConfigSubset *sub)
Create a file attachment.
#define STAILQ_FOREACH_SAFE(var, head, field, tvar)
Prototypes for many functions.
#define MUTT_ENV_CHANGED_XLABEL
X-Label edited.
#define APPLICATION_PGP
Use PGP to encrypt/sign.
void mutt_env_free(struct Envelope **ptr)
Free an Envelope.
struct Body * parts
parts of a multipart or message/rfc822
API for encryption/signing of emails.
char * mutt_str_skip_email_wsp(const char *s)
Skip over whitespace as defined by RFC5322.
size_t mutt_istr_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix, ignoring case.
#define STAILQ_FOREACH(var, head, field)
char * description
content-description
size_t mutt_buffer_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
#define STAILQ_NEXT(elm, field)
SecurityFlags security
bit 0-10: flags, bit 11,12: application, bit 13: traditional pgp See: ncrypt/lib.h pgplib...
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
void * data
User-supplied data.
void mutt_set_header_color(struct Mailbox *m, struct Email *e)
Select a colour for a message.
void mutt_env_to_local(struct Envelope *env)
Convert an Envelope's Address fields to local format.
SecurityFlags mutt_parse_crypt_hdr(const char *p, bool set_empty_signas, SecurityFlags crypt_app)
Parse a crypto header string.
void mutt_buffer_expand_path(struct Buffer *buf)
Create the canonical path.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
int mutt_file_copy_stream(FILE *fp_in, FILE *fp_out)
Copy the contents of one file into another.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
struct Email * email
Email in the list.
time_t mutt_file_decrease_mtime(const char *fp, struct stat *st)
Decrease a file's modification time by 1 second.
#define STAILQ_EMPTY(head)
void mutt_hash_delete(struct HashTable *table, const char *strkey, const void *data)
Remove an element from a Hash Table.
#define STAILQ_SWAP(head1, head2, type)
The item stored in a Hash Table.
Handling of global boolean variables.
#define mutt_debug(LEVEL,...)
struct ConfigSubset * sub
Inherited config items.
WHERE bool OptNewsSend
(pseudo) used to change behavior when posting
#define MUTT_HASH_STRDUP_KEYS
make a copy of the keys
Convenience wrapper for the library headers.
FILE * mutt_file_fopen(const char *path, const char *mode)
Call fopen() safely.
struct ListHead references
message references (in reverse order)
struct Envelope * mutt_rfc822_read_header(FILE *fp, struct Email *e, bool user_hdrs, bool weed)
parses an RFC822 header
struct HashTable * mutt_hash_new(size_t num_elems, HashFlags flags)
Create a new Hash Table (with string keys)
#define STAILQ_FIRST(head)
void mutt_edit_file(const char *editor, const char *file)
Let the user edit a file.