24 #ifndef MUTT_MUTTLIB_H 25 #define MUTT_MUTTLIB_H 61 void mutt_mktemp_full(
char *s,
size_t slen,
const char *prefix,
const char *suffix,
const char *src,
int line);
74 #define mutt_mktemp(buf, buflen) mutt_mktemp_pfx_sfx(buf, buflen, "neomutt", NULL) 75 #define mutt_mktemp_pfx_sfx(buf, buflen, prefix, suffix) mutt_mktemp_full(buf, buflen, prefix, suffix, __FILE__, __LINE__) 77 #define mutt_buffer_mktemp(buf) mutt_buffer_mktemp_pfx_sfx(buf, "neomutt", NULL) 78 #define mutt_buffer_mktemp_pfx_sfx(buf, prefix, suffix) mutt_buffer_mktemp_full(buf, prefix, suffix, __FILE__, __LINE__)
FILE * mutt_open_read(const char *path, pid_t *thepid)
Run a command to read from.
char * mutt_expand_path_regex(char *buf, size_t buflen, bool regex)
Create the canonical path (with regex char escaping)
char * mutt_gecos_name(char *dest, size_t destlen, struct passwd *pw)
Lookup a user's real name in /etc/passwd.
void mutt_buffer_sanitize_filename(struct Buffer *buf, const char *path, short slash)
Replace unsafe characters in a filename.
void mutt_str_pretty_size(char *buf, size_t buflen, size_t num)
Display an abbreviated size, like 3.4K.
regex_t * regex
compiled expression
int mutt_inbox_cmp(const char *a, const char *b)
do two folders share the same path and one is an inbox
String manipulation buffer.
void add_to_stailq(struct ListHead *head, const char *str)
Add a string to a list.
void remove_from_stailq(struct ListHead *head, const char *str)
Remove an item, matching a string, from a List.
char * mutt_expand_path(char *s, size_t slen)
Create the canonical path.
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src, format_t callback, intptr_t data, MuttFormatFlags flags)
Expand expandos (x) in a string.
void mutt_adv_mktemp(struct Buffer *buf)
Create a temporary file.
void mutt_buffer_pretty_mailbox(struct Buffer *s)
Shorten a mailbox path using '~' or '='.
void mutt_buffer_save_path(struct Buffer *dest, const struct Address *a)
Make a safe filename from an email address.
void mutt_buffer_expand_path(struct Buffer *buf)
Create the canonical path.
void mutt_sleep(short s)
Sleep for a while.
Handling of email attachments.
void mutt_get_parent_path(const char *path, char *buf, size_t buflen)
Find the parent of a path (or mailbox)
void mutt_safe_path(struct Buffer *dest, const struct Address *a)
Make a safe filename from an email address.
int mutt_save_confirm(const char *s, struct stat *st)
Ask the user to save.
void mutt_buffer_expand_path_regex(struct Buffer *buf, bool regex)
Create the canonical path (with regex char escaping)
void mutt_encode_path(struct Buffer *buf, const char *src)
Convert a path to 'us-ascii'.
const char * mutt_make_version(void)
Generate the NeoMutt version string.
Cached regular expression.
struct Regex * C_GecosMask
Config: Regex for parsing GECOS field of /etc/passwd.
bool mutt_is_text_part(struct Body *b)
Is this part of an email in plain text?
void mutt_pretty_mailbox(char *buf, size_t buflen)
Shorten a mailbox path using '~' or '='.
int mutt_check_overwrite(const char *attname, const char *path, struct Buffer *fname, enum SaveAttach *opt, char **directory)
Ask the user if overwriting is necessary.
void mutt_buffer_mktemp_full(struct Buffer *buf, const char *prefix, const char *suffix, const char *src, int line)
Create a temporary file.
void mutt_mktemp_full(char *s, size_t slen, const char *prefix, const char *suffix, const char *src, int line)
Create a temporary filename.
SaveAttach
Options for saving attachments.
void mutt_save_path(char *d, size_t dsize, const struct Address *a)
Turn an email address into a filename (for saving)
bool mutt_needs_mailcap(struct Body *m)
Does this type need a mailcap entry do display.